Commit Transfer Order
POST /inventory/warehouse-transfer-orders/{id}/commit
Group: Inventory › Warehouse Transfer Orders · Operation ID: commitTransferOrder
Converts a warehouse transfer order into a warehouse transfer, which moves the goods.
Converts what the order still has open into the warehouse transfer that moves the goods.
This is what committing means for an order. Every document on this API commits, and an order has no stock of its own to post, so its commit creates the transfer instead. The response names it: transferId is the transfer's own id and transferDocumentNumber its number, and the order comes back 'IN_TRANSFER'.
The transfer it creates is a draft. It moves nothing until it is committed in its own right, and the order's lines are linked to the transfer's, so committing the transfer is what fills in this order's processed and open quantities.
Every line must have a source warehouse first. A line at 'NEEDS_SOURCE', without a locationId, or naming its destination as its source, is refused with UNRESOLVED_SOURCE_LINES, and the whole order with it, because a transfer built from a partial order would be invalid rather than incomplete. Resolve them with PATCH inventory/warehouse-transfer-orders/:id and call this again.
An order converts once per remainder. While its transfer is uncommitted the order is 'IN_TRANSFER', and a second call fails with WRONG_STATUS, which stops a duplicate. If that transfer commits less than was asked for, the order becomes 'PARTIALLY_PROCESSED', and calling this again creates a transfer for exactly what is left. Only 'PROCESSED', with nothing open, is the end.
Open in the interactive reference
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Api-Version |
header | "v1" |
yes | The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1. |
Idempotency-Key |
header | string | no | An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with 400 IDEMPOTENCY_NOT_SUPPORTED rather than silently ignored. |
id |
path | string | yes | The unique identifier for the transfer order to convert. |
Response
200 Success
Under data (commitTransferOrderOutput):
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | The unique identifier for the transfer order. |
documentStatus |
string | yes | The status of the transfer order, read back from the document. 'IN_TRANSFER' on success: the transfer this created has the open quantity and has yet to commit. |
transferId |
string | no | The warehouse transfer this created. See id on GET inventory/warehouse-transfers/:id. It is a draft and moves nothing until it is committed in its own right. |
transferDocumentNumber |
string | no | The number of that transfer. |
Response headers
Idempotency-Replayed— Present andtrueonly when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent asfalse.
Errors
| Code | Status |
|---|---|
NOT_FOUND |
400 |
WRONG_STATUS |
400 |
NO_LINES |
400 |
UNRESOLVED_SOURCE_LINES |
400 |
CONVERSION_REJECTED |
400 |
IDEMPOTENCY_KEY_CONFLICT |
409 |
IDEMPOTENCY_PAYLOAD_MISMATCH |
422 |
Statuses
400— Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, NO_LINES, UNRESOLVED_SOURCE_LINES, CONVERSION_REJECTED401— Missing or invalid access token403— Not authorized404— Not found409— The Idempotency-Key is still being processed by another request.422— The Idempotency-Key was already used with a different request payload.429— Too many requests500— Internal server error