Receives purchase-order lines into stock (the app's receiving panel).
Requires ManagePurchaseOrders and an Idempotency-Key header. Body: { "lines": [ { "lineId": 1207, "quantity": 4 }, { "lineId": 1208, "quantity": 1, "locationId": 11 } ] }. Same code path and rules as receiving in the app: only an order whose status is Delivered or PartialReceived can be received (409 otherwise, e.g. for a Cancelled, Ordered or fully Received order); every line is checked before anything is written (one bad line and nothing is received); a quantity above the line's quantityRemaining is refused (over-receipt, also when a concurrent receipt of the same line got there first); locationId defaults to the order's receivingLocationId. An item line creates one stock item per unit at that location, with the template's properties, barcodes and category, a Cost property from the line's unitPrice, and Shipping Cost / Total Cost properties when the line is on a shipment with a shipping cost; a bundle line creates one bundle per unit with its items. The order status is then recomputed from its shipments: it becomes Received when every unit is received and every shipment is delivered, otherwise PartialReceived. The receipt is attributed to the key's creator. Returns the order as GET /api/v1/purchase-orders/{id} does.
Request
- Base URL: https://app.flexonthejob.com
- URL: https://app.flexonthejob.com/api/v1/purchase-orders/{id}/receive
- Auth: HTTP bearer
Path parameters
Purchase-order id from /api/v1/purchase-orders. Example: 412.
Request body
Response
The purchase order after the receipt.
Changes
No recorded changes to this operation across all 1 revision of this API.