iotoms Docs

Get agreed rate history

GET
/api/v1/procurement/vendors/{vendorId}/items/{itemId}/price-history

Returns the dated history of agreed purchase rates for one vendor and item. New agreements are added as new entries, never edits, and the entry in effect on asOf is flagged current.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

vendorId*string

ID of the vendor (see List vendors).

Formatuuid
itemId*string

Item code (see List items).

Query Parameters

asOf?string

Date to mark the current entry for, 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 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?

The dated agreed-rate history for this vendor and item.

Example Request
curl -X GET 'https://beta.iotoms.com/api/v1/procurement/vendors/497f6eca-6276-4993-bfeb-53cbbbba6f08/items/string/price-history' \  -H 'X-TenantID: your-tenant-code'
Example Response
{  "status": "string",  "message": "string",  "data": {    "vendorId": "e9b57fab-1850-44d4-8499-71fd15c845a0",    "vendorName": "string",    "itemId": "string",    "itemName": "string",    "entries": [      {        "id": 0,        "unitPrice": 0,        "currency": "string",        "unitOfMeasure": "string",        "uomId": "4df47f00-a69d-4ff2-b50d-4a7649a4b70c",        "taxInclusive": true,        "source": "string",        "sourceDocumentId": "b3193c5c-5cd3-497e-a388-85c453411cad",        "sourceDocumentNumber": "string",        "effectiveFrom": "2019-08-24",        "effectiveTo": "2019-08-24",        "current": true,        "observedAt": "2019-08-24T14:15:22Z",        "createdBy": "string",        "notes": "string"      }    ]  }}