Skip to main content
List endpoints return one page at a time and use cursor-based pagination: instead of numbered pages, each page carries an opaque pointer (a cursor) to the item where the next or previous page starts. This lets you walk large data sets without duplicating or missing results, and keeps the API fast and stable.

How it works

Every paginated response carries a metadata object with two cursors and one flag:
  • after: points to the next page; null on the last page.
  • before: points to the previous page; null on the first page.
  • has_more: whether a next page exists.
Pass after or before as a query parameter of the next request to move forward or backward. They are mutually exclusive: send only one of them per request. Endpoints that accept a limit query parameter return 50 records per page by default and at most 100. Document listings are also bounded in time: GET /v2/documents/in, GET /v2/documents/out and the refund listings require from_datetime and to_datetime, so a page is always taken from the period you ask for.

Example

All examples use the sandbox base URL https://api.sandbox.trio.com.br. The metadata of a paginated response looks like this:
To fetch the next page, repeat the request with the after cursor:
Coming from V1? V1 named the flag has_next. On V2 it is has_more.

Next steps