Response envelope
Every paginated list response wraps results in a consistent envelope:The current page of results. May be an empty array when no records match the filters.
An opaque, base64url-encoded token. Pass this value as the
cursor query parameter in your next request to retrieve the following page. null when there are no more pages.true if additional pages exist beyond the current one. Equivalent to next_cursor !== null. When has_more is false, you have retrieved all matching records.Request parameters
Opaque pagination cursor from a previous response’s
next_cursor field. Omit this parameter to fetch the first page. Do not attempt to construct or parse cursors manually — treat them as opaque strings.Number of records to return per page. Minimum
1, maximum 500. The default for most endpoints is 50, but check each endpoint’s documentation for its specific default.How cursors work
Internally, a cursor encodes a(date, id) pair that lets the database resume from the exact position where the previous page ended. This is why cursor pagination only works with the default date sort — if you switch to sorting by amount or name, pagination is not supported and you must fetch all results in a single request (using a high limit).
If you provide a cursor that is malformed or refers to a record that no longer exists, the API returns a 400 error with code INVALID_CURSOR. In that case, restart pagination from the first page.
Fetching all pages
To retrieve every record matching a set of filters, keep fetching pages untilhas_more is false:
Tips
- Use the maximum
limitof 500 when you need to export all data — fewer round trips means faster completion. - Do not cache cursors across sessions. Cursors may become invalid after schema migrations or server restarts. Always start fresh from the first page in new sessions.
- Filters must be consistent across pages. If you change filter parameters mid-pagination (for example, changing
start_date), the cursor will produce incorrect results or a400error. Keep all parameters constant and only changecursorbetween requests. - The
/transactions/countendpoint lets you know how many records a filter returns before you begin paginating — useful for progress tracking in long exports.