Skip to main content
List endpoints in the Cleo Pay API return paginated results so you can retrieve large datasets efficiently without overwhelming your application or the API. All paginated endpoints use a consistent set of query parameters and return a uniform response shape.

Endpoints that support pagination

GET /v1/bank-accounts does not use pagination — it returns all of your bank accounts in a single response, regardless of count.

Query parameters


Response shape

All paginated endpoints return a consistent envelope:
Paginated response envelope
  • items — the array of resource objects for the current page.
  • totalCount — the total number of records matching your query (across all pages). Use this to compute the total number of pages: Math.ceil(totalCount / pageSize).

Basic pagination example

Retrieve the second page of contacts, with 10 contacts per page:
Fetch page 2 with 10 items per page
Paginated contacts response

Search and filter parameters

Combine pagination with search and filter parameters to narrow results.

Contacts (GET /v1/contacts)

Search active payees matching 'acme'

Payables (GET /v1/payables)

List approved payables

Iterate through all pages

When you need to retrieve every record matching a query, loop through pages until you’ve collected totalCount items. Here’s a JavaScript example:
Fetch all contacts (JavaScript)
Use the maximum pageSize of 100 when iterating all pages to minimize the number of API calls and stay well within rate limits.
The same pattern works for any paginated endpoint — just swap the URL and adjust your filters as needed.