Lists and pages
Every list answers one page, in the same envelope:
{
"items": [{ "id": "01J9Z3Q4X5V6W7Y8Z9A0B1C2D3" }],
"next_cursor": "cD0yMDI2LTA5LTI1"
}
itemsholds the rows of the page.next_cursoris the cursor of the next page, ornullon the last page.
Read every page
Send next_cursor back as the cursor query parameter, with the same
filters, until next_cursor is null.
GET /api/companies/{company_id}/invoices/?limit=100
GET /api/companies/{company_id}/invoices/?limit=100&cursor=cD0yMDI2LTA5LTI1
limitsets the page size, from 1 to 200. The default is 50.- A cursor is opaque. Do not build one, and do not keep one for long: use it for the next page only.
- A malformed cursor, or a cursor of another list, gets 400
validation_errorwith the errorinvalid_cursoroncursor. Start again from the first page.
The order
- The lists of the books (invoices, parties, bank transactions, document
records and the others under
/api/companies/{company_id}/) come oldest first, in a fixed order that ends with the id: invoices by invoice date, bank transactions by booking date. - The other lists (organizations, companies, files) come newest first.
Reports are not lists
The reports (trial balance, general ledger, open items, balance sheet, profit and loss, VAT preview) are not paged. Each call returns the whole answer. They are expensive, so they have their own rate limit: see Rate limits.