Skip to main content

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).

Required scope: orders:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

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). A partial split — slices totalling less than the unfulfilled quantity — keeps the remainder at the line's own (home) warehouse: it is re-allocated there (on hand first, then backorder) and stays on that warehouse's fulfillment order, merged with any slice you sent for that warehouse. No unit is left unallocated. Duplicate warehouses are merged. Returns the refreshed sales order.

Request​

Responses​

OK

Response Headers
    Content-Type