Skip to main content
Tesouro REST APIs use cursor-based (keyset) pagination for list endpoints. This approach provides consistent performance regardless of dataset size and eliminates skipped or duplicated rows between pages.

Pagination

Request parameters

ParameterTypeDefaultDescription
limitinteger25Number of records to return per page. Maximum 100.
pagination_tokenstringnullOpaque token from a previous response. When present, use the token exactly as returned — do not combine it with a different limit.

Response shape

Every paginated response returns the same structure:
{
  "data": [ ... ],
  "nextPaginationToken": "eyJ...",
  "prevPaginationToken": "eyJ..."
}
FieldDescription
dataArray of items for the current page.
nextPaginationTokenPass as pagination_token to get the next page. null on the last page.
prevPaginationTokenPass as pagination_token to get the previous page. null on the first page.
Pagination tokens are opaque. Never parse, construct, or modify them — only round-trip them from responses back into requests.

Paginating through results

  1. Make an initial request with limit:
    GET /items?limit=25
    
  2. Use nextPaginationToken from the response for the next page:
    GET /items?pagination_token=eyJ...
    
  3. Continue until nextPaginationToken is null.

Sorting

The Embedded Banking API does not define global sort or order query parameters for list endpoints. Sorting behavior is endpoint-specific:
  • Some endpoints may document their own sorting parameters or fixed sort order in their reference pages.
  • If an endpoint does not document sorting parameters, results are returned in that endpoint’s default order and cannot be re-ordered via query parameters.
Always refer to the individual endpoint documentation to see whether sorting is supported and, if so, which query parameters and fields are available.

Filtering

The Embedded Banking API uses endpoint-specific filter parameters rather than a generic filter syntax. Each list endpoint defines its own supported query parameters for narrowing results. For example, a list endpoint might support:
GET /items?organizationId=YOUR_ORG_ID&limit=25
Refer to the individual endpoint reference to see the exact filter parameters available for each resource.