Skip to main content

Rates

Rates are the daily rate and inventory sheet: one rate object per accommodation per calendar date, holding prices, maximum inventory, and stay constraints. Booking availability and pricing derive entirely from this sheet.

The rate object​

{
"id": "0F7p9sGHx2026-12-01T00:00:00.000Z",
"object": "rate",
"accommodation": "0F7p9sGHx",
"date": "2026-12-01",
"prices": {
"accommodation": 5000,
"adult": 1000,
"child": 500,
"infant": 0,
"pet": 250
},
"inventory": { "max": 10, "remaining": 7 },
"stay_constraints": { "min_nights": 2, "max_nights": 14 },
"available": true,
"metadata": {}
}

All prices are minor units. inventory.remaining is live vacancy.

Endpoints​

MethodPathDescription
GET/v1/ratesList — requires from & to (ISO dates), ≤ 366 days; defaults to next 30 days
POST/v1/ratesUpsert one accommodation-night
POST/v1/rates/bulkUpsert a date range for up to 50 accommodations

Upsert one night​

Vacancies are recomputed from existing bookings, so upserts never oversell. If bookings already exceed the new inventory the request fails with validation_failed and an explanation naming the date.

curl -s $API/v1/rates -H "Authorization: Bearer $KEY" \
-H "Idempotency-Key: rate-dec1-super" -H "Content-Type: application/json" \
-d '{"accommodation":"0F7p9sGHx","date":"2026-12-01",
"prices":{"accommodation":5000,"adult":1000,"child":500},
"inventory":{"max":10},"stay_constraints":{"min_nights":2}}'

Bulk upsert a range​

curl -s $API/v1/rates/bulk -H "Authorization: Bearer $KEY" \
-H "Idempotency-Key: winter-rates" -H "Content-Type: application/json" \
-d '{"accommodations":["0F7p9sGHx"],"from":"2026-12-01","to":"2026-12-24",
"prices":{"accommodation":5000},"inventory":{"max":10}}'

The range is inclusive of both endpoints. Validation is all-or-nothing: any night whose bookings exceed the inventory fails the request before anything is written.

Note: recomputation counts bookings arriving on each date (the dashboard rate editor's convention). Nightly booking operations (create/cancel) adjust vacancies per-night on top of this sheet.