Base Response
Learn how to interpret the shared fields returned by API calls, including metadata, pagination, errors, single resources, and collections.
Use this reference to interpret the shared fields returned by API calls.
{
"meta": {
"timestamp": 1597166699457,
"transactionId": "70169d77-c165-4795-9932-35b8a3af96fb",
"explain": "a descriptive text"
},
"pagination": {
"offset": "5f466c67e047e3293115e2ec",
"limit": 10,
"next": "5f466c67e047e3293115e2ec",
"page": 5,
"pages": 40,
"total": 1000
},
"errors": {
"reason": "failure reason",
"details": [{}]
},
"data": {},
"items": [{}]
}Meta
The meta object contains metadata about the API call.
| Meta | Description |
|---|---|
| timestamp | Unix timestamp that records when the API processed the call. |
| transactionId | Unique identifier for the call. Provide this ID when contacting support about an issue. |
| explain | Descriptive message about the operation or API call. |
Pagination
The optional pagination object is returned by search endpoints and other endpoints that paginate results.
| Pagination | Description |
|---|---|
| offset | Starting position for the current result set. |
| limit | Maximum number of items returned per page. |
| next | Offset to use when requesting the next page of results. |
| page | Number of the current page. |
| pages | Total number of pages, based on the collection size and the requested limit. |
| total | Total number of items in the collection when the API processed the call. |
Errors
The HTTP status code is the primary error indicator. When an endpoint provides more failure context, it can include an errors object.
The errors object is flexible and can contain additional key-value pairs.
| Error | Description |
|---|---|
| reason | Human-readable description of the primary failure reason. |
| details | Additional error details as key-value data. |
Data
The data object contains the resource returned by an endpoint that returns a single item.
Items
The items array contains the resources returned by an endpoint that returns multiple items.
Updated 11 days ago
