iotoms Docs

Requests, responses and errors

The response envelope, error codes, paging, and how dates, IDs and money are formatted.

Requests

Send JSON bodies with Content-Type: application/json. Every request also carries the two headers described in Authentication.

Response envelope

Most successful responses wrap the result in one envelope — read your data from data:

{
  "status": "…",
  "message": "Request was successful",
  "data": { }
}

message is a human-readable note; build your logic on the HTTP status code and on data, not on the message text.

A few endpoints return the record directly, without the envelope — for example login (see Authentication) and the item endpoints. Each endpoint's Response Body shows exactly which shape it returns.

Errors

Errors use the HTTP status code plus a short body:

{
  "status": "…",
  "message": "What went wrong, in plain words"
}
StatusMeaningTypical cause
400Validation or malformed requestA required field is missing or a value has the wrong format
401Missing or invalid tokenLog in again — see Authentication
403Feature not enabled for the caller's roleSee Permissions
404Record not found in this tenantWrong ID, or an ID from another tenant
409Conflict with existing dataA duplicate code, or the record changed state already
422Request understood but cannot be processedA business rule blocks it, for example a closed period

Show message to your own users or log it — it says which rule failed.

Paging

List endpoints that can return many records are paged with two query parameters:

ParameterMeaning
pagePage number, starting at 0
sizeRecords per page (each endpoint shows its default)

A paged data contains the records in content plus paging details:

{
  "content": [ ],
  "page": 0,
  "size": 20,
  "totalElements": 134,
  "totalPages": 7,
  "last": false
}

Keep requesting the next page until last is true. Some endpoints nest the paging details under a page object instead (size, number, totalElements, totalPages) — each endpoint's response schema shows which shape it uses.

Data formats

KindFormatExample
DateYYYY-MM-DD2026-10-18
Date and timeISO 8601 with time zone2026-10-18T09:30:00Z
IDsUUID for most records; some record types use whole numbers3d07c219-0a88-45be-9cf6-…
MoneyDecimal number in the merchant's currency249.50
Money in minor unitsFields ending in Cents or Minor hold whole minor units24950 = 249.50

Date-range filters (from, to) take dates in YYYY-MM-DD; each endpoint notes its default range.