iotoms Docs

Receive a stock transfer

PATCH
/api/v1/inventory/transfers/{id}/receive

Records received quantities at the destination for an in-transit or partially received transfer and adds that stock there. Quantities are cumulative per line, so repeating the same call does not add stock twice; receiving more than was dispatched is rejected. Status becomes RECEIVED or PARTIAL.

How to use it

  1. Call Get a stock transfer on an IN_TRANSIT or PARTIAL transfer and read each line's id.
  2. For each line, send transferItemId and the total quantity received so far, up to the dispatched quantity.
  3. Only the increase since the last receipt is added to the destination's stock, so resending the same figures is safe.
  4. The transfer becomes RECEIVED when every line is fully received, otherwise PARTIAL; varianceQty shows any shortage.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string

ID of the record (UUID).

Formatuuid

Header Parameters

Request Body

application/json
  1. body
items*array<>

One entry per line being received, with the cumulative quantity received so far.

notes?|

Notes about the receipt; replaces the transfer's notes when sent.

Response Body

OK

*/*
  1. response
status*string

Outcome of the call: SUCCESS when the request worked, ERROR when it did not.

message*string

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

Example Request
curl -X PATCH 'https://beta.iotoms.com/api/v1/inventory/transfers/497f6eca-6276-4993-bfeb-53cbbbba6f08/receive' \  -H 'Content-Type: application/json' \  -d '{  "items": [    {      "transferItemId": "75250203-bd95-46ba-995c-c6cc549e21cb",      "receivedQty": 0    }  ]}'
Example Response
{  "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"  }}