Docs
Split Order
POST /Orders/{orderId}/split
POST
/Orders/{orderId}/splitMoves part of the order's resource lines onto a new Draft order and returns the new order's id. Each entry names a line and a quantity to move (greater than zero, no more than the line holds); a fully moved line leaves the source, others are reduced, and some quantity must stay on the source. The new order is named "{name} (split)" unless a name is given and keeps the source's Internal or External source. Expense lines are not moved. Refused while the order is locked (declared Sent or Confirmed, or Ordered on an internal order, with no unsent revision); call Orders_MintOrderVersion first. Line ids come from Orders_GetOrder.
Path Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| orderId | uuid | Required |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Optional | |
| lines | SplitOrderRequestLineSplit[] | Optional |
SplitOrderRequestLineSplit
| Field | Type | Description |
|---|---|---|
| lineItemId | uuid | |
| quantity | number |
Response
Type: uuid