Sales

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_balancesearch

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

Fields on each result

id
integer
invoice_no
string
warehouse
integer
warehouse_name
string
customer
integer
customer_name
string
customer_phone
string
sale_date
datetime
sale_type
string
price_list
integer
currency_code
string
exchange_rate
decimal
subtotal
decimal
discount_type
string
discount_value
decimal
discount_amount
decimal
discount_approved_by
integer
tax_amount
decimal
is_tax_inclusive
boolean
shipping_amount
decimal
pos_service_fee
decimal
round_off_amount
decimal
total_amount
decimal
paid_amount
decimal
balance_due
decimal
payment_status
string
fulfillment_status
string
cashier
integer
cashier_name
string
register
integer
session
integer
quotation
integer
client_uuid
uuid
offline_ref
stringDevice-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_status
string
fbr_invoice_number
string
fbr_status
string
wht_amount
decimal
notes
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/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

warehouseRequired
integerWarehouse ID.
customerOptional
integerParty ID of the customer.
sale_typeOptional
string
itemsRequired
array of object
price_listOptional
integer
discount_typeOptional
stringOrder-level discount kind. Must be 'percentage' or 'fixed' (or empty for no order discount). Combines with each item.discount (line-level).
discount_valueOptional
decimalThe percentage (e.g. '10' = 10% off cart subtotal) or fixed amount (e.g. '50' = ₨50 off cart subtotal), depending on discount_type.
discount_approved_byOptional
integerUser ID who approved the discount.
is_tax_inclusiveOptional
booleanIf 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_amountOptional
decimal
pos_service_feeOptional
decimal
round_off_amountOptional
decimal
registerOptional
integer
sessionOptional
integer
session_client_uuidOptional
uuidclient_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_uuidOptional
uuid
offline_refOptional
stringDevice-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.
notesOptional
string
coupon_codeOptional
stringOptional 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.
paymentsOptional
array of objectList of {"amount": <decimal>, "method": <str|optional>}
currency_codeOptional
stringISO 4217 currency code stored on the Sale. Default PKR.
exchange_rateOptional
decimalExchange rate to shop's base currency at the time of sale.

Response fields

warehouse
integerWarehouse ID.
customer
integerParty ID of the customer.
sale_type
string
items
array of object
price_list
integer
discount_type
stringOrder-level discount kind. Must be 'percentage' or 'fixed' (or empty for no order discount). Combines with each item.discount (line-level).
discount_value
decimalThe percentage (e.g. '10' = 10% off cart subtotal) or fixed amount (e.g. '50' = ₨50 off cart subtotal), depending on discount_type.
discount_approved_by
integerUser ID who approved the discount.
is_tax_inclusive
booleanIf 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_amount
decimal
pos_service_fee
decimal
round_off_amount
decimal
register
integer
session
integer
session_client_uuid
uuidclient_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_uuid
uuid
offline_ref
stringDevice-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.
notes
string
coupon_code
stringOptional 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.
payments
array of objectList of {"amount": <decimal>, "method": <str|optional>}
currency_code
stringISO 4217 currency code stored on the Sale. Default PKR.
exchange_rate
decimalExchange rate to shop's base currency at the time of sale.

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/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

id
integer
invoice_no
string
warehouse
integer
warehouse_name
string
customer
integer
customer_name
string
customer_phone
string
sale_date
datetime
sale_type
string
price_list
integer
currency_code
string
exchange_rate
decimal
subtotal
decimal
discount_type
string
discount_value
decimal
discount_amount
decimal
discount_approved_by
integer
tax_amount
decimal
is_tax_inclusive
boolean
shipping_amount
decimal
pos_service_fee
decimal
round_off_amount
decimal
total_amount
decimal
paid_amount
decimal
balance_due
decimal
payment_status
string
fulfillment_status
string
overpayment_amount
string
overpayment_warning
string
cashier
integer
cashier_name
string
register
integer
session
integer
quotation
integer
client_uuid
uuid
offline_ref
stringDevice-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_status
string
fbr_invoice_number
string
fbr_status
string
fbr_qr_code
string
fbr_submitted_at
datetime
wht_amount
decimal
notes
string
items
array of object
payments
string
returned_amount
string
net_amount
string
return_status
string
created_at
datetime
updated_at
datetime

Errors

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."]
    }
  }
}