Before you start
Use a token withpublic.protection_level:read to list protection levels. Base-price updates require public.protection_level:write. Order and deal changes require their respective write scopes.
Identify any global protection IDs in your configuration, local cache, or order-building code. Keep historical references separate from the catalogue you use for new selections.
Step 1: Refresh your protection catalogue
List the current site-scoped levels:site_scoped=true migration parameter. Remove it from requests that still send it.
To list levels for a specific site, use site_id:
Read the site relationship
A site level identifies its site in thesite field. For example:
public.site:read.
Step 2: Select protection for the order’s site
Resolve the site before selecting a protection level. Use an ID returned for that site, not a stored global ID or a level from another site. For example, an order’s protection line item references a level belonging to the same site:422 Unprocessable Content with an item-not-found error.
For deals, select protection belonging to the deal’s site. Creating a deal or resubmitting protection in a deal update with a global or wrong-site ID returns 404 Not Found.
Step 3: Update base-price requests
Use the site level’s ID when you change base prices:{id} with the site-scoped protection ID. A global ID returns 409 Conflict with this message:
Step 4: Preserve historical references
Existing orders, deals, and subscriptions can still reference global protection levels. Do not replace those stored references merely to refresh your catalogue for new selections. You can still retrieve an individual global level by ID:site: null. It does not appear in the protection-level collection.
For existing orders, unrelated updates preserve historical global references. You can also update an existing protection line item’s price without changing its referenced level. Adding a new protection line item still requires a same-site level.
For existing deals, unrelated updates preserve historical global references. If you resubmit the protection selection, use a same-site level instead of the global ID.
Step 5: Update webhook handling
The event names are unchanged:site relationship to update the correct local record. Do not treat a price change at one site as an update to every site’s levels.
After updating your handler, refresh the site-scoped catalogue to reconcile any global records cached before the migration. Follow the data synchronisation guidance to retain events during the refresh.
Verify your integration
Before deploying your changes, check the following behavior:- Your catalogue contains site-scoped IDs and retains their site relationships.
- New order and deal protection selections belong to the selected site.
- New selections do not reuse global IDs from historical records.
- Base-price requests use site-level IDs.
- Historical global references remain readable and are not rewritten by unrelated updates.
- Protection webhooks update the affected site’s record.
Getting help
Email api_support@stora.co with your account name and the requests you need help updating.Booking flow
Use site-level protection in an order.
Webhooks
Configure and verify protection event deliveries.