Sales

Returns

Reverses a sale at the original cost, not today's cost.

GET/sales/returns/

List returns and refunds.

Filters

salesessionstatusdate_fromdate_to

Combine any of these as query parameters. Also accepts cursor and page_size.

Fields on each result

id
integer
sale
integer
sale_invoice_no
string
customer_name
string
return_no
string
return_date
datetime
reason
string
refund_amount
decimal
status
string
approved_by
integer
approved_by_name
string
created_by
integer
created_by_name
string
created_at
datetime
updated_at
datetime

Errors

401The access token is missing or has expired. Refresh and retry.
403Your role lacks permission, or X-Shop-Id is a shop you cannot access.
429Rate limited. Wait for Retry-After seconds.
Request
curl https://api.tajirpoint.com/api/v1/sales/returns/ \
  -H "Authorization: Bearer $TAJIR_TOKEN" \
  -H "X-Shop-Id: 8f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f"
Response · 200 · 1 more fields below
{
  "next": "https://api.tajirpoint.com/api/v1/sales/returns/?cursor=cD0yMDI2LTA3LTExVDA5MTQyMlomcD00Mg",
  "previous": null,
  "results": [
    {
      "id": 42,
      "sale": 1,
      "sale_invoice_no": "DOC-00001",
      "customer_name": "Bilal Traders",
      "return_no": "RET-00007",
      "return_date": "2026-07-11T09:14:22Z",
      "reason": "Damaged in transit",
      "refund_amount": "450.00",
      "status": "active",
      "approved_by": 1,
      "approved_by_name": "Main Store",
      "created_by": 1,
      "created_by_name": "Main Store",
      "created_at": "2026-07-11T09:14:22Z"
    }
  ]
}
Response · error
{
  "error": {
    "code": 400,
    "message": "Validation failed.",
    "details": {
      "quantity": ["Must be greater than zero."]
    }
  }
}
POST/sales/returns/

Return part or all of a sale. Stock goes back at the cost it originally left at, not today's cost, so margin history stays honest. The refund either reduces the customer's khata balance or pays out — never both.

Body parameters

saleRequired
integerSale ID to return against.
itemsRequired
array of objectList of {"sale_item_id": <int>, "quantity": <decimal>, "return_condition": <str|optional>, "serial_numbers": [<int>, ...] (optional)}
reasonOptional
string

Response fields

sale
integerSale ID to return against.
items
array of objectList of {"sale_item_id": <int>, "quantity": <decimal>, "return_condition": <str|optional>, "serial_numbers": [<int>, ...] (optional)}
reason
string

Errors

400Validation failed. `details` names the offending fields.
409Conflict — most often insufficient stock for one of the lines.
401The access token is missing or has expired. Refresh and retry.
403Your role lacks permission, or X-Shop-Id is a shop you cannot access.
429Rate limited. Wait for Retry-After seconds.
Request
curl -X POST https://api.tajirpoint.com/api/v1/sales/returns/ \
  -H "Authorization: Bearer $TAJIR_TOKEN" \
  -H "X-Shop-Id: 8f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "sale": 1,
    "items": [],
    "reason": "Damaged in transit"
  }'
Response · 200
{
  "sale": 1,
  "items": [],
  "reason": "Damaged in transit"
}
Response · error
{
  "error": {
    "code": 400,
    "message": "Validation failed.",
    "details": {
      "quantity": ["Must be greater than zero."]
    }
  }
}