Pagination

How we handle pagination

Endpoints which return a list of objects follow a common pagination pattern (with the exception of the /paybales endpoint.

Common Standard: Page Based

The common pagination our endpoints follow is page based.

Request

When making a GET request, you can specify the following query parameters to control the response:

  • page - the page number you want to begin the search from
  • pageSize - the maximum number of objects to be return from the query

For example, the following request would return 50 results, skipping the first 50 on page 1:

GET /settlements?page=2&pageSize=50

Response

In the response there is a meta object which contains the following details:

  • page - the page number you want to begin the search from
  • pageSize - the maximum number of objects to be return from the query
  • total - the total number of objects

The structure of the meta object is:

"meta": {
    "pagination": {
      "page": 2,
      "pageSize": 50,
      "total": 250
    }

🚧

Exception: Payables endpoint (deprecated)

Due to the nature of the data behind the /payables endpoint, it uses cursor-based pagination.