Pagination
Cursor-based, opaque tokens. Forward walking. has_more_page ends the walk.
Walking a list
Make an initial request to a list endpoint. The response's page_context tells you whether more pages exist and where to resume:
GET /api/public/v1/invoices?per_page=100
{
"code": 0,
"invoices": [ … 100 rows … ],
"page_context": {
"per_page": 100,
"has_more_page": true,
"next_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNi0wNS0xMlQwODozMDoxNyIsImlkIjoiaW52XzkyOSJ9"
}
}To get the next page, pass that cursor back:
GET /api/public/v1/invoices?per_page=100&cursor=eyJjcmVhdGVkX2F0…Keep walking until has_more_page is false.
Per-page limits
- Default:
50(/salespersonsdefaults to200) - Maximum:
200. A larger value is accepted on/salespersonsbut is capped to 200.
Which lists are cursor-paginated
Cursor pagination (cursor, per_page, page_context.next_cursor) is implemented on these 15 list endpoints, newest first:
/contacts, /items, /taxes, /accounts, /invoices, /bills, /payments, /expenses, /estimates, /credit_notes, /debit_notes, /sales_orders, /purchase_orders, /journals, /salespersons.
Every other list endpoint is not cursor-paginated yet. Sending cursor to them does nothing.
Returned in full, no paging parameters
/branches,/bank_accounts,/cost_centers,/currencies/webhooks,/organizations,/contact-field-packs/invoices/series,/items/templates/partner/organizations,/payroll/ledger-requests
Capped at N rows, with no way to get the next page
These take a size parameter and return only that many rows. There is no cursor, so rows beyond the cap are not reachable; narrow the query with the filters instead.
| Endpoint | Parameter | Default / max | Order |
|---|---|---|---|
/attachments | per_page | 50 / 200 | newest first |
/comments | per_page | 100 / 500 | oldest first |
/recurring | per_page | 50 / 200 | next run first |
/bank_statements | per_page | 50 / 200 | newest first |
/activity and each /{resource}/{id}/activity | limit | 100 / 500 | newest first |
/ai/documents | limit | 25 / 100 | newest first |
/exchange_rates | limit | 200 / 1000 | newest rate date first |
/reports/ledger, /reports/customer_ledger, /reports/vendor_ledger | limit | 5000 / 10000 | chronological |
The list envelope also differs. /attachments, /comments, /recurring, /activity and the lookups return { code, message, <plural>: [...] } with no page_context. /bank_statements, /webhooks, /organizations and /contact-field-packs include a page_context whose has_more_page is always false. /ai/documents and /partner/organizations use { success: true, items: [...] } instead of the standard envelope, /items/templates does the same, /payroll/ledger-requests returns { data: { ledger_requests: [...] } }, and /invoices/series returns { series: [...], branchId }.
/bank_statements applies bank_account_id after the size cap, so a filtered call can return fewer rows than exist.
Cursor opacity
Cursors are base64-encoded keyset pointers (created_at + id). Do not parse or construct them on the client — only pass back what the server sent. Cursors are stable across the page they were issued for; if your data set changes mid-walk, rows added at the top of the order won't appear in subsequent pages of the current walk.