Getting started
Paging and syncing
GET /trips, /contacts and /payments are paged: up to 200 objects per page, 50 by default, oldest change first. A trip's options, travellers and payments come back whole, in one response.
Reading every page
Every list returns object, data and next_cursor. On a paged list, pass next_cursor as cursor to read the next page, until it is null, and keep the other parameters the same: changing a filter while you follow a cursor changes the result set and can skip objects. Use limit to choose the page size, from 1 to 200. On the lists that come back whole, next_cursor is always null.
Keeping a copy in sync
Store the updated_at of the last object you read and send it as updated_since next time. Because the order is oldest change first, an object that changes while you read moves to the end and is read again. A change is never skipped.
updated_since includes the instant you pass, so the last object of one sync comes back again in the next, possibly after others with the same updated_at. Deduplicate by id.Deletions
updated_since shows objects that were created or changed. It cannot show one that was deleted: it is simply no longer in the list. To catch deletions, compare your copy with a full read from time to time.