Bookings
Create Booking
Create an idempotent hotel booking from a successful Unifystays prebooking response.
POST
Create a booking only after a successful
Prebook a Room response. This endpoint is
idempotent and requires an
Never generate another key for an uncertain retry. A new key represents a new
attempt and can result in a second reservation.
Idempotency-Key header for every request.
Request Example
Idempotency Rules
Generate one unique key for one customer booking attempt. Persist it before
the request. On a network timeout or unreadable response, retry with the
same key and identical request body.
Build the Booking Body
- Send
unifystays_prebooking_idfrom the prebook response. - Send rooms in the same count and order returned by prebook.
- Use each prebook
room_refto attach the correct guests to that room. - Include every required guest field from the OpenAPI contract.
- Supply document fields such as
panorpassportwhen the prebook result indicates the supplier requires them.
Track the Outcome
The response contains a stablebooking_id and unified status. Use
Get Booking Status as the source of truth
after the request returns.
Use
is_terminal from the status response when deciding whether to stop
polling rather than relying only on a status name.
The OpenAPI section below documents all booking fields, guest structures,
document fields, response statuses, and errors.Authorizations
Environment-specific API key created in the Unifystays portal
Headers
Unique key per booking attempt from client. Reusing the same key with same payload returns the same booking object.
Body
application/json