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. The key idea is simple: fetch once, then let webhooks tell you when something 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.

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. The pattern:
  1. Fetch the data you need on startup or first use
  2. Subscribe to relevant webhook events for those resources
  3. When an event arrives, update your local copy using the data in the event payload — or re-fetch from the API if you need expanded relationships
Webhook payloads include the full resource, so in most cases you can update your local data directly without an additional API call:
{
  "event": {
    "type": "unit_type.updated",
    "data": {
      "unit_type": {
        "id": "ut_abc123",
        "name": "50 sq ft Indoor",
        "status": "bookable"
      }
    }
  }
}
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.