Skip to main content

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.

Required scope: purchase-orders:write

Grant 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​

Created

Response Headers
    Content-Type