Skip to main content
All responses from the Turris API follow a consistent structure to facilitate integration and debugging.

Top-Level Structure

Every response, successful or not, carries a requestId and a timestamp. Quote the requestId when contacting support: it is how we find your exact request in our logs. Successful payloads are wrapped in a data object. Errors are not — their fields sit at the top level.
A success response carries no statusCode field. Read the status from the HTTP status line. Error responses do carry one, mirroring the HTTP status — the asymmetry is historical, and both shapes are shown below.

Date Format

All date and timestamp fields are returned in ISO 8601 format:
This is consistent with standard MongoDB date representations.

Identifier Format

All unique identifiers (e.g., downstreamEntityId, agentId, policyId) are returned as MongoDB ObjectId strings:

Request Headers

Required Headers

Alternative Authentication

Optional Headers

Success Responses

The payload is under data. What sits inside it is per endpoint; the record below is only illustrative.
A paginated list puts the page envelope inside data rather than beside it, so the outer shape never changes:
Every agency list is paginated. On the carrier surface only one endpoint is, policy transactions, and it keys its array on transactions rather than items. See Pagination.

Error Responses

Errors are not wrapped in data. For detail, see Error Handling.
Two things to code against rather than guess:
  • errorMessage is always an array of strings, even for a single error. A validation failure returns one entry per field.
  • Branch on errorType, never on the message text. The messages are prose and may be reworded; the codes are a published enum, listed on every endpoint’s error schema.

HTTP Status Codes