Create Quick Reorder Purchase Orders
POST/api/purchasing/quick-reorder
Create one draft purchase order per supplier from confirmed lines. Lines with quantity 0 are skipped; a supplier left with no lines creates nothing. Unit cost defaults to the supplier's price; the PO currency follows the supplier's pricing tier and the PO number is assigned automatically. The orders are created as drafts — review and submit them separately.
purchase-orders:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Body fields:
orders(array, required, 1–200) — one entry per supplier.orders[].supplier_id(integer, required, distinct) — the supplier; every line's product must be supplied by it.orders[].destination_warehouse_id(integer, optional) — ship-to warehouse; defaults to the purchase order settings default.orders[].lines(array, required, 1–500).orders[].lines[].product_id(integer, required).orders[].lines[].quantity(number, required, ≥ 0).orders[].lines[].unit_cost(number, optional, ≥ 0) — overrides the supplier price.
Returns 201 with the created purchase orders. Returns 422 when a product is not supplied by the supplier it was submitted under, or when every quantity is 0.
Requires the create purchase orders permission and the purchase-orders scope.
Request
Responses
- 201
- 401
- 403
- 422
- 429
Created
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.