Skip to main content
If your integration serves data from Stora to end users — unit types on a booking page, prices on a comparison tool, coupon codes in a checkout — you’ll want to avoid fetching everything from the API on every request. The API has rate limits (10 requests per second, 60 per minute), and round trips add latency. Fetch an initial snapshot, use webhooks for ongoing updates, and reconcile periodically to recover missed changes.

How often does data actually change?

Not all resources change at the same rate. Understanding this helps you decide what’s safe to cache and for how long.

Rarely

These typically only change when an operator reconfigures their offering. These are safe to cache for long periods — hours or even a full day — and refresh on a schedule or when you receive a relevant webhook.

On business events

These change when an operator takes a deliberate action, like updating pricing or creating a promotion.
Price changes on unit types and protection levels trigger their respective .updated webhooks. Use these to invalidate cached pricing, including Unit Type live_prices used by booking flows.

Frequently

These change with customer and operational activity — bookings, payments, unit status changes. Cache selectively based on your use case. If you’re building a dashboard that shows unit occupancy across sites, caching unit status and keeping it fresh via webhooks makes sense. If you only read invoices when processing a payment, fetch them at that point instead.

Using webhooks to stay in sync

Webhooks are the primary tool for knowing when data has changed. Rather than polling the API on a timer, subscribe to the events that matter to your integration and react when they fire. For partner apps and developers managing several operator accounts, run this sequence separately for each connected operator. Keep snapshots, checkpoints, resource mappings, and queued events associated with that operator. Follow Syncing multiple operators when adding or reconnecting an operator. Use this sequence to avoid a gap between the initial fetch and webhook subscription:
  1. Subscribe to relevant webhook events. Verify signatures and durably enqueue events before returning 2xx.
  2. Record the sync-start timestamp for each resource type, then fetch all pages of the data you need. Buffer incoming events until the snapshot is stored.
  3. Reconcile buffered events by re-fetching affected resources. Serialise updates per resource so older results cannot overwrite newer data. Retain events that arrive during reconciliation and retry processing failures.
  4. For resources with time-range filters, run a catch-up query from just before the sync-start timestamp. Use overlapping ranges and advance the checkpoint only after all pages and local writes succeed. Follow the polling checkpoint procedure.
  5. Continue processing queued events and schedule periodic reconciliation to recover missed changes.
Webhook payloads include the full resource. You can use them directly if you reject stale updates, because delivery order is not guaranteed. Otherwise, re-fetch the resource. For example, a unit type event includes:
Most resources have webhook events, but not all — sites, products, product categories, contract templates, and staff don’t have webhooks yet. For these, fetch on a schedule. Since they all change rarely, even polling once a day may be enough depending on your use case. For the full list of available events, see the webhooks guide.