iotoms Docs

Get purchases by vendor

GET
/api/v1/reports/procurement/by-vendor

For each vendor with purchase orders or goods receipts between from and to (both default to today), returns order count and value, receipt count, and accepted and rejected quantities, largest ordered value first.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Query Parameters

from?string

ISO date (YYYY-MM-DD), defaults to today

Formatdate
to?string

ISO date (YYYY-MM-DD), defaults to today

Formatdate

Header Parameters

X-TenantID*string

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

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?array<>|

One row per vendor with activity in the date range, largest ordered value first.

Example Request
curl -X GET 'https://beta.iotoms.com/api/v1/reports/procurement/by-vendor' \  -H 'X-TenantID: your-tenant-code'
Example Response
{  "status": "string",  "message": "string",  "data": [    {      "vendorId": "string",      "vendorCode": "string",      "vendorName": "string",      "poCount": 0,      "totalOrdered": 0,      "grnCount": 0,      "totalReceived": 0,      "rejectedQty": 0    }  ]}