Versioning

We support path-based and header-based versioning. In the event that they conflict, path-based versioning will prevail.

Wrapped Responses

All responses return an object with status, code, and data fields.
4xx & 5xx responses also return a message field.

{
  "status": "success",
  "code": 200,
  "data": { ... }
}

Pagination

All lists are returned as an array of items, with a pagination object and _links that follow the HAL linking strategy.

{
  "status": "success",
  "code": 200,
  "data": {
    "items": [
      { ... },
      { ... }
    ],
    "pagination": {
      "total_items_count": 29,
      "total_pages": 2,
      "current_page": 1,
      "items_per_page": 20
    },
    "_links": {
      "self": {
        "href": "/v1/orders?page=1&limit=20"
      },
      "first": {
        "href": "/v1/orders?page=1&limit=20"
      },
      "last": {
        "href": "/v1/orders?page=2&limit=20"
      },
      "prev": {
        "href": "/v1/orders?page=1&limit=20"
      },
      "next": {
        "href": "/v1/orders?page=2&limit=20"
      }
    }
  }
}

Query Parameters

All GET MANY routes support the following query parameters:

NameDescription
pageThe page number you want to retrieve from the paginated results
limitThe maximum number of records to return per page
qA search term to filter results by matching text
sortA comma-separated list of fields to sort the results by
includeA urlencoded list of related objects to include with expanded data (defaults to 1 level deep)
filtersA urlencoded list of field criteria to filter the results by