Every list endpoint in the BlooBank API uses cursor-based pagination with opaque tokens. This page gives the mental model; for the exact request/response contract, see the Pagination reference.Documentation Index
Fetch the complete documentation index at: https://developers.bloobank.com/llms.txt
Use this file to discover all available pages before exploring further.
The mental model
Think of pagination as a cursor over a stable result set:- Your first request defines the cursor by supplying
filter,order_by, andpage_size. - The server returns a page of items plus a
nextPageToken— a sealed envelope describing where the cursor stopped. - On the next call, you hand that envelope back as
page_token. The server resumes the cursor. - When the server runs out of items,
nextPageTokenisnull. You stop.
- The pagination protocol version
- An expiration timestamp (typically 48 hours)
- A fingerprint of
filter+order_by(so you cannot mix-and-match across iterations) - The cursor position
Why not offset-based?
Offset-based pagination (?offset=100&limit=20) is intuitive but breaks at scale:
| Problem | Effect |
|---|---|
| Drift on insert | A new row inserted between page 1 and page 2 shifts every subsequent page, causing items to appear twice. |
| Drift on delete | A row deleted between pages causes items to be skipped. |
| Cost grows with offset | The database must scan offset rows to skip them — fast for the first page, slow for page 1000. |
When to paginate
| Use case | page_size recommendation |
|---|---|
| Interactive UI (table view) | 10–25 |
| Background reconciliation job | 50–100 |
| Full-collection export | 100 (the maximum) |
100. Exceeding it does not error — the value is silently coerced down.
The shape of a list response
Every list endpoint returns this envelope:nextPageToken is explicitly null (not omitted, not empty string). That is your single signal for end-of-iteration.
The “iterate until null” pattern
null.
What you must keep stable across pages
Across calls within a single iteration, you must keep these identical:filterorder_by- The endpoint URL
INVALID_PAGE_TOKEN (HTTP 400). The token is bound to the query context.
You may change:
page_size(the server honors the new value)
When tokens expire
Tokens live ~48 hours. If a user pauses an iteration and resumes a day later, you might still be within the window. If they resume a week later, the token will returnINVALID_PAGE_TOKEN.
Handle this gracefully:
filter and order_by are unchanged, so you will re-traverse from the start. For idempotent consumers (using idempotencyKey or upserts), re-traversal is harmless.
Reference
Pagination — full reference contract
Request parameters, response shape, errors, URL encoding.