For every read command that is served over our API you can use extensive filters and sorting by sending a specific payload in the request header.

Pagination

The default and maximum value of items per page is 100. If you want to reduce the number of returned items you can set a different limit.

We use cursor-based pagination. Here is a step-by-step example workflow of how you can skip through pages:

  1. Request an initial page of all offers e.g. call ListOffers
  2. Get records back, where e.g. the last record has offer_id: 980 and at the end of the return object field has_more is true
  3. In order to get the next page use the offer_id: 980 as cursor, i.e. ListOffers{"pagination":{"starting_after":980}}
  4. Get other records back, where the last record has offer_id: 1204 and check if has_more field is still true
  5. To continue paginating forward go to step 3. but now set offer_id: 1204 as cursor value
  6. End if has_more is false

Use starting_after to navigate forward and ending_before to navigate backward. Never use both starting_after and ending_before together.

{
  "pagination": {
    "limit": 50,
    "starting_after": "980"
  }
}

Sorting

There are several options to sort the items in the response body. You can order them in an ascending (ASC) or descending (DESC) way and you can sort them by different arguments, like ID, creation date, or currency to name a few.

Filters

Every read command offers a variety of filter options. Within each service, different filter options are available: