Creates several warehouse transfer orders in one call.

POST /inventory/warehouse-transfer-orders/bulk

Group: Inventory › Warehouse Transfer Orders · Operation ID: bulkCreateTransferOrders

Creates several warehouse transfer orders in one call. It is all or nothing: one rejected order rejects the whole request and nothing is written, so a failed import is safe to retry unchanged. 'index' on an error names the transfer order at fault, counting from zero. The response has the created orders in input order, headers only, and each can be read in full on GET inventory/warehouse-transfer-orders/:id.

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.

Request body

Required, application/json: bulkCreateTransferOrdersInput.

Field Type Required Description
transferOrders array of object yes The transfer orders to create. All or nothing: if any is rejected, none is created.
transferOrders[].entityId string no The legal entity. Defaults to the entity that owns the first line’s warehouse. See id on GET base/entities.
transferOrders[].documentDate string (date) no The date to give the transfer order. Defaults to today. Use format YYYY-MM-DD.
transferOrders[].locationId string no The warehouse the goods leave, for the transfer order as a whole. See id on GET inventory/warehouses/:id.
transferOrders[].targetLocationId string no The warehouse the goods go to, for the transfer order as a whole. See id on GET inventory/warehouses/:id.
transferOrders[].referenceNumber string no Your own reference on the transfer order.
transferOrders[].notes string no Free text on the document.
transferOrders[].lines array of object yes The lines of the transfer order. At least one is required.
transferOrders[].lines[].itemId string yes The item to move. See id on GET inventory/items/:id.
transferOrders[].lines[].locationId string yes The warehouse to draw from, required on a line. See id on GET inventory/warehouses/:id.
transferOrders[].lines[].targetLocationId string yes The warehouse to deliver to. See id on GET inventory/warehouses/:id.
transferOrders[].lines[].unitId string no The unit the quantity is in. There is no endpoint for it.
transferOrders[].lines[].quantity string (decimal) yes How much to move, in the line’s unit. Must be greater than zero.
transferOrders[].lines[].notes string no Free text on the line.

Example:

{
  "transferOrders": [
    {
      "targetLocationId": "e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1",
      "lines": [
        {
          "itemId": "517a93e4-cbb4-4571-9e3d-2343e56cfd84",
          "targetLocationId": "e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1",
          "quantity": "12",
          "locationId": "b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5"
        }
      ],
      "locationId": "b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5"
    }
  ]
}

Response

200 Success

Under data (bulkCreateTransferOrdersOutput):

Field Type Required Description
transferOrders array of object yes The created transfer orders, in input order. Headers only. Read one in full on GET inventory/warehouse-transfer-orders/:id.
transferOrders[].id string yes The unique identifier for the transfer order.
transferOrders[].documentNumber string no The transfer order's number, for example 'WTO-1043'.
transferOrders[].documentStatus string yes The status of the transfer order, computed from the lines and set by no endpoint directly. Possible values: 'DRAFT', 'IN_TRANSFER', 'PARTIALLY_PROCESSED', 'PROCESSED'. 'DRAFT' while the order is being written, 'IN_TRANSFER' while a transfer created from it has yet to commit, 'PARTIALLY_PROCESSED' once a transfer has moved part of what was asked for and a remainder is still open, and 'PROCESSED' once nothing is open.
transferOrders[].documentDate string (date) no The date the transfer order is dated. Format YYYY-MM-DD.
transferOrders[].referenceNumber string no Your own reference on the transfer order.
transferOrders[].entityId string no The legal entity the transfer order belongs to. See id on GET base/entities.
transferOrders[].entityName string no The name of that legal entity.
transferOrders[].locationId string no The warehouse the goods leave, where the order names one for the whole document. A line may name its own. See id on GET inventory/warehouses/:id.
transferOrders[].locationCode string no The code of that warehouse.
transferOrders[].locationName string no The name of that warehouse.
transferOrders[].targetLocationId string no The warehouse the goods go to. See id on GET inventory/warehouses/:id.
transferOrders[].targetLocationCode string no The code of that warehouse.
transferOrders[].targetLocationName string no The name of that warehouse.
transferOrders[].notes string no Free text on the document.
transferOrders[].lineCount number no The number of lines on the transfer order.
transferOrders[].openLineCount number no How many lines still have quantity left to transfer. Zero means everything has been taken.
transferOrders[].createdDate string (date-time) no The date and time the transfer order was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.
transferOrders[].lastModifiedDate string (date-time) no The date and time the transfer order record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.

Response headers

Errors

Code Status
NOTHING_TO_CREATE 400
REFERENCE_NOT_FOUND 400
NO_LINES 400
INVALID_QUANTITY 400
SAME_LOCATION 400
IDEMPOTENCY_KEY_CONFLICT 409
IDEMPOTENCY_PAYLOAD_MISMATCH 422

Statuses