Create PO Line Reservations
POST/api/v2/purchase-order-lines/:purchaseOrderLine/reservations
Reserve part of this purchase order line for one or more sales order lines. All or nothing: if one entry does not fit, nothing is reserved and the error names the entry (reservations.<index>.<field>).
purchase-orders:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Fields:
reservations(array, required, 1–100)reservations.*.sales_order_line_id(integer, required, distinct) — an open sales order line for the same product, shipping from the line's receiving warehousereservations.*.quantity(number > 0, required) — at most the line'sfree_to_reserve, and at most what the order line still needsreservations.*.include_on_hand(boolean, optional, default false) — also take units the order already holds on the shelf; those units go back on sale for the next orders in line
The purchase order must be submitted (not draft), open, not dropship, with unreceived quantity on the line.
Scope: purchase-orders:write. Permissions: purchase_orders.update and sales_orders.update (403 without either).
Request
Responses
- 201
- 401
- 403
- 404
- 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.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
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.