Paging and incremental sync
developers-paginationOn this page
Page through lists newest first, or use sync mode with updated_since and a cursor to keep your own copy of the data up to date.
Every list (/customers, /contacts, /jobs, /visits, /invoices, /estimates, /payments, /credit-notes) has two modes.
| Compare | Offset mode (default) | Sync mode |
|---|---|---|
| Use it to | Show or browse a page of records | Keep a copy of the data up to date |
| Turned on by | no updated_since and no cursor | updated_since or cursor |
| Order | newest first | oldest change first |
| Paging | page and per_page | cursor |
meta | page, per_page, total | per_page, has_more, next_cursor |
per_page is 1 to 100 (25 by default). Filters such as job_id, customer_id, invoice_id and status work in both modes.
Page through records in offset mode
GET /api/v1/invoices?status=paid&page=2&per_page=50
If records are created while you page, a later page can repeat or skip one. That's what sync mode is for.
Incremental sync: what's updated since a date
For an incremental sync of only what changed, use sync mode: call a list with updated_since.
GET /api/v1/invoices?updated_since=2026-11-01T00:00:00Z
updated_sinceis an ISO 8601 date or timestamp. A bare date means midnight UTC.- Rows come oldest change first.
- Pass
meta.next_cursorback ascursorto carry on after the last row. Don't build or change a cursor yourself. has_more: falsemeans you're caught up.
Keep polling with the cursor
- First run: call with
updated_since(use1970-01-01for everything) and page withcursoruntilhas_moreis false. Store the lastnext_cursor. - Later: call with
cursor=<stored>. You get only what changed since. If nothing did,datais empty and you get the same cursor back.
let cursor = await loadCursor(); // null the first time
for (;;) {
const qs = cursor ? `cursor=${cursor}` : "updated_since=1970-01-01";
const res = await api(`/invoices?${qs}&per_page=100`);
for (const invoice of res.data) await upsert(invoice); // idempotent by id
cursor = res.meta.next_cursor ?? cursor;
await saveCursor(cursor);
if (!res.meta.has_more) break;
}
A change appears in sync mode a few seconds after it's saved: rows are listed once they're at least 5 seconds old. Upsert by id, because a row can come back again if it changes again.
Conditional requests
Every GET that returns 200 carries an ETag header (and Cache-Control: private, no-cache). Keep the tag with the copy you saved, and send it back as If-None-Match the next time you ask for the same thing:
- If nothing changed, you get
304 Not Modifiedwith no body. Keep using your copy. - If anything changed, you get a normal
200with the new body and a newETag.
GET /api/v1/job-lookups
Authorization: Bearer <token>
If-None-Match: "1c1f0c9d6f4b2a8e9d3c7b5a4e2f1d0c"
HTTP/1.1 304 Not Modified
ETag: "1c1f0c9d6f4b2a8e9d3c7b5a4e2f1d0c"
- A tag belongs to one URL and query string: another page, filter or
cursoris a different response with its own tag. Tags are also per organisation. - A
304counts towards the rate limits like any request. It saves the download, not the call. - Only reads are tagged. Writes, errors and the token endpoint never carry an
ETag, andIf-None-Matchhas no effect on them.
Which records are listed
- Customers, contacts, jobs, visits, invoices and estimates: archived records are left out.
- Payments: voided payments are included, with
voided_atset. - Credit notes: archived credit notes are included, with
archived_atset, because their credit still applies.