Pagination and sync
Cursors
Every list takes limit (1 to 100, default 50) and returns:
{ "object": "list", "data": [ ... ], "nextCursor": "eyJ2Ijox…" }
Send nextCursor back as cursor, with the same filters, until it is null. Cursors are signed: changing one, or using it with other filters or another business, gets 400 invalid_input. A cursor expires after 24 hours.
Incremental sync
GET /api/v1/bookings and GET /api/v1/customers accept updatedSince. They then return everything changed since that time, oldest change first, including changes made by guests, by Clearslot's own jobs and in the dashboard.
- Store the time your sync starts.
- List with
updatedSinceset to the previous sync's start, minus a minute,
and page through every result.
- Upsert by
id. The overlap means you may see a record twice.
Bookings that are still waiting for the guest's email confirmation, or for an online payment, are not listed until they become real bookings.