Read a purchase order
Admin, branch manager, or auditor. Returns one order with its items and agreed unit costs. An unknown order id is refused with 404 rather than answered with an empty document.
GET
/api/v1/purchase-orders/{purchaseOrderId}Authorization
AuthorizationBearer token (JWT) · headerrequiredJWT from POST /api/v1/auth/login sent as Authorization Bearer.
Path parameters
purchaseOrderIdstringrequiredThe purchase order id.
Responses
200
The purchase order and its items
idstringrequiredsupplier_idstringrequiredbranch_idstringrequiredstatusstringrequiredexpected_datestring | nullrequirednotesstringrequiredcreated_bystringrequiredcreated_atstringrequiredupdated_atstringrequiredsupplier_namestringrequiredbranch_namestringrequiredcreated_by_namestringrequireditem_countintegermin -9007199254740991 · max 9007199254740991
itemsobject[]requiredShow propertiesHide properties
Array of
objectidstringrequiredpo_idstringrequiredmedicine_idstringrequiredordered_qtyintegerrequiredmin -9007199254740991 · max 9007199254740991
agreed_unit_coststringrequiredmedicine_namestringrequired401
Not authenticated
detailstringrequired403
Access forbidden for this role
detailstringrequired404
PO not found
detailstringrequired