Skip to content

Pagination ​

Endpoints that return lists (for example Get all products or Get all licenses) are paginated, and most can also be filtered and sorted. Each list endpoint's reference shows which of these query parameters it accepts.

Pages ​

ParameterDefaultDescription
pageSizeAll itemsNumber of items per page.
pageNumber0Zero-based index of the page to return.

WARNING

If you omit pageSize, the endpoint returns every item in one response. That's convenient while exploring the API, but for production code, always set a pageSize (for example 50) so that response times stay predictable as your data grows.

Paginated responses wrap the items in data and describe the page in pagination:

http
GET /v1/products?pageSize=2&pageNumber=0
json
{
  "data": [
    { "id": "4467c06f-014b-559c-bf05-9aab22bdab39", "name": "LicensingFlix", "deactivated": false },
    { "id": "9d2f6c1a-7b3e-5f40-8a1c-2e6d4b8f0a13", "name": "LicensingMusic", "deactivated": false }
  ],
  "pagination": {
    "itemCount": 5,
    "totalPages": 3,
    "currentPage": 0,
    "nextPage": 1,
    "previousPage": null
  }
}
FieldDescription
itemCountTotal number of items across all pages (after filtering).
totalPagesNumber of pages. 1 when pageSize is omitted.
currentPageThe pageNumber you requested.
nextPageIndex of the next page, or null on the last page.
previousPageIndex of the previous page, or null on the first page.

To fetch everything, start at pageNumber=0 and keep requesting nextPage until it's null.

Filtering ​

Filter with search[<field>]=<value>, using the field names of the objects in data. Matching is a case-insensitive "contains" match, and multiple filters must all match:

http
GET /v1/plans?search[name]=prem
GET /v1/customers?search[name]=jane&search[externalId]=cus_

Get all licenses supports these filters:

FilterMatch
search[key]Exact license key
search[customer.externalId]Exact customer external ID
search[customer.name]Contains, case-insensitive
search[plan.name]Contains, case-insensitive

It also has dedicated query parameters (productId, customerId, customerExternalId, hideInvalid), described in its reference.

Sorting ​

Sort with sort_by=<field>.<asc|desc>. Repeat sort_by to sort by several fields, in order:

http
GET /v1/customers?sort_by=name.asc
GET /v1/plans?sort_by=deactivated.asc&sort_by=name.asc

Nested fields use dots, for example sort_by=plan.name.desc.

Get all licenses can be sorted by registrationDate, expirationDate, plan.name, and plan.product.name. Other fields are ignored.