All "list" endpoints are paginated with options_* query parameters, but the defaults and limits differ per endpoint. Always check the endpoint page; this is the summary:
| Endpoint | First page | Default page size | Maximum page size | Default order | options_sortOrder values |
|---|---|---|---|---|---|
GET /invoices/issued | 0 | 10 | no practical cap; responses with more than 1729 results are gzip-compressed when Accept-Encoding: gzip is sent | DATE, ascending | ASC, DESC |
GET /invoices/received | 0 | 10 | 1000 (larger values are silently capped). Pages over ~500 may exceed the 6 MB response limit and return 502; the endpoint also takes 10–25 s for organizations with thousands of invoices regardless of page size, and returns 502 if it exceeds 29 s (retry) | unsorted | ASC, DESC |
GET /customers | cursor: options_nextToken | — | — | — | ASC, DESC |
GET /accounts-payable/prepaid-expenses | 1 | 20 | 1000 (out-of-range values fall back to 20, without error) | creation date, descending | asc, desc (lowercase) |
GET /accounts-payable/prepaid-expenses/{id} | 1 (paginates assignedDocuments) | 20 | 100 (out-of-range values fall back to 20) | — | — |
Parameters
options_page
Page number. Zero-based for invoices, one-based for prepaid expenses. Not used by GET /customers. Send integers only: on the prepaid-expense detail endpoint 0 returns an empty page and negative or decimal values return arbitrary slices.
options_pageSize
Page size. See the table for defaults and limits.
options_sortBy
Sort field, defined by each endpoint (for example NUMBER, DATE, DUE_BY, AMOUNT for invoices). Not supported by GET /customers (responds 400).
options_sortOrder
Sort direction. ASC / DESC for invoices and customers; lowercase asc / desc for prepaid expenses.
options_nextToken
Cursor for GET /customers only. Take the nextToken value of the previous response and send it back; nextToken is null on the last page.
Response envelope
Invoice and prepaid-expense lists respond with:
{
"total": 3132,
"page": 0,
"pageSize": 10,
"pageResults": [],
"errors": []
}GET /customers responds with { "data": [], "errors": [], "nextToken": "..." }.
