Returns
Reverses a sale at the original cost, not today's cost.
GET
/sales/returns/List returns and refunds.
Filters
salesessionstatusdate_fromdate_toCombine any of these as query parameters. Also accepts cursor and page_size.
Fields on each result
FieldType & description
idinteger
saleinteger
sale_invoice_nostring
customer_namestring
return_nostring
return_datedatetime
reasonstring
refund_amountdecimal
statusstring
approved_byinteger
approved_by_namestring
created_byinteger
created_by_namestring
created_atdatetime
updated_atdatetime
Errors
CodeWhen it happens
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
FieldType & description
saleRequiredintegerSale ID to return against.
itemsRequiredarray of objectList of {"sale_item_id": <int>, "quantity": <decimal>, "return_condition": <str|optional>, "serial_numbers": [<int>, ...] (optional)}
reasonOptionalstring
Response fields
FieldType & description
saleintegerSale ID to return against.
itemsarray of objectList of {"sale_item_id": <int>, "quantity": <decimal>, "return_condition": <str|optional>, "serial_numbers": [<int>, ...] (optional)}
reasonstring
Errors
CodeWhen it happens
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."]
}
}
}