iotoms Docs

Create a goods receipt

POST
/api/v1/procurement/receipts

Records a delivery from a vendor as a draft goods receipt, optionally linked to a purchase order. Stock is not changed until the receipt is confirmed.

How to use it

  1. Get vendorId from List vendors and, when receiving against an order, purchaseOrderId and its line IDs from Get a purchase order.
  2. Send receivedDate and the lines with receivedQty and acceptedQty; catch-weight items also need packWeights or measuredGrossWeight.
  3. The receipt is saved as DRAFT with a GRN number. Stock and the purchase order do not change yet.
  4. Confirm it with Confirm a goods receipt, or cancel it with Cancel a goods receipt.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Header Parameters

X-TenantID*string

Your merchant's tenant code — the value typed in the Domain field on the iotoms login screen. See Concepts.

Request Body

application/json
  1. body
purchaseOrderId?|

Optional purchase order this delivery is against, from List purchase orders. Omit for a standalone receipt.

Formatuuid
vendorId*string

Vendor who delivered, from List vendors. Required.

Formatuuid
receivedDate*string

Date the goods arrived (YYYY-MM-DD). Required; also sets the GRN number's date.

Formatdate
deliveryNoteNumber?|

Optional vendor delivery note number.

receivedBy?|

Optional name of the person who received the goods.

notes?|

Optional free-text notes.

items*array<>

Lines delivered. Required.

Response Body

OK

*/*
  1. response
status*string

Outcome of the request: SUCCESS when it worked; errors return an error status with the reason in message.

message*string

Short human-readable message describing the outcome.

data?

The goods receipt with its lines.

Example Request
curl -X POST 'https://beta.iotoms.com/api/v1/procurement/receipts' \  -H 'X-TenantID: your-tenant-code' \  -H 'Content-Type: application/json' \  -d '{  "vendorId": "e9b57fab-1850-44d4-8499-71fd15c845a0",  "receivedDate": "2019-08-24",  "items": [    {      "itemId": "string",      "receivedQty": 0,      "acceptedQty": 0,      "condition": "string"    }  ]}'
Example Response
{  "status": "string",  "message": "string",  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "grnNumber": "string",    "purchaseOrderId": "84a099d9-2935-4997-a6ac-0d3ee9bbef72",    "vendorId": "e9b57fab-1850-44d4-8499-71fd15c845a0",    "vendorName": "string",    "status": "string",    "receivedDate": "2019-08-24",    "deliveryNoteNumber": "string",    "receivedBy": "string",    "confirmedBy": "string",    "confirmedAt": "2019-08-24T14:15:22Z",    "notes": "string",    "items": [      {        "id": 0,        "itemId": "string",        "itemName": "string",        "receivedQty": 0,        "acceptedQty": 0,        "rejectedQty": 0,        "condition": "string",        "receivingLocationId": "f1f8626b-ea08-4582-99e5-64aabd817e6a",        "receivingLocationName": "string",        "unitCost": 0,        "measuredGrossWeight": 0,        "measuredNetWeight": 0,        "rejectedWeight": 0,        "packWeights": [          0        ],        "expectedWeight": 0,        "variancePct": 0,        "costPerBaseUnit": 0      }    ],    "createdAt": "2019-08-24T14:15:22Z"  }}