Skip to main content

Endpoints

MethodPathDescription
GET/v1/products/:id/accommodations/setsList accommodation sets for a product.
POST/v1/products/:id/accommodations/setsCreate an accommodation set.
PATCH/v1/products/:id/accommodations/sets/:setIdUpdate an accommodation set.
DELETE/v1/products/:id/accommodations/sets/:setIdDelete an accommodation set.
GET/v1/products/:id/accommodations/sets/:setId/itemsList candidate items in a set.
POST/v1/products/:id/accommodations/sets/:setId/itemsCreate a candidate item.
PATCH/v1/products/:id/accommodations/sets/:setId/items/:itemIdUpdate a candidate item.
DELETE/v1/products/:id/accommodations/sets/:setId/items/:itemIdDelete a candidate item.
Read endpoints require products:read; mutations require products:write. All routes are scoped to the current workspace and rely on Upstash Redis for caching alongside Postgres persistence.

Key concepts

  • Accommodation sets group candidate properties/room types per product. Sets can use different selection_strategy values (e.g., priority order).
  • Candidate items hold references to property products, property IDs, room types, rate plans, and pricing metadata used by the booking wizard.
  • Candidate priorities determine the ordering of fallback selections when multiple accommodations are available.
  • Payload schemas live in @workspace/types (createAccommodationSetSchema, updateAccommodationSetSchema, createAccommodationSetItemSchema).