Sales
An invoice. Creating one decrements stock, books revenue and tax, and settles or credits the customer — in one transaction.
GET
/sales/sales/List sales (invoices).
Filters
customerproductsale_typepayment_statusdate_fromdate_toregistersessioncashieramount_minamount_maxhas_balancesearchCombine any of these as query parameters. Also accepts cursor and page_size.
Fields on each result
FieldType & description
idinteger
invoice_nostring
warehouseinteger
warehouse_namestring
customerinteger
customer_namestring
customer_phonestring
sale_datedatetime
sale_typestring
price_listinteger
currency_codestring
exchange_ratedecimal
subtotaldecimal
discount_typestring
discount_valuedecimal
discount_amountdecimal
discount_approved_byinteger
tax_amountdecimal
is_tax_inclusiveboolean
shipping_amountdecimal
pos_service_feedecimal
round_off_amountdecimal
total_amountdecimal
paid_amountdecimal
balance_duedecimal
payment_statusstring
fulfillment_statusstring
cashierinteger
cashier_namestring
registerinteger
sessioninteger
quotationinteger
client_uuiduuid
offline_refstringDevice-namespaced number an offline sale was rung under (e.g. OFF-3FA9-000123). Stored for traceability so a printed offline receipt can be reconciled to its canonical invoice_no.
sync_statusstring
fbr_invoice_numberstring
fbr_statusstring
wht_amountdecimal
notesstring
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/sales/ \
-H "Authorization: Bearer $TAJIR_TOKEN" \
-H "X-Shop-Id: 8f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f"Response · 200 · 27 more fields below
{
"next": "https://api.tajirpoint.com/api/v1/sales/sales/?cursor=cD0yMDI2LTA3LTExVDA5MTQyMlomcD00Mg",
"previous": null,
"results": [
{
"id": 42,
"invoice_no": "INV-00042",
"warehouse": 1,
"warehouse_name": "Main Store",
"customer": 1,
"customer_name": "Bilal Traders",
"customer_phone": "+923001234567",
"sale_date": "2026-07-11T09:14:21Z",
"sale_type": "retail",
"price_list": 1,
"currency_code": "PKR",
"exchange_rate": "1.000000",
"subtotal": "2100.00",
"discount_type": "percentage"
}
]
}Response · error
{
"error": {
"code": 400,
"message": "Validation failed.",
"details": {
"quantity": ["Must be greater than zero."]
}
}
}POST
/sales/sales/Create a sale. This is one transaction: stock is decremented, COGS and revenue are booked, tax is computed, and the customer is either settled or credited to their khata. If any part fails, none of it happens. Send an Idempotency-Key — do not let a retry become a second sale.
Body parameters
FieldType & description
warehouseRequiredintegerWarehouse ID.
customerOptionalintegerParty ID of the customer.
sale_typeOptionalstring
itemsRequiredarray of object
price_listOptionalinteger
discount_typeOptionalstringOrder-level discount kind. Must be 'percentage' or 'fixed' (or empty for no order discount). Combines with each item.discount (line-level).
discount_valueOptionaldecimalThe percentage (e.g. '10' = 10% off cart subtotal) or fixed amount (e.g. '50' = ₨50 off cart subtotal), depending on discount_type.
discount_approved_byOptionalintegerUser ID who approved the discount.
is_tax_inclusiveOptionalbooleanIf true, item.unit_price is treated as already including tax. Tax itself is computed server-side from each variant's configured tax rate — there is NO order-level tax override field. Set tax on the Product / Variant in the catalog.
shipping_amountOptionaldecimal
pos_service_feeOptionaldecimal
round_off_amountOptionaldecimal
registerOptionalinteger
sessionOptionalinteger
session_client_uuidOptionaluuidclient_uuid of an offline-opened session. Used to link a queued sale to its session once both have synced, when no integer session id is available yet.
client_uuidOptionaluuid
offline_refOptionalstringDevice-namespaced number an offline sale was rung under (e.g. OFF-3FA9-000123). Stored on the Sale for traceability; the canonical number is still the server-assigned invoice_no.
notesOptionalstring
coupon_codeOptionalstringOptional coupon code. Validated + redeemed server-side; the associated Discount overrides discount_type/discount_value when the caller hasn't already set them. Invalid/expired/used-up codes raise 400.
paymentsOptionalarray of objectList of {"amount": <decimal>, "method": <str|optional>}
currency_codeOptionalstringISO 4217 currency code stored on the Sale. Default PKR.
exchange_rateOptionaldecimalExchange rate to shop's base currency at the time of sale.
Response fields
FieldType & description
warehouseintegerWarehouse ID.
customerintegerParty ID of the customer.
sale_typestring
itemsarray of object
price_listinteger
discount_typestringOrder-level discount kind. Must be 'percentage' or 'fixed' (or empty for no order discount). Combines with each item.discount (line-level).
discount_valuedecimalThe percentage (e.g. '10' = 10% off cart subtotal) or fixed amount (e.g. '50' = ₨50 off cart subtotal), depending on discount_type.
discount_approved_byintegerUser ID who approved the discount.
is_tax_inclusivebooleanIf true, item.unit_price is treated as already including tax. Tax itself is computed server-side from each variant's configured tax rate — there is NO order-level tax override field. Set tax on the Product / Variant in the catalog.
shipping_amountdecimal
pos_service_feedecimal
round_off_amountdecimal
registerinteger
sessioninteger
session_client_uuiduuidclient_uuid of an offline-opened session. Used to link a queued sale to its session once both have synced, when no integer session id is available yet.
client_uuiduuid
offline_refstringDevice-namespaced number an offline sale was rung under (e.g. OFF-3FA9-000123). Stored on the Sale for traceability; the canonical number is still the server-assigned invoice_no.
notesstring
coupon_codestringOptional coupon code. Validated + redeemed server-side; the associated Discount overrides discount_type/discount_value when the caller hasn't already set them. Invalid/expired/used-up codes raise 400.
paymentsarray of objectList of {"amount": <decimal>, "method": <str|optional>}
currency_codestringISO 4217 currency code stored on the Sale. Default PKR.
exchange_ratedecimalExchange rate to shop's base currency at the time of sale.
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/sales/ \
-H "Authorization: Bearer $TAJIR_TOKEN" \
-H "X-Shop-Id: 8f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"warehouse": 1,
"items": [],
"customer": 1,
"sale_type": "retail",
"price_list": 1,
"discount_type": "percentage",
"discount_value": "0.00",
"discount_approved_by": 1,
"is_tax_inclusive": false,
"shipping_amount": "0.00"
}'Response · 200 · 8 more fields below
{
"warehouse": 1,
"customer": 1,
"sale_type": "retail",
"items": [],
"price_list": 1,
"discount_type": "percentage",
"discount_value": "0.00",
"discount_approved_by": 1,
"is_tax_inclusive": false,
"shipping_amount": "0.00",
"pos_service_fee": "0.00",
"round_off_amount": "0.00",
"register": 1,
"session": 1
}Response · error
{
"error": {
"code": 400,
"message": "Validation failed.",
"details": {
"quantity": ["Must be greater than zero."]
}
}
}GET
/sales/sales/{id}/Retrieve one sale with its line items, payments, tax breakdown and any returns against it.
Response fields
FieldType & description
idinteger
invoice_nostring
warehouseinteger
warehouse_namestring
customerinteger
customer_namestring
customer_phonestring
sale_datedatetime
sale_typestring
price_listinteger
currency_codestring
exchange_ratedecimal
subtotaldecimal
discount_typestring
discount_valuedecimal
discount_amountdecimal
discount_approved_byinteger
tax_amountdecimal
is_tax_inclusiveboolean
shipping_amountdecimal
pos_service_feedecimal
round_off_amountdecimal
total_amountdecimal
paid_amountdecimal
balance_duedecimal
payment_statusstring
fulfillment_statusstring
overpayment_amountstring
overpayment_warningstring
cashierinteger
cashier_namestring
registerinteger
sessioninteger
quotationinteger
client_uuiduuid
offline_refstringDevice-namespaced number an offline sale was rung under (e.g. OFF-3FA9-000123). Stored for traceability so a printed offline receipt can be reconciled to its canonical invoice_no.
sync_statusstring
fbr_invoice_numberstring
fbr_statusstring
fbr_qr_codestring
fbr_submitted_atdatetime
wht_amountdecimal
notesstring
itemsarray of object
paymentsstring
returned_amountstring
net_amountstring
return_statusstring
created_atdatetime
updated_atdatetime
Errors
CodeWhen it happens
404No such record in this shop.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/sales/42/ \
-H "Authorization: Bearer $TAJIR_TOKEN" \
-H "X-Shop-Id: 8f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f"Response · 200 · 36 more fields below
{
"id": 42,
"invoice_no": "INV-00042",
"warehouse": 1,
"warehouse_name": "Main Store",
"customer": 1,
"customer_name": "Bilal Traders",
"customer_phone": "+923001234567",
"sale_date": "2026-07-11T09:14:21Z",
"sale_type": "retail",
"price_list": 1,
"currency_code": "PKR",
"exchange_rate": "1.000000",
"subtotal": "2100.00",
"discount_type": "percentage"
}Response · error
{
"error": {
"code": 400,
"message": "Validation failed.",
"details": {
"quantity": ["Must be greater than zero."]
}
}
}