Pagination & Ordering

All endpoints return 50 objects by default unless specified otherwise.


Pagination

We use offset-based pagination. You can control the number of returned objects and the page of results using the limit and page query parameters.

For example, the query GET /items?limit=10&page=2returns 10 items starting from the 11th result (i.e. skipping the first 10).

If the query is ordered by creation date descending, pagination would work as follows:

# Request for most recent transactions
GET /transactions?limit=10

# On scroll/next page, you do second request 
GET /transactions?limit=10&page=2

# On scroll/next page, you do third request 
GET /transactions?limit=10&page=3

Ordering

Ordering is done by the unique identifier (e.g. organizationID, transactionID ...). In some cases, ordering is explicitly based on fields (e.g. creation date for list transactions or company name for list organizations). You can find information about our ordering in the description of our endpoints.

Many of our endpoints support the query param sortBy. Additionally, you can specify ascending or descending order by using the sortDirection with the either ASC or DESC value.

GET /cardholders {
	sortBy=name
}

GET /transactions {
	sortBy=creationDate,
  sortDirection=DESC
}