Skip to content

Pull only what changed ​

To keep your own copy of bookings or reviews up to date, don't download everything every time. Send updated_since and you get only the rows that changed at or after that moment.

Works on bookings and reviews. On calendar and earnings it's a 400 with updated_since_not_supported, rather than being quietly ignored.

The value ​

Either of these:

  • an ISO 8601 instant, such as 2026-09-17T04:00:00Z or 2026-09-17T14:00:00+10:00
  • a plain date, YYYY-MM-DD, which means midnight UTC on that date

What counts as a change ​

DatasetChanges
BookingsA new booking, any edit to it, and a cancellation
ReviewsA new review, your reply, and hiding or showing it

The loop ​

  1. On the first run, fetch without updated_since and store every row by its id (booking_id or review_id).
  2. Keep the response's generated_at.
  3. Next time, send that generated_at, minus one minute, as updated_since. Insert or replace each row you get by its id.
  4. Keep the new generated_at, and repeat.

The minute of overlap matters. generated_at is stamped just after the data is read, so a change saved in that split second could otherwise fall between two calls. Going back a minute catches it, and the rows you already had simply replace themselves.

sh
curl -H "Authorization: Bearer hpk_your_key_here" \
  "https://ntnzabbhtivotmfhwdnm.supabase.co/functions/v1/data-api/v1/bookings?updated_since=2026-09-17T04:00:00Z&to=2028-01-01"

The date window still applies

updated_since narrows the rows inside from and to. It doesn't widen them. The default to for bookings is 6 months ahead, so a change to a stay further out is missed unless you send a later to, as in the example above.

A cancelled booking comes back with status set to cancelled, so you won't miss a cancellation.

A row that's deleted rather than changed simply stops appearing, and updated_since can't tell you about it. That happens when a booking you added by hand is deleted, or when a whole listing is deleted. A full fetch now and then, say once a week, catches those.

If you want to hear about new bookings and cancellations as they happen instead of asking, use a webhook.