iotoms Docs

Get rate history for a party and item

GET
/api/v1/pricing/history

Returns the rate a new document dated today would get, plus the most recent rates seen on documents (purchase orders and costed goods receipts for suppliers, sales invoices for customers) for a role, partyId and itemId, newest first. uomId only sets the unit today's rate is resolved for (omit it for the item's base unit); it does not filter the observed rates. limit caps the observed rates at 1 to 50 (default 10).

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Query Parameters

role*string

SUPPLIER or CUSTOMER

Value in"SUPPLIER""CUSTOMER"
partyId*string

vendors.id for SUPPLIER, customers.customer_number for CUSTOMER

itemId*string

Item code to get the rate history for (see List items). Required.

uomId?string

Part of the key. Omit for the item's base unit.

Formatuuid
limit?integer

Maximum number of recent document rates to return, 1 to 50. Defaults to 10.

Formatint32
Default10

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 was processed; otherwise an error status.

message*string

Short human-readable message describing the outcome, e.g. which record was saved or why the call failed.

data?

Today's expected rate and the most recent rates seen on documents.

Example Request
curl -X GET 'https://beta.iotoms.com/api/v1/pricing/history?role=SUPPLIER&partyId=string&itemId=string' \  -H 'X-TenantID: your-tenant-code'
Example Response
{  "status": "string",  "message": "string",  "data": {    "partyRole": "SUPPLIER",    "partyId": "string",    "itemId": "string",    "itemName": "string",    "resolvedToday": {      "lineRef": "string",      "itemId": "string",      "resolvedRate": 0,      "source": "AGREEMENT",      "sourceRef": "string",      "sourceObservedOn": "2019-08-24",      "uomId": "4df47f00-a69d-4ff2-b50d-4a7649a4b70c",      "unitOfMeasure": "string",      "currencyCode": "string",      "taxInclusive": true,      "comparable": true,      "reason": "UNIT_MISMATCH",      "lapsedRate": 0,      "lapsedTo": "2019-08-24",      "sourceLabel": "string"    },    "observations": [      {        "observedOn": "2019-08-24",        "unitRate": 0,        "uomId": "4df47f00-a69d-4ff2-b50d-4a7649a4b70c",        "uomCode": "string",        "currencyCode": "string",        "documentType": "PURCHASE_ORDER",        "documentId": "string",        "documentNumber": "string"      }    ]  }}