Pull Stock To Line
POST/api/v2/inventory-allocations/pull-stock
Pulls soft on-hand stock from one or more donor sales order lines onto a backordered line, atomically. Each donor's soft allocation is backordered by the pulled quantity and the freed on-hand is allocated to the destination line — a conserved swap that preserves total demand and FIFO cost layering across every affected order. All pulls succeed or roll back together.
Body:
destination_sales_order_line_id(required, integer) — the backordered line that receives the stock.pulls(required, array, min 1) — the donors to pull from.pulls[].sales_order_line_id(required, integer) — a donor sales order line holding soft allocations of the same product + warehouse. Get valid donors fromGET /pull-stock-donors.pulls[].quantity(required, numeric, > 0) — how much soft on-hand to pull from that donor.
Returns 422 when a donor no longer holds enough soft-allocated stock, a donor is the same line as the destination, or the destination has no matching backorder to receive the pull.
On success returns the total pulled_quantity and the refreshed donor list.
Request
Responses
- 200
- 401
- 403
- 422
- 429
OK
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.