Create a stock transfer
Creates a draft stock transfer between two inventory locations, such as van loading, van return or store receiving, with an initial set of item lines. Stock does not move until the transfer is confirmed.
How to use it
- Get the source and destination stockroom IDs from List inventory locations and item codes from List items.
- Send the transferType, both location IDs, the transferDate and any initial lines with requested quantities.
- The transfer is created as DRAFT with a TRF number; no stock moves until you call Confirm a stock transfer.
BearerAuthAuthorizationBearer <JWT>application/json- body
transferType*stringPurpose: VAN_LOADING, VAN_RETURN, STORE_RECEIVING, INTER_STORE, MFG_TO_WAREHOUSE or MANUAL. Drives how the movement is labelled in reports.
"VAN_LOADING""VAN_RETURN""STORE_RECEIVING""INTER_STORE""MFG_TO_WAREHOUSE""MANUAL"fromLocationId*stringSource stockroom ID, from List inventory locations.
uuidtoLocationId*stringDestination stockroom ID, from List inventory locations.
uuidtransferDate*stringBusiness date of the transfer (YYYY-MM-DD).
datereferenceId?|Optional ID of the document behind the transfer; stock movements are tagged with it.
uuidreferenceType?|Kind of document referenceId points to. Stock movements default to STOCK_TRANSFER when empty.
items*array<>Initial item lines. May be empty; add more with Add items to a stock transfer while it is a draft.
notes?|Free-text notes.
OK
*/*- response
status*stringOutcome of the call: SUCCESS when the request worked, ERROR when it did not.
message*stringShort human-readable message describing the result, for logs or display; do not parse it.
data?The stock transfer as it now stands, with its item lines and quantity totals.
curl -X POST 'https://beta.iotoms.com/api/v1/inventory/transfers' \ -H 'Content-Type: application/json' \ -d '{ "transferType": "VAN_LOADING", "fromLocationId": "178bb398-90d2-4fc3-a4a0-37fc0eed2806", "toLocationId": "e81ad314-9cb9-45ae-9ad9-f1b5ebcc7aae", "transferDate": "2019-08-24", "items": [ { "itemId": "string", "requestedQty": 0 } ]}'{ "status": "string", "message": "string", "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "transferNumber": "string", "transferType": "VAN_LOADING", "fromLocationId": "178bb398-90d2-4fc3-a4a0-37fc0eed2806", "fromLocationName": "string", "toLocationId": "e81ad314-9cb9-45ae-9ad9-f1b5ebcc7aae", "toLocationName": "string", "status": "DRAFT", "referenceId": "8502eb05-558d-4480-8511-c1011710b340", "referenceType": "string", "transferDate": "2019-08-24", "expectedReceiptDate": "2019-08-24", "confirmedBy": "string", "confirmedAt": "2019-08-24T14:15:22Z", "receivedBy": "string", "receivedAt": "2019-08-24T14:15:22Z", "notes": "string", "items": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "itemId": "string", "itemName": "string", "requestedQty": 0, "dispatchedQty": 0, "receivedQty": 0, "varianceQty": 0, "unitCost": 0, "notes": "string" } ], "totalItems": 0, "totalRequestedQty": 0, "totalDispatchedQty": 0, "totalReceivedQty": 0, "totalVarianceQty": 0, "createdAt": "2019-08-24T14:15:22Z" }}