Request parameters
Response shape
Every list response is shaped:page_size
You may change
page_size between pages without invalidating a token.
page_token
page_token is a pagination cursor generated by the server. Clients must treat it as fully opaque.
What it encodes (conceptually)
- The pagination protocol version
- Issuance and expiration timestamps
- A fingerprint of the original query context (
filterandorder_by) - The cursor position corresponding to the last item of the previous page
Guarantees
- Bound to query context. Using a token with a different
filterororder_by(or against a different endpoint) returnsINVALID_PAGE_TOKEN. - Bounded lifetime. Tokens expire — typically within 48 hours. Expired tokens return
INVALID_PAGE_TOKEN. Restart pagination from the beginning when this happens. - Tokens do not grant authorization. Every paginated request is authorized independently.
Rules
Parameter stability across pages
When usingpage_token, all request parameters must match the original request, with one exception.
Inconsistent requests fail with
INVALID_PAGE_TOKEN (HTTP 400).
order_by
The order_by parameter is a comma-separated list of ordering expressions.
Syntax
- Ascending is the default:
field - Descending uses the
descsuffix:field desc - Whitespace is ignored.
- Ordering applies left-to-right.
Examples
Field restrictions
Ordering fields are explicitly whitelisted by each endpoint. The allowed fields are documented per endpoint (e.g., wallets list allowscreatedAt).
Stable tie-breaking
When multiple items share the ordering values you specified, the service appends an internal tie-breaker (typically the resource id) so pagination is deterministic. Clients must not rely on the presence, name, or direction of the tie-breaker.URL encoding
Query parameters travel through URLs and must follow RFC 3986.- Spaces →
%20 >→%3E,<→%3C,=→%3D,,→%2C
End-of-collection
When no more results exist:nextPageTokenisnull(not omitted, not empty string — explicitlynull).- Clients should treat
nextPageToken === nullas end-of-collection.
Errors
See Errors for the full envelope contract.
End-to-end example
Page 1 — request:filter and order_by, different page_size, with token):
Client best practices
- Treat
page_tokenas opaque — do not parse, encode, or persist alongside business state. - Keep
filterandorder_bystable across pages of the same iteration. - Tune
page_sizeto the consumer — small (10–25) for interactive UIs; large (up to 100) for batch jobs. - Iterate until
nextPageTokenisnull— that is the only end-of-collection signal. - Restart on
INVALID_PAGE_TOKEN— tokens expire; restart pagination from the beginning if the user resumes hours later.
Next
Pagination concepts
The mental model behind cursor pagination, when to paginate.
Ordering concepts
How to choose stable ordering fields.