Skip to main content
Saoma calls your API to keep your inventory in sync: whenever something changes the availability of a connected venue, Saoma sends every available slot of the affected days, for each of your products mapped to a Saoma treatment. You replace those days on your side. This page describes the request Saoma sends. You implement the endpoint.

Setup

  1. You give Saoma your base URL (one per environment, e.g. staging and production) and a bearer token per environment.
  2. The venue enables the integration in Saoma (Venue › Integrations) and enters its venue id on your platform (e.g. its Staycation hotel ID).
  3. The venue maps each of your products to one Saoma treatment variant. A product = one treatment at one duration (e.g. Body massage 60 min).
As soon as a venue is enabled or a mapping changes, Saoma pushes the next 62 days for that venue.

Request

One request per product. A request carries one or several days.

Path parameters

string
required
The venue’s id on your platform, as entered by the venue in its Saoma integration settings.
string
required
Your product id (e.g. Staycation experience id), as mapped by the venue.

Body

InventoryDate[]
required
The days being replaced.

How to apply it

  • Replace each day you receive: delete every slot you hold for that product on that date, then store the slots of the request. A slot absent from the request is no longer available.
  • Days not in the request are unchanged.
  • Times are the venue’s local wall-clock time. Use the venue’s timezone if you need an absolute instant.
  • Out-of-hours slots (sold with a surcharge in Saoma) are never sent.
  • Saoma may send the same day several times: applying a request twice gives the same result.

When Saoma pushes

Changes are sent within about a minute. Several changes on the same day are merged into one push. The horizon is 62 days, today included.

Responses and retries

Reply with any 2xx status to acknowledge. Saoma waits 10 seconds for your response. Any other status, a timeout or a network error is retried with an increasing delay (1, 2, 4, 8… minutes, capped at 1 hour), up to 10 attempts. After that the day is dropped until the next nightly resync. Every call, inbound or outbound, is logged on the Saoma side for debugging.

Example