Split Line Across Warehouses
POST/api/sales-order-lines/:salesOrderLine/split-across-warehouses
Redistribute a sales order line's pre-dispatch fulfillment across multiple warehouses WITHOUT duplicating the line (Pattern C). The channel line stays 1:1 with upstream; the split materialises as one InventoryAllocation + one FulfillmentOrder per warehouse (1 SOL → N allocations → N FOs). Each slice allocates on-hand up to availability at that warehouse, with the remainder planned (backorder).
Pre-dispatch only. Allowed while every fulfillment order for the line is still open + unsubmitted. Once any FO has been submitted to a carrier the line can no longer be redistributed — returns 409.
Body fields:
slices(required, array, min 1) — the target distribution.slices[].warehouse_id(required, integer, must exist) — destination warehouse for this slice.slices[].quantity(required, integer, min 1) — units to fulfil from that warehouse.
The slice total must not exceed the line's unfulfilled quantity (422 otherwise). Duplicate warehouses are merged. Returns the refreshed sales order.
Request
Responses
- 200
- 409
- 422
OK
Response Headers
Conflict
Response Headers
Unprocessable Entity