iotoms Docs

Get purchase order summary

GET
/api/v1/reports/procurement/po-summary

Returns purchase orders whose order date falls between from and to (YYYY-MM-DD, both default to today), most recently created first, with total value, counts per status and each status's share of value. from after to is rejected.

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?

Purchase order totals, status counts and the individual orders for the date range.

Example Request
curl -X GET 'https://beta.iotoms.com/api/v1/reports/procurement/po-summary' \  -H 'X-TenantID: your-tenant-code'
Example Response
{  "status": "string",  "message": "string",  "data": {    "tenantId": "string",    "from": "2019-08-24",    "to": "2019-08-24",    "totalOrders": 0,    "totalValue": 0,    "draftCount": 0,    "approvedCount": 0,    "receivedCount": 0,    "cancelledCount": 0,    "statusBreakdown": [      {        "status": "string",        "count": 0,        "value": 0,        "pctOfValue": 0      }    ],    "entries": [      {        "poId": "string",        "poNumber": "string",        "vendorId": "string",        "vendorName": "string",        "status": "string",        "orderDate": "2019-08-24",        "expectedDeliveryDate": "2019-08-24",        "totalAmount": 0,        "createdBy": "string",        "approvedBy": "string"      }    ]  }}