Manage Reservations
POST/api/sales-order-lines/reservations
Reserve or reverse-reserve inventory for specific sales order lines. Returns the updated sales order.
orders:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Authentication: Requires Bearer token.
Body:
- sales_order_id (required): ID of the parent sales order
- sales_order_lines (required): Array of line reservation actions
- sales_order_lines[].id (required): Sales order line ID
- sales_order_lines[].quantity (required): Quantity to reserve/reverse (> 0, < 100,000)
- sales_order_lines[].action (required): One of
reserveorreverse_reservation
Validation:
- Returns 422 when a
reserveaction targets a line the sales channel has already reported as shipped but which could not be matched to stock on hand. Those lines are allocated automatically once the shortfall is settled, so manual reservation is rejected by design. The error key issales_order_lines.{index}.id.
A reservation request that cannot be applied to the lines is refused with 422 on sales_order_lines, carrying the reason.
Requires permission: sales_orders.update
A reverse_reservation on a line that belongs to a fulfillment order already submitted to a fulfillment provider is refused with 422 and an error message: recall (cancel) that fulfillment order from the provider first, then unallocate the line.
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
Response Headers
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.