Create booking
Bookings
Create one or more bookings for a property in a single call. Every entry of rooms becomes its own booking, so a request for a double and a single creates two bookings and the response carries two ids, in the same order as they were sent. Availability is checked before the bookings are written: if any of the requested rooms is not available for the date range, the whole request is rejected with 409 roomsNotAvailable and nothing is created. The one exception is a booking that says where it was already sold — settings.otaId or settings.locator sent: it is not checked and is written even over a full night, because refusing it would lose a sale that already happened elsewhere; the overbooking is left to the property. Room types and their ids come from GET /api/rooms/{pcode}/types, and availability from GET /api/v2/rooms/{pcode}/availability. Send an Idempotency-Key header to make retries safe: if the answer is lost (a timeout, a dropped connection), repeating the same request with the same key never creates the bookings twice — it answers 409 creationInProgress while the first request is still running and the same ids once it has finished. Reusing a key with a different body answers 422 idempotencyKeyReused. When the bookings could not be stored and none was created, the answer is 409 legacyWriteFailed with fault: dependency: the same request may be sent again, except that a holder company sent as new was already created, so it has to be sent as an existing one.
Console
Runs against the API from your browser, with the same request your server will send.
Environment
Production
https://uni-api.hotelgest.com
Calls hit live data with your own API key. A POST, PUT, PATCH or DELETE here changes a real property.
Credentials
The API key, sent on every request. A property admin creates it in the PMS under Settings → API keys; a partner receives one per property when the property activates its integration. It works only for the property it was issued for, and only on the endpoints granted to it.
This endpoint needs a credential. Without it you will get a 401.
Stored in this browser only. Never sent anywhere but the API host above.
Path parameters
Headers
Body
Arm production
Writing methods are locked until you arm them. This is live hotel data.
POST is locked on production. Arm it above if you mean it.
Send the request to see the real response here.
Nothing is mocked. What comes back is what the API returned.
Requests go straight from your browser to the API host above — nothing is proxied through this site.
Path parameters
Property code. Identifies the property (hotel, apartment building, hostel) the request applies to. It must match the property your API key was issued for.
Request body
Booking dates
Host information
Rooms information
Settings information
Products information
Group ID
Market segment ids to attach
Deprecated and ignored. segmentIds always apply to the reservation.
One of:bookingcustomerboth
Pack/Promotion ID (code_pack)
Responses
Ok. If your API key answers encrypted — every key issued now does, and every partner credential — this body arrives as the encryption envelope ({ crypto, protected, wrappedKey, iv, payload, tag }, a compact JWE), and the schema below is what its payload decrypts to. See https://public-api.hotelgest.com/public/guides/encryption
ID of the created booking. Use it against the booking endpoints (GET /api/bookings/{pcode}/detail/{bookingId})
1[2 {3 "id": 7894 }5]
What is a pcode?
Retries
Rate limits