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.

MetaDescription
timestampUnix timestamp that records when the API processed the call.
transactionIdUnique identifier for the call. Provide this ID when contacting support about an issue.
explainDescriptive message about the operation or API call.

Pagination

The optional pagination object is returned by search endpoints and other endpoints that paginate results.

PaginationDescription
offsetStarting position for the current result set.
limitMaximum number of items returned per page.
nextOffset to use when requesting the next page of results.
pageNumber of the current page.
pagesTotal number of pages, based on the collection size and the requested limit.
totalTotal 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.

ErrorDescription
reasonHuman-readable description of the primary failure reason.
detailsAdditional 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.