List purchase orders
Admin, branch manager, or auditor. Returns the hundred newest orders with their item counts. The filters cover branch, supplier, and status, and an unfiltered call spans every branch.
GET
/api/v1/purchase-ordersAuthorization
AuthorizationBearer token (JWT) · headerrequiredJWT from POST /api/v1/auth/login sent as Authorization Bearer.
Query parameters
branch_idstringRestrict to one branch.
supplier_idstringRestrict to one supplier.
statusstringDRAFT, SENT, RECEIVED, or CANCELLED. Empty covers every status.
Responses
200
The recent purchase orders
itemsobject[]requiredShow propertiesHide properties
Array of
objectidstringrequiredsupplier_idstringrequiredbranch_idstringrequiredstatusstringrequiredexpected_datestring | nullrequirednotesstringrequiredcreated_bystringrequiredcreated_atstringrequiredupdated_atstringrequiredsupplier_namestringrequiredbranch_namestringrequiredcreated_by_namestringrequireditem_countintegermin -9007199254740991 · max 9007199254740991
totalintegerrequiredmin -9007199254740991 · max 9007199254740991
401
Not authenticated
detailstringrequired403
Access forbidden for this role
detailstringrequired