Skip to content

Purchasing

A purchase order records what a merchant ordered from a supplier and at what price. Receiving it moves the goods into stock at the ordered cost.

MethodPathScope
GET/v1/purchase-orderspurchase_orders.read
GET/v1/purchase-orders/:idpurchase_orders.read
POST/v1/purchase-orderspurchase_orders.write
PATCH/v1/purchase-orders/:idpurchase_orders.write
PATCH/v1/purchase-orders/:id/receivepurchase_orders.write
Terminal window
curl -s "$API_BASE_URL/purchase-orders" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"orderNo": 4471,
"date": "2026-07-29",
"reciveDate": "2026-08-02",
"supplierId": 17,
"storeId": 1,
"narration": "Weekly coffee order",
"incTax": false,
"items": [
{
"itemId": 9001,
"qty": 24,
"rate": 12.40,
"taxableAmount": 297.60,
"taxId": 3
},
{
"itemId": 9002,
"qty": 60,
"rate": 0.92,
"taxableAmount": 55.20,
"taxId": 3,
"note": "Oat, 1L"
}
]
}'
FieldTypeRequiredNotes
orderNonumberyesDocument number in the merchant’s own sequence
datestringyesYYYY-MM-DD order date
reciveDatestringyesExpected delivery date
supplierIdnumberyesExisting supplier row
storeIdnumberyesWhere the goods will land
invoNostringnoSupplier invoice number. Required when receiving on create
narrationstringnoFree-text note
currencyIdnumbernoFor orders priced in a foreign currency
exchangeRatenumbernoRate used to convert to the merchant’s currency
incTaxbooleannotrue when line rates already include tax
roudOfAmountnumbernoRounding adjustment applied to the document total
providerstringnoFree-text source marker for the document
FieldTypeRequiredNotes
itemIdnumberyes
variantIdnumberno0 when the item has no variants
qtynumberyesOrdered quantity
ratenumberyesUnit purchase price
taxableAmountnumberyesrate × qty before tax. Recomputed server-side
supplyPricenumbernoSupplier list price, when it differs from the negotiated rate
taxIdnumbernoPurchase tax for the line. Defaults to the item’s purchase tax
cessId / cessnumbernoAdditional levies where applicable
notestringnoPer-line note
serialNo{ value: string }[]noPre-picked serial numbers for serial-tracked items
idnumbernoExisting line id — send it on PATCH to update a line instead of adding one

Receiving raises stock at the destination store and closes the order.

Terminal window
curl -s -X PATCH "$API_BASE_URL/purchase-orders/9912/receive" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"invoNo": "SUP-2026-8841",
"reciveDate": "2026-08-02"
}'

invoNo is required at receipt — it is the link between the merchant’s stock ledger and the supplier’s invoice. Partial receipts are handled by patching quantities on the order before receiving it.

Terminal window
curl -s "$API_BASE_URL/purchase-orders?storeId=1&fromDate=2026-07-01&toDate=2026-07-31&limit=100" \
-H "Authorization: Bearer $ACCESS_TOKEN"
ParameterNotes
storeIdRestrict to one store
supplierIdRestrict to one supplier
fromDate / toDateDocument date window, YYYY-MM-DD
searchMatches order number and supplier invoice number
page, limit, sort, orderStandard paging