Create a booking only after a successful Prebook a Room
response whose revalidation.decision is READY_TO_BOOK, or is
RECONFIRMATION_REQUIRED and the guest accepted the change.
You send the guests for every room, their answers to the offer’s
booking_requirements, and an Idempotency-Key. The response is a booking in
PROCESSING or AWAITING_REVIEW. It is never an instant confirmation.
Track the result with Get Booking Status
or webhooks.The flow: search, rooms, prebook, create booking, track status, show voucher.
Your unique ID for this one booking attempt. Required, up to 128 characters.
Generate it in your backend and save it before the first request. Resend the same key to retry safely. See Idempotency and safe retries.
Header X-Unifystays-End-User-IP
The traveler’s public IP address at checkout.
Needed for RateHawk offers. Private, loopback, reserved and malformed addresses are ignored, and then the request fails with VALIDATION_ERROR. If you omit the header, the address of your server connection is used, so always send the traveler’s IP.
There is no separate field for a contact, a client reference or special
requests. The guest contact is the lead guest’s EMAIL and PHONE answers
when the offer asks for them. Use the Idempotency-Key as your reference: it
is stored with the booking and you can look the booking up with it (see Get
Booking by Idempotency Key).
Keep your own order number next to the returned booking_id in your database.
Copy its room_allocation_id into one booking room object.
Read the room’s occupancy.adults and occupancy.child_ages.
Add one ADULT guest per adult.
Add one minor per entry in child_ages. A child aged 0 or 1 is an INFANT;
age 2 and over is a CHILD.
Repeat until every prebook room appears once.
An occupancy of {"adults": 1, "child_ages": [8]} needs one ADULT and one
CHILD. The child’s age is already known from the search, so the guest object
supplies identity only. If you also send a DATE_OF_BIRTH answer for a
child, it must give the quoted age on the check-in date.A room with mapping_status: "UNMAPPED" is booked through its
room_allocation_id in exactly the same way as a mapped room.
The prebook offer’s booking_requirements tell you which data to collect. Treat
them as the form definition:
Send { "requirement_id": "...", "value": "..." } and copy the id exactly.
Never build ids from code.
scope says who answers: ALL_GUESTS, LEAD_GUEST (only the guest with
is_lead_guest: true), or ADULT, CHILD, INFANT (by guest_type). When
room_allocation_ids is not empty, only guests in those rooms answer.
Answer every requirement with required: true that applies to the guest.
Missing answers return VALIDATION_ERROR listing what is missing.
Do not answer requirements that do not apply to the guest, answer one twice, or
send an id the offer did not declare. These return VALIDATION_ERROR.
Values are checked against the requirement: an EMAIL must be an email, a
PHONE must be in international format with a leading + (for example
+919876543210), a DATE must be YYYY-MM-DD, a COUNTRY_CODE must be an
uppercase two-letter code, an ENUM must be one of allowed_values, and
constraints (length, pattern, age range) apply. Values cannot be empty.
Titles are MR, MRS, MS, MISS, MASTER or OTHER.
Which fields exist depends on the supplier. First name, last name and title
are asked for every guest. Email and phone appear only when the supplier needs
them, so do not assume a lead-guest contact is required. Passport or tax-ID
requirements, when present, apply to every guest. Names for suppliers that
limit characters (for example RateHawk: letters, spaces and ' - , . ’ only)
carry a constraints.pattern; a breach returns GUEST_NAME_INVALID (422).
Some suppliers need a booking contact saved in your portal settings. If it is
missing the request fails with PROVIDER_CONFIGURATION_ERROR (422).
Create Booking answers 200 with a booking in one of two starting states:
Starting status
When
Meaning
PROCESSING
The accepted offer has a free-cancellation window that ends more than 2 days from now, or a HOLD request. Also non-refundable offers and free windows that end within 2 days, unless your organization requires approval for them.
The booking is queued for the supplier straight away. No approval is needed.
AWAITING_REVIEW
Non-refundable offers, free windows that end within 2 days or have already ended, and unclear cancellation terms, only if your organization turned on “Require approval for non-refundable bookings”.
Nothing is reserved. An organization owner or admin approves it in the portal first.
Neither status is a confirmed reservation. A PROCESSING booking that is queued
goes to the supplier as it is; it never moves to AWAITING_REVIEW afterwards.An organization owner can turn on Require approval for non-refundable
bookings in the portal under Settings, Organization. It is off by default.
Bookings that are non-refundable or whose free cancellation ends within 2 days
are then held for approval, as described below.
Received, not reserved. Waiting for approval in the portal.
Show “Awaiting verification: room and price are not reserved.” Do not issue a voucher. Wait for the webhook; poll rarely.
PROCESSING
The supplier is booking it, or its answer is being checked.
Wait for booking.confirmed / booking.failed webhooks, or poll Get Booking Status every few seconds.
CONFIRMED
Booked.
Issue the voucher. The hotel confirmation number can arrive later; it is announced by a booking.updated webhook. Load details for the itinerary.
ON_HOLD
A HOLD booking is reserved but not final.
Call Confirm Hold before hold_deadline_at, or let it lapse.
FAILED
The booking was not made. message carries the reason.
Tell the guest. Read failure.code in Get Booking Details. To try again, prebook again and use a new idempotency key.
CANCELLATION_PENDING
A cancellation is in progress.
Poll until CANCELLED.
CANCELLED
The booking is cancelled.
Final.
Webhook events for bookings are booking.created, booking.confirmed,
booking.failed, booking.cancellation_requested, booking.cancelled,
booking.cancellation_failed and booking.updated (other status changes such as
PROCESSING to ON_HOLD, and new supplier references). Webhooks can arrive late
or more than once, so make your handler safe to repeat and keep polling as a
fallback. See Webhooks.
If the status is PROCESSING with processing_reason: "RECONCILIATION_REQUIRED"
and CONTACT_SUPPORT in available_actions, the supplier’s answer was
uncertain. Do not book again; contact support with the booking_id.
This applies only to organizations that require approval for non-refundable
bookings.For AWAITING_REVIEW, show “Awaiting verification, room and price are not
reserved”. An organization owner or admin reviews the saved hotel, rooms,
guests, price and cancellation terms in the portal and chooses Approve and
book. REVIEW_BOOKING is a portal action; API keys cannot approve.
The booking reference and the price you agreed stay the same. If the supplier
quote has expired, the reviewer obtains a fresh quote in the portal and
accepts any supplier cost difference.
data.review_expires_at is the quote deadline. Manual requests stay
AWAITING_REVIEW after it passes; do not cancel or refund because of this
timestamp. Approval and supplier submission must happen before the fresh quote
expires.
Rejection ends in FAILED with failure.codeBOOKING_REVIEW_REJECTED.
Expiry while a free-cancellation booking waits for submission ends in
FAILED with BOOKING_REVIEW_EXPIRED, before any reservation is submitted.
A finished request cannot be refreshed.
A request that is still AWAITING_REVIEW is closed automatically as FAILED
with BOOKING_REVIEW_EXPIRED (and a booking.failed webhook) when its quote
expired more than 24 hours ago, when the check-in date has arrived, or when
you already have a CONFIRMED booking for the same hotel, dates, lead guest
and number of rooms. Nothing was reserved, so no refund is needed beyond your
usual handling of failed bookings.
Send "booking_mode": "HOLD" only if prebook lifecycle.available_booking_modes
contains HOLD (lifecycle.hold_allowed is true). Otherwise the request
fails with HOLD_NOT_ALLOWED (409). The booking is reserved with the supplier
but not final: it goes PROCESSING, then ON_HOLD, with hold_deadline_at set.
It is announced by a booking.updated webhook. Then confirm it or let it lapse.
Details are on Confirm Hold.A hold never waits for review: it costs nothing until confirmed, so it goes to
the supplier straight away however close its deadline is. If the hold deadline
has already passed, the request fails with HOLD_DEADLINE_EXPIRED (409).
Generate one unique key per customer booking attempt. Save it before the first
request. On a timeout or an unreadable response, retry with the same key and
the same request body.
A repeat with the same key and the same body returns the original booking
(200, same booking_id). It never creates a second reservation, even after
the prebooking_id has been used. Array order and answer order do not
change the match.
The same key with a different body returns 409IDEMPOTENCY_KEY_REUSED.
Keys are private to your organization and may be up to 128 characters. A missing
key returns IDEMPOTENCY_KEY_REQUIRED.
If you never received the response, ask Get Booking by Idempotency
Key. 404 means no booking was created, so it is
safe to resend with the same key.
A request that fails validation creates nothing and does not consume the
prebooking_id. Correct the body and resend (same key is fine).
Use a new key only when the customer intentionally starts a new attempt, for
example after returning to the rooms and prebooking again. A new key is a new
booking.
Public IPv4 or IPv6 address of the traveler completing checkout. Needed for RateHawk offers: when it is missing or not a public address (private, loopback and reserved ranges are rejected) the request fails with VALIDATION_ERROR. If you omit the header the connection address is used, so send it whenever your server calls on the traveler's behalf.
Required, max 128 characters. One unique key per booking attempt, saved before you send the request. Resending the same key with the same body (after a timeout, for example) returns the original booking and never books twice. The same key with a different body returns 409 IDEMPOTENCY_KEY_REUSED. Use a new key only for a new attempt.
ISO 4217 currency for display amounts (display_ledger, display_amount, commercial_display). Optional: defaults to your organization's display currency, USD unless configured. Read pricing.display_currency in the response.
The data.prebooking_id from the successful Prebook response. It is single use and expires with the prebooked offer (offer.lifecycle.expires_at). If this request fails validation the id is not consumed and you may correct the body and resend.
The data.offer.offer_id from the same Prebook response as prebooking_id. It confirms you are booking the refreshed offer the guest saw and accepted; any other id is rejected with ACCEPTED_OFFER_MISMATCH.
One entry per room in the prebook offer's rooms[], each with its guests. The count must equal the number of prebook rooms and array order does not matter.
INSTANT (default) books the room straight away. HOLD reserves it until a supplier deadline, and is accepted only when the prebook offer's lifecycle.available_booking_modes contains HOLD; otherwise HOLD_NOT_ALLOWED. A held booking is confirmed later with Confirm Hold.
Available options:
INSTANT,
HOLD
Response
The booking was created or an earlier booking with the same Idempotency-Key was returned. The status is PROCESSING or AWAITING_REVIEW at this point; it is not a confirmation. Track it with Get Booking Status or webhooks.
false only when the booking status is FAILED. true for every other status, including AWAITING_REVIEW and PROCESSING, which are not confirmations. Read data.status for the real state.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Unifystays API","colors":{"primary":"#0F766E","light":"#14B8A6","dark":"#134E4A"},"navbar":{"links":[{"href":"https://unifystays.com","label":"Portal"},{"href":"mailto:support@unifystays.com","label":"Support"}]},"contextual":{"options":["copy","download-spec","chatgpt","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"unifystays","hasAudioNarration":false,"actualSubdomain":"unifystays","customDomains":["docs.unifystays.com"],"gitSource":{"type":"github","owner":"ronakonline","repo":"unifystay","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6ae836724729f9837cf0d8e4","collectionId":"17105c7f-831f-4751-8445-71739bb329ae","liveDeploymentHistoryId":"6ae836724729f9837cf0d8e4","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae836724729f9837cf0d8e4","clientVersion":"0.0.4045","searchFilterCounts":[{"language":"default","tag":"API Reference","count":29},{"language":"default","tag":"Guides","count":10},{"language":"default","tag":"Bookings","count":8},{"language":"default","tag":"Search \u0026 hotels","count":7},{"language":"default","tag":"Webhook endpoints","count":7},{"language":"default","tag":"Build your integration","count":5},{"language":"default","tag":"Webhook logs","count":4},{"language":"default","tag":"Get started","count":3},{"language":"default","tag":"Destination \u0026 master data","count":2},{"language":"default","tag":"Operate","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/create-booking","slug":"/api-reference/create-booking","pageMetadata":{"title":"Create Booking","description":"Create an idempotent hotel booking from a successful Unifystays prebooking response.","openapi":"reference/openapi.json POST /hotels/book","href":"/api-reference/create-booking"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Create an idempotent hotel booking from a successful Unifystays prebooking response.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Info,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Create a booking only after a successful `,_jsx(_components.a,{href:`/api-reference/prebook`,children:`Prebook a Room`}),`\nresponse whose `,_jsx(_components.code,{children:`revalidation.decision`}),` is `,_jsx(_components.code,{children:`READY_TO_BOOK`}),`, or is\n`,_jsx(_components.code,{children:`RECONFIRMATION_REQUIRED`}),` and the guest accepted the change.\nYou send the guests for every room, their answers to the offer’s\n`,_jsx(_components.code,{children:`booking_requirements`}),`, and an `,_jsx(_components.code,{children:`Idempotency-Key`}),`. The response is a booking in\n`,_jsx(_components.code,{children:`PROCESSING`}),` or `,_jsx(_components.code,{children:`AWAITING_REVIEW`}),`. `,_jsx(_components.strong,{children:`It is never an instant confirmation.`}),`\nTrack the result with `,_jsx(_components.a,{href:`/api-reference/get-booking-status`,children:`Get Booking Status`}),`\nor `,_jsx(_components.a,{href:`/guides/webhooks`,children:`webhooks`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`The flow: search, rooms, prebook, `,_jsx(_components.strong,{children:`create booking`}),`, track status, show voucher.`]}),`\n`,_jsx(Heading,{level:`2`,id:`request-example`,children:`Request example`}),`\n`,`\n`,_jsx(Heading,{level:`2`,id:`request-field-guide`,children:`Request field guide`}),`\n`,_jsx(Heading,{level:`3`,id:`headers`,children:`Headers`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`What it means`}),_jsx(_components.th,{children:`How to use it`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`Header `,_jsx(_components.code,{children:`Idempotency-Key`})]}),_jsx(_components.td,{children:`Your unique ID for this one booking attempt. Required, up to 128 characters.`}),_jsxs(_components.td,{children:[`Generate it in your backend and save it `,_jsx(_components.strong,{children:`before`}),` the first request. Resend the same key to retry safely. See `,_jsx(_components.a,{href:`#idempotency-and-safe-retries`,children:`Idempotency and safe retries`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`Header `,_jsx(_components.code,{children:`X-Unifystays-End-User-IP`})]}),_jsx(_components.td,{children:`The traveler’s public IP address at checkout.`}),_jsxs(_components.td,{children:[`Needed for RateHawk offers. Private, loopback, reserved and malformed addresses are ignored, and then the request fails with `,_jsx(_components.code,{children:`VALIDATION_ERROR`}),`. If you omit the header, the address of your server connection is used, so always send the traveler’s IP.`]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`body`,children:`Body`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Where to get it`}),_jsx(_components.th,{children:`How to use it`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`prebooking_id`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`data.prebooking_id`}),` from the successful prebook.`]}),_jsxs(_components.td,{children:[`Send it unchanged. It is single use and expires at the offer’s `,_jsx(_components.code,{children:`lifecycle.expires_at`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`accepted_offer_id`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`data.offer.offer_id`}),` from `,_jsx(_components.strong,{children:`the same`}),` prebook response.`]}),_jsxs(_components.td,{children:[`Confirms the guest accepted the refreshed offer. Any other value returns `,_jsx(_components.code,{children:`ACCEPTED_OFFER_MISMATCH`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`booking_mode`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`data.offer.lifecycle.available_booking_modes`}),`.`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`INSTANT`}),` (default) books now. `,_jsx(_components.code,{children:`HOLD`}),` only when the list contains `,_jsx(_components.code,{children:`HOLD`}),`; see `,_jsx(_components.a,{href:`#hold-bookings`,children:`Hold bookings`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`rooms[]`})}),_jsxs(_components.td,{children:[`One entry per room in prebook `,_jsx(_components.code,{children:`data.offer.rooms[]`}),`.`]}),_jsx(_components.td,{children:`Send every room exactly once. Order does not matter.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`rooms[].room_allocation_id`})}),_jsxs(_components.td,{children:[`The prebook room’s `,_jsx(_components.code,{children:`room_allocation_id`}),`.`]}),_jsxs(_components.td,{children:[`The only room identity accepted. Never send `,_jsx(_components.code,{children:`unifystays_room_id`}),`, family or variant IDs, room names or array positions.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`rooms[].guests[]`})}),_jsx(_components.td,{children:`Your checkout guest form.`}),_jsx(_components.td,{children:`All adults, children and infants staying in that room.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`guests[].guest_id`})}),_jsx(_components.td,{children:`Generate it.`}),_jsx(_components.td,{children:`Up to 100 characters, unique in the whole request. It only labels the guest in error messages.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`guests[].guest_type`})}),_jsx(_components.td,{children:`Your checkout guest form.`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ADULT`}),`, `,_jsx(_components.code,{children:`CHILD`}),` or `,_jsx(_components.code,{children:`INFANT`}),`. See `,_jsx(_components.a,{href:`#building-the-room-assignments`,children:`Building the room assignments`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`guests[].is_lead_guest`})}),_jsx(_components.td,{children:`Your checkout.`}),_jsxs(_components.td,{children:[`Exactly one guest in the whole booking is `,_jsx(_components.code,{children:`true`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`guests[].answers[]`})}),_jsxs(_components.td,{children:[`Built from prebook `,_jsx(_components.code,{children:`data.offer.booking_requirements[]`}),`.`]}),_jsxs(_components.td,{children:[`Each answer is `,_jsx(_components.code,{children:`{ \"requirement_id\", \"value\" }`}),` with a string value. See `,_jsx(_components.a,{href:`#answering-booking_requirements`,children:`Answering booking_requirements`}),`.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`There is no separate field for a contact, a client reference or special\nrequests. The guest contact is the lead guest’s `,_jsx(_components.code,{children:`EMAIL`}),` and `,_jsx(_components.code,{children:`PHONE`}),` answers\nwhen the offer asks for them. Use the `,_jsx(_components.code,{children:`Idempotency-Key`}),` as your reference: it\nis stored with the booking and you can look the booking up with it (see `,_jsx(_components.a,{href:`/api-reference/get-booking-by-idempotency-key`,children:`Get\nBooking by Idempotency Key`}),`).\nKeep your own order number next to the returned `,_jsx(_components.code,{children:`booking_id`}),` in your database.`]}),`\n`,_jsx(Heading,{level:`3`,id:`building-the-room-assignments`,children:`Building the room assignments`}),`\n`,_jsx(_components.p,{children:`For every room in the prebook response:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Copy its `,_jsx(_components.code,{children:`room_allocation_id`}),` into one booking room object.`]}),`\n`,_jsxs(_components.li,{children:[`Read the room’s `,_jsx(_components.code,{children:`occupancy.adults`}),` and `,_jsx(_components.code,{children:`occupancy.child_ages`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Add one `,_jsx(_components.code,{children:`ADULT`}),` guest per adult.`]}),`\n`,_jsxs(_components.li,{children:[`Add one minor per entry in `,_jsx(_components.code,{children:`child_ages`}),`. A child aged 0 or 1 is an `,_jsx(_components.code,{children:`INFANT`}),`;\nage 2 and over is a `,_jsx(_components.code,{children:`CHILD`}),`.`]}),`\n`,_jsx(_components.li,{children:`Repeat until every prebook room appears once.`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`An occupancy of `,_jsx(_components.code,{children:`{\"adults\": 1, \"child_ages\": [8]}`}),` needs one `,_jsx(_components.code,{children:`ADULT`}),` and one\n`,_jsx(_components.code,{children:`CHILD`}),`. The child’s age is already known from the search, so the guest object\nsupplies identity only. If you also send a `,_jsx(_components.code,{children:`DATE_OF_BIRTH`}),` answer for a\nchild, it must give the quoted age on the check-in date.`]}),`\n`,_jsxs(_components.p,{children:[`A room with `,_jsx(_components.code,{children:`mapping_status: \"UNMAPPED\"`}),` is booked through its\n`,_jsx(_components.code,{children:`room_allocation_id`}),` in exactly the same way as a mapped room.`]}),`\n`,_jsx(Heading,{level:`3`,id:`answering-booking_requirements`,children:`Answering booking_requirements`}),`\n`,_jsxs(_components.p,{children:[`The prebook offer’s `,_jsx(_components.code,{children:`booking_requirements`}),` tell you which data to collect. Treat\nthem as the form definition:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Send `,_jsx(_components.code,{children:`{ \"requirement_id\": \"...\", \"value\": \"...\" }`}),` and copy the id exactly.\nNever build ids from `,_jsx(_components.code,{children:`code`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`scope`}),` says who answers: `,_jsx(_components.code,{children:`ALL_GUESTS`}),`, `,_jsx(_components.code,{children:`LEAD_GUEST`}),` (only the guest with\n`,_jsx(_components.code,{children:`is_lead_guest: true`}),`), or `,_jsx(_components.code,{children:`ADULT`}),`, `,_jsx(_components.code,{children:`CHILD`}),`, `,_jsx(_components.code,{children:`INFANT`}),` (by `,_jsx(_components.code,{children:`guest_type`}),`). When\n`,_jsx(_components.code,{children:`room_allocation_ids`}),` is not empty, only guests in those rooms answer.`]}),`\n`,_jsxs(_components.li,{children:[`Answer every requirement with `,_jsx(_components.code,{children:`required: true`}),` that applies to the guest.\nMissing answers return `,_jsx(_components.code,{children:`VALIDATION_ERROR`}),` listing what is missing.`]}),`\n`,_jsxs(_components.li,{children:[`Do not answer requirements that do not apply to the guest, answer one twice, or\nsend an id the offer did not declare. These return `,_jsx(_components.code,{children:`VALIDATION_ERROR`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Values are checked against the requirement: an `,_jsx(_components.code,{children:`EMAIL`}),` must be an email, a\n`,_jsx(_components.code,{children:`PHONE`}),` must be in international format with a leading `,_jsx(_components.code,{children:`+`}),` (for example\n`,_jsx(_components.code,{children:`+919876543210`}),`), a `,_jsx(_components.code,{children:`DATE`}),` must be `,_jsx(_components.code,{children:`YYYY-MM-DD`}),`, a `,_jsx(_components.code,{children:`COUNTRY_CODE`}),` must be an\nuppercase two-letter code, an `,_jsx(_components.code,{children:`ENUM`}),` must be one of `,_jsx(_components.code,{children:`allowed_values`}),`, and\n`,_jsx(_components.code,{children:`constraints`}),` (length, pattern, age range) apply. Values cannot be empty.`]}),`\n`,_jsxs(_components.li,{children:[`Titles are `,_jsx(_components.code,{children:`MR`}),`, `,_jsx(_components.code,{children:`MRS`}),`, `,_jsx(_components.code,{children:`MS`}),`, `,_jsx(_components.code,{children:`MISS`}),`, `,_jsx(_components.code,{children:`MASTER`}),` or `,_jsx(_components.code,{children:`OTHER`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Which fields exist depends on the supplier. First name, last name and title\nare asked for every guest. Email and phone appear only when the supplier needs\nthem, so do not assume a lead-guest contact is required. Passport or tax-ID\nrequirements, when present, apply to every guest. Names for suppliers that\nlimit characters (for example RateHawk: letters, spaces and `,_jsx(_components.code,{children:`' - , . ’`}),` only)\ncarry a `,_jsx(_components.code,{children:`constraints.pattern`}),`; a breach returns `,_jsx(_components.code,{children:`GUEST_NAME_INVALID`}),` (422).`]}),`\n`,_jsxs(_components.li,{children:[`Some suppliers need a booking contact saved in your portal settings. If it is\nmissing the request fails with `,_jsx(_components.code,{children:`PROVIDER_CONFIGURATION_ERROR`}),` (422).`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`order-of-rooms-and-guests`,children:`Order of rooms and guests`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`rooms`}),` array can be sent in any order. Unifystays matches each entry by\n`,_jsx(_components.code,{children:`room_allocation_id`}),` and restores the supplier’s trusted room order itself.`]}),`\n`,_jsx(Heading,{level:`2`,id:`what-happens-next`,children:`What happens next`}),`\n`,_jsxs(_components.p,{children:[`Create Booking answers `,_jsx(_components.code,{children:`200`}),` with a booking in one of two starting states:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Starting status`}),_jsx(_components.th,{children:`When`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PROCESSING`})}),_jsxs(_components.td,{children:[`The accepted offer has a free-cancellation window that ends `,_jsx(_components.strong,{children:`more than 2 days`}),` from now, or a `,_jsx(_components.code,{children:`HOLD`}),` request. Also non-refundable offers and free windows that end within 2 days, `,_jsx(_components.strong,{children:`unless`}),` your organization requires approval for them.`]}),_jsx(_components.td,{children:`The booking is queued for the supplier straight away. No approval is needed.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`AWAITING_REVIEW`})}),_jsxs(_components.td,{children:[`Non-refundable offers, free windows that end within 2 days or have already ended, and unclear cancellation terms, `,_jsx(_components.strong,{children:`only if`}),` your organization turned on “Require approval for non-refundable bookings”.`]}),_jsx(_components.td,{children:`Nothing is reserved. An organization owner or admin approves it in the portal first.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Neither status is a confirmed reservation. A `,_jsx(_components.code,{children:`PROCESSING`}),` booking that is queued\ngoes to the supplier as it is; it never moves to `,_jsx(_components.code,{children:`AWAITING_REVIEW`}),` afterwards.`]}),`\n`,_jsxs(_components.p,{children:[`An organization owner can turn on `,_jsx(_components.strong,{children:`Require approval for non-refundable\nbookings`}),` in the portal under Settings, Organization. It is off by default.\nBookings that are non-refundable or whose free cancellation ends within 2 days\nare then held for approval, as described below.`]}),`\n`,_jsx(Heading,{level:`3`,id:`example-queued-for-the-supplier`,children:`Example: queued for the supplier`}),`\n`,`\n`,_jsx(Heading,{level:`3`,id:`example-awaiting-approval`,children:`Example: awaiting approval`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`29`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`29`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"contract_version\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Booking request received and awaiting manual review. No supplier reservation has been created. Price and availability are not guaranteed.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"booking_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ubk_eGQ0dW9uV1Vi\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accepted_offer_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"off_65db5f20d91b47d3a73d834dfa44c50e\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"AWAITING_REVIEW\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"is_terminal\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"provider\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TRIPJACK\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"booking_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"booking_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"hotel_confirmation_number\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"hotel_confirmation_status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"hotel_confirmation_note\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"hotel_contact_phone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"hotel_contact_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"next_poll_after_ms\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"processing_reason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"MANUAL_REVIEW_REQUIRED\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"action_required\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"available_actions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GET_STATUS\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GET_DETAILS\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"REVIEW_BOOKING\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"review_expires_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-14T12:15:00.000Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"hold_deadline_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-14T12:12:11.000Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"updated_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-14T12:12:11.000Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Response key`}),_jsx(_components.th,{children:`What it means`}),_jsx(_components.th,{children:`What your integration should do`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`success`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`false`}),` only when `,_jsx(_components.code,{children:`status`}),` is `,_jsx(_components.code,{children:`FAILED`}),`.`]}),_jsxs(_components.td,{children:[`Do not treat `,_jsx(_components.code,{children:`true`}),` as booked. Read `,_jsx(_components.code,{children:`status`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data.booking_id`})}),_jsxs(_components.td,{children:[`Stable Unifystays booking ID (`,_jsx(_components.code,{children:`ubk_...`}),`).`]}),_jsx(_components.td,{children:`Save it immediately, next to your order. Use it for status, details, cancel and confirm-hold.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data.status`})}),_jsx(_components.td,{children:`Current state. See the table below.`}),_jsx(_components.td,{children:`Branch on this.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data.is_terminal`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`true`}),` when the current step is finished.`]}),_jsxs(_components.td,{children:[`Stop polling when `,_jsx(_components.code,{children:`true`}),`, but check `,_jsx(_components.code,{children:`available_actions`}),` (an `,_jsx(_components.code,{children:`ON_HOLD`}),` booking is terminal yet needs your action).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data.next_poll_after_ms`})}),_jsx(_components.td,{children:`Milliseconds to wait before polling again.`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`null`}),` right after creation. Poll about every 5 seconds, or wait for webhooks.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data.processing_reason`})}),_jsx(_components.td,{children:`Why it is not final yet.`}),_jsxs(_components.td,{children:[`Display for support. Values are listed on `,_jsx(_components.a,{href:`/api-reference/get-booking-status`,children:`Get Booking Status`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data.action_required`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`true`}),` when a person must act.`]}),_jsxs(_components.td,{children:[`Read `,_jsx(_components.code,{children:`available_actions`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data.review_expires_at`})}),_jsx(_components.td,{children:`Deadline of the prebooked offer’s supplier quote.`}),_jsx(_components.td,{children:`Informational. Do not cancel or refund the guest because of it (see below).`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data.hold_deadline_at`})}),_jsxs(_components.td,{children:[`Deadline to confirm a `,_jsx(_components.code,{children:`HOLD`}),` booking.`]}),_jsxs(_components.td,{children:[`See `,_jsx(_components.a,{href:`/api-reference/confirm-hold`,children:`Confirm Hold`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data.provider`})}),_jsx(_components.td,{children:`Supplier references and hotel confirmation details.`}),_jsxs(_components.td,{children:[`Store them for support. Show `,_jsx(_components.code,{children:`hotel_confirmation_number`}),` to the guest when it appears.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`booking-statuses-and-what-to-do`,children:`Booking statuses and what to do`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Meaning`}),_jsx(_components.th,{children:`Your next step`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`AWAITING_REVIEW`})}),_jsx(_components.td,{children:`Received, not reserved. Waiting for approval in the portal.`}),_jsx(_components.td,{children:`Show “Awaiting verification: room and price are not reserved.” Do not issue a voucher. Wait for the webhook; poll rarely.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PROCESSING`})}),_jsx(_components.td,{children:`The supplier is booking it, or its answer is being checked.`}),_jsxs(_components.td,{children:[`Wait for `,_jsx(_components.code,{children:`booking.confirmed`}),` / `,_jsx(_components.code,{children:`booking.failed`}),` webhooks, or poll `,_jsx(_components.a,{href:`/api-reference/get-booking-status`,children:`Get Booking Status`}),` every few seconds.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CONFIRMED`})}),_jsx(_components.td,{children:`Booked.`}),_jsxs(_components.td,{children:[`Issue the voucher. The hotel confirmation number can arrive later; it is announced by a `,_jsx(_components.code,{children:`booking.updated`}),` webhook. Load `,_jsx(_components.a,{href:`/api-reference/get-booking-details`,children:`details`}),` for the itinerary.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ON_HOLD`})}),_jsxs(_components.td,{children:[`A `,_jsx(_components.code,{children:`HOLD`}),` booking is reserved but not final.`]}),_jsxs(_components.td,{children:[`Call `,_jsx(_components.a,{href:`/api-reference/confirm-hold`,children:`Confirm Hold`}),` before `,_jsx(_components.code,{children:`hold_deadline_at`}),`, or let it lapse.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`FAILED`})}),_jsxs(_components.td,{children:[`The booking was not made. `,_jsx(_components.code,{children:`message`}),` carries the reason.`]}),_jsxs(_components.td,{children:[`Tell the guest. Read `,_jsx(_components.code,{children:`failure.code`}),` in `,_jsx(_components.a,{href:`/api-reference/get-booking-details`,children:`Get Booking Details`}),`. To try again, prebook again and use a `,_jsx(_components.strong,{children:`new`}),` idempotency key.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CANCELLATION_PENDING`})}),_jsx(_components.td,{children:`A cancellation is in progress.`}),_jsxs(_components.td,{children:[`Poll until `,_jsx(_components.code,{children:`CANCELLED`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CANCELLED`})}),_jsx(_components.td,{children:`The booking is cancelled.`}),_jsx(_components.td,{children:`Final.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Webhook events for bookings are `,_jsx(_components.code,{children:`booking.created`}),`, `,_jsx(_components.code,{children:`booking.confirmed`}),`,\n`,_jsx(_components.code,{children:`booking.failed`}),`, `,_jsx(_components.code,{children:`booking.cancellation_requested`}),`, `,_jsx(_components.code,{children:`booking.cancelled`}),`,\n`,_jsx(_components.code,{children:`booking.cancellation_failed`}),` and `,_jsx(_components.code,{children:`booking.updated`}),` (other status changes such as\n`,_jsx(_components.code,{children:`PROCESSING`}),` to `,_jsx(_components.code,{children:`ON_HOLD`}),`, and new supplier references). Webhooks can arrive late\nor more than once, so make your handler safe to repeat and keep polling as a\nfallback. See `,_jsx(_components.a,{href:`/guides/webhooks`,children:`Webhooks`}),`.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`If the status is `,_jsx(_components.code,{children:`PROCESSING`}),` with `,_jsx(_components.code,{children:`processing_reason: \"RECONCILIATION_REQUIRED\"`}),`\nand `,_jsx(_components.code,{children:`CONTACT_SUPPORT`}),` in `,_jsx(_components.code,{children:`available_actions`}),`, the supplier’s answer was\nuncertain. Do not book again; contact support with the `,_jsx(_components.code,{children:`booking_id`}),`.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`approval-for-bookings-outside-free-cancellation`,children:`Approval for bookings outside free cancellation`}),`\n`,_jsx(_components.p,{children:`This applies only to organizations that require approval for non-refundable\nbookings.`}),`\n`,_jsxs(_components.p,{children:[`For `,_jsx(_components.code,{children:`AWAITING_REVIEW`}),`, show “Awaiting verification, room and price are not\nreserved”. An organization owner or admin reviews the saved hotel, rooms,\nguests, price and cancellation terms in the portal and chooses `,_jsx(_components.strong,{children:`Approve and\nbook`}),`. `,_jsx(_components.code,{children:`REVIEW_BOOKING`}),` is a portal action; API keys cannot approve.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`The booking reference and the price you agreed stay the same. If the supplier\nquote has expired, the reviewer obtains a fresh quote in the portal and\naccepts any supplier cost difference.`}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`data.review_expires_at`}),` is the quote deadline. Manual requests stay\n`,_jsx(_components.code,{children:`AWAITING_REVIEW`}),` after it passes; do not cancel or refund because of this\ntimestamp. Approval and supplier submission must happen before the fresh quote\nexpires.`]}),`\n`,_jsxs(_components.li,{children:[`Rejection ends in `,_jsx(_components.code,{children:`FAILED`}),` with `,_jsx(_components.code,{children:`failure.code`}),` `,_jsx(_components.code,{children:`BOOKING_REVIEW_REJECTED`}),`.\nExpiry while a free-cancellation booking waits for submission ends in\n`,_jsx(_components.code,{children:`FAILED`}),` with `,_jsx(_components.code,{children:`BOOKING_REVIEW_EXPIRED`}),`, before any reservation is submitted.\nA finished request cannot be refreshed.`]}),`\n`,_jsxs(_components.li,{children:[`A request that is still `,_jsx(_components.code,{children:`AWAITING_REVIEW`}),` is closed automatically as `,_jsx(_components.code,{children:`FAILED`}),`\nwith `,_jsx(_components.code,{children:`BOOKING_REVIEW_EXPIRED`}),` (and a `,_jsx(_components.code,{children:`booking.failed`}),` webhook) when its quote\nexpired more than 24 hours ago, when the check-in date has arrived, or when\nyou already have a `,_jsx(_components.code,{children:`CONFIRMED`}),` booking for the same hotel, dates, lead guest\nand number of rooms. Nothing was reserved, so no refund is needed beyond your\nusual handling of failed bookings.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`hold-bookings`,children:`Hold bookings`}),`\n`,_jsxs(_components.p,{children:[`Send `,_jsx(_components.code,{children:`\"booking_mode\": \"HOLD\"`}),` only if prebook `,_jsx(_components.code,{children:`lifecycle.available_booking_modes`}),`\ncontains `,_jsx(_components.code,{children:`HOLD`}),` (`,_jsx(_components.code,{children:`lifecycle.hold_allowed`}),` is `,_jsx(_components.code,{children:`true`}),`). Otherwise the request\nfails with `,_jsx(_components.code,{children:`HOLD_NOT_ALLOWED`}),` (409). The booking is reserved with the supplier\nbut not final: it goes `,_jsx(_components.code,{children:`PROCESSING`}),`, then `,_jsx(_components.code,{children:`ON_HOLD`}),`, with `,_jsx(_components.code,{children:`hold_deadline_at`}),` set.\nIt is announced by a `,_jsx(_components.code,{children:`booking.updated`}),` webhook. Then confirm it or let it lapse.\nDetails are on `,_jsx(_components.a,{href:`/api-reference/confirm-hold`,children:`Confirm Hold`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`A hold never waits for review: it costs nothing until confirmed, so it goes to\nthe supplier straight away however close its deadline is. If the hold deadline\nhas already passed, the request fails with `,_jsx(_components.code,{children:`HOLD_DEADLINE_EXPIRED`}),` (409).`]}),`\n`,_jsx(Heading,{level:`2`,id:`idempotency-and-safe-retries`,children:`Idempotency and safe retries`}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Generate one unique key per customer booking attempt. Save it before the first\nrequest. On a timeout or an unreadable response, retry with the `,_jsx(_components.strong,{children:`same key and\nthe same request body`}),`.`]})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`A repeat with the same key and the same body returns the `,_jsx(_components.strong,{children:`original booking`}),`\n(`,_jsx(_components.code,{children:`200`}),`, same `,_jsx(_components.code,{children:`booking_id`}),`). It never creates a second reservation, even after\nthe `,_jsx(_components.code,{children:`prebooking_id`}),` has been used. Array order and answer order do not\nchange the match.`]}),`\n`,_jsxs(_components.li,{children:[`The same key with a different body returns `,_jsx(_components.code,{children:`409`}),` `,_jsx(_components.code,{children:`IDEMPOTENCY_KEY_REUSED`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Keys are private to your organization and may be up to 128 characters. A missing\nkey returns `,_jsx(_components.code,{children:`IDEMPOTENCY_KEY_REQUIRED`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`If you never received the response, ask `,_jsx(_components.a,{href:`/api-reference/get-booking-by-idempotency-key`,children:`Get Booking by Idempotency\nKey`}),`. `,_jsx(_components.code,{children:`404`}),` means no booking was created, so it is\nsafe to resend with the same key.`]}),`\n`,_jsxs(_components.li,{children:[`A request that fails validation creates nothing and does not consume the\n`,_jsx(_components.code,{children:`prebooking_id`}),`. Correct the body and resend (same key is fine).`]}),`\n`,_jsx(_components.li,{children:`Use a new key only when the customer intentionally starts a new attempt, for\nexample after returning to the rooms and prebooking again. A new key is a new\nbooking.`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`errors-to-handle`,children:`Errors to handle`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Code (HTTP)`}),_jsx(_components.th,{children:`Meaning`}),_jsx(_components.th,{children:`What to do`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`IDEMPOTENCY_KEY_REQUIRED`}),` (400)`]}),_jsx(_components.td,{children:`Missing header.`}),_jsxs(_components.td,{children:[`Send `,_jsx(_components.code,{children:`Idempotency-Key`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`IDEMPOTENCY_KEY_REUSED`}),` (409)`]}),_jsx(_components.td,{children:`Key already used with a different body.`}),_jsx(_components.td,{children:`Resend the original body, or use a new key for a new attempt.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`PREBOOKING_ID_INVALID`}),`, `,_jsx(_components.code,{children:`PREBOOKING_ID_EXPIRED`}),`, `,_jsx(_components.code,{children:`PREBOOKING_ID_ALREADY_USED`}),`, `,_jsx(_components.code,{children:`PREBOOKING_ID_CONTEXT_NOT_FOUND`}),` (400 / 409)`]}),_jsx(_components.td,{children:`The prebooking cannot be used.`}),_jsx(_components.td,{children:`Prebook again. Do not edit or reuse the old ID.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ACCEPTED_OFFER_MISMATCH`}),` (400)`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`accepted_offer_id`}),` is not the prebook offer.`]}),_jsxs(_components.td,{children:[`Send `,_jsx(_components.code,{children:`data.offer.offer_id`}),` from the same prebook response.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`BOOKING_ROOM_COUNT_MISMATCH`}),`, `,_jsx(_components.code,{children:`BOOKING_ROOM_ALLOCATION_MISMATCH`}),` (400)`]}),_jsx(_components.td,{children:`Rooms are missing, duplicated or unknown.`}),_jsxs(_components.td,{children:[`Rebuild `,_jsx(_components.code,{children:`rooms`}),` from every prebook `,_jsx(_components.code,{children:`room_allocation_id`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`BOOKING_ROOM_OCCUPANCY_MISMATCH`}),` (400)`]}),_jsx(_components.td,{children:`Guest counts, child types or dates of birth do not match the room.`}),_jsxs(_components.td,{children:[`Match the adults and children (with `,_jsx(_components.code,{children:`INFANT`}),` / `,_jsx(_components.code,{children:`CHILD`}),` by age) to `,_jsx(_components.code,{children:`occupancy`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`VALIDATION_ERROR`}),` (400)`]}),_jsx(_components.td,{children:`Bad body, lead guest count, duplicate guest ID, missing or invalid answers, missing traveler IP for RateHawk, missing PAN or passport.`}),_jsxs(_components.td,{children:[`Read `,_jsx(_components.code,{children:`error.message`}),`; fix and resend.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`GUEST_NAME_INVALID`}),` (422)`]}),_jsx(_components.td,{children:`A name breaks the supplier’s character rule.`}),_jsxs(_components.td,{children:[`Apply the requirement’s `,_jsx(_components.code,{children:`constraints.pattern`}),` in your form and resend.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`HOLD_NOT_ALLOWED`}),` (409)`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`HOLD`}),` requested but not offered.`]}),_jsxs(_components.td,{children:[`Book with `,_jsx(_components.code,{children:`INSTANT`}),`, or choose a holdable offer.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`HOLD_DEADLINE_EXPIRED`}),` (409)`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`HOLD`}),` requested but the offer’s hold deadline has passed.`]}),_jsxs(_components.td,{children:[`Prebook again, or book with `,_jsx(_components.code,{children:`INSTANT`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`HOTEL_MAPPING_UNVERIFIED`}),` (409)`]}),_jsx(_components.td,{children:`The supplier’s listing could not be verified for this hotel.`}),_jsx(_components.td,{children:`Offer another room option.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`HOTEL_MAPPING_CHECK_PENDING`}),` (409)`]}),_jsx(_components.td,{children:`Verification still running.`}),_jsx(_components.td,{children:`Retry after a few seconds.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`PROVIDER_NOT_AUTHORIZED`}),` (403), `,_jsx(_components.code,{children:`PROVIDER_CONFIGURATION_ERROR`}),` (422)`]}),_jsx(_components.td,{children:`Your organization is not set up for this supplier or its booking contact.`}),_jsx(_components.td,{children:`Fix the setup in your portal or contact support.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PROVIDER_OPERATION_NOT_SUPPORTED`})}),_jsx(_components.td,{children:`The offer cannot be booked through the API.`}),_jsx(_components.td,{children:`Offer another room option.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`BOOKING_CREATE_FAILED`})}),_jsx(_components.td,{children:`Unexpected failure while saving the booking.`}),_jsx(_components.td,{children:`Look the booking up by idempotency key before trying again.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`The error envelope and request IDs are described in `,_jsx(_components.a,{href:`/errors`,children:`Errors \u0026\nRetries`}),`.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Booking contains guest personal data. Send it only from your trusted backend\nand avoid writing unprotected guest information to client-side logs.`})}),`\n`,_jsx(_components.p,{children:`The OpenAPI section below documents all booking fields and responses.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create Booking","description":"Create an idempotent hotel booking from a successful Unifystays prebooking response.","openapi":"reference/openapi.json POST /hotels/book","href":"/api-reference/create-booking"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Info,RequestExample,ResponseExample,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Create a booking only after a successful `,_jsx(_components.a,{href:`/api-reference/prebook`,children:`Prebook a Room`}),`\nresponse whose `,_jsx(_components.code,{children:`revalidation.decision`}),` is `,_jsx(_components.code,{children:`READY_TO_BOOK`}),`, or is\n`,_jsx(_components.code,{children:`RECONFIRMATION_REQUIRED`}),` and the guest accepted the change.\nYou send the guests for every room, their answers to the offer’s\n`,_jsx(_components.code,{children:`booking_requirements`}),`, and an `,_jsx(_components.code,{children:`Idempotency-Key`}),`. The response is a booking in\n`,_jsx(_components.code,{children:`PROCESSING`}),` or `,_jsx(_components.code,{children:`AWAITING_REVIEW`}),`. `,_jsx(_components.strong,{children:`It is never an instant confirmation.`}),`\nTrack the result with `,_jsx(_components.a,{href:`/api-reference/get-booking-status`,children:`Get Booking Status`}),`\nor `,_jsx(_components.a,{href:`/guides/webhooks`,children:`webhooks`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`The flow: search, rooms, prebook, `,_jsx(_components.strong,{children:`create booking`}),`, track status, show voucher.`]}),`\n`,_jsx(Heading,{level:`2`,id:`request-example`,children:`Request example`}),`\n`,_jsx(RequestExample,{children:_jsx(CodeBlock,{filename:``,numberOfLines:`65`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`65`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$UNIFYSTAYS_BASE_URL`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/hotels/book\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"content-type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$UNIFYSTAYS_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Idempotency-Key: order-2987349823-booking-1\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-Unifystays-End-User-IP: 8.8.8.8\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prebooking_id\": \"pbq7.bjNQb1Y5R2hRWEg.k6jQ3nW4cF1nL4MWvN7A9Q\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"accepted_offer_id\": \"off_65db5f20d91b47d3a73d834dfa44c50e\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"booking_mode\": \"INSTANT\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"rooms\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"room_allocation_id\": \"ra_2c1fb39ed54742f28d95bd8bc5f4375d\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"guests\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"guest_id\": \"guest_1\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"guest_type\": \"ADULT\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"is_lead_guest\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"answers\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"requirement_id\": \"br_title_all_guests_1\", \"value\": \"MR\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"requirement_id\": \"br_first_name_all_guests_2\", \"value\": \"Shubham\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"requirement_id\": \"br_last_name_all_guests_3\", \"value\": \"Gupta\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"requirement_id\": \"br_email_lead_guest_4\", \"value\": \"shubham@example.com\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"requirement_id\": \"br_phone_lead_guest_5\", \"value\": \"+919876543210\" }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"guest_id\": \"guest_2\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"guest_type\": \"ADULT\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"is_lead_guest\": false,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"answers\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"requirement_id\": \"br_title_all_guests_1\", \"value\": \"MRS\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"requirement_id\": \"br_first_name_all_guests_2\", \"value\": \"Aarohi\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"requirement_id\": \"br_last_name_all_guests_3\", \"value\": \"Gupta\" }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"room_allocation_id\": \"ra_957cff0ac25243f29eb43bc32eb82136\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"guests\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"guest_id\": \"guest_3\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"guest_type\": \"ADULT\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"is_lead_guest\": false,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"answers\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"requirement_id\": \"br_title_all_guests_1\", \"value\": \"MS\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"requirement_id\": \"br_first_name_all_guests_2\", \"value\": \"Meera\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"requirement_id\": \"br_last_name_all_guests_3\", \"value\": \"Gupta\" }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"guest_id\": \"guest_4\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"guest_type\": \"CHILD\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"is_lead_guest\": false,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"answers\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"requirement_id\": \"br_title_all_guests_1\", \"value\": \"MASTER\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"requirement_id\": \"br_first_name_all_guests_2\", \"value\": \"Arjun\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"requirement_id\": \"br_last_name_all_guests_3\", \"value\": \"Gupta\" }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`2`,id:`request-field-guide`,children:`Request field guide`}),`\n`,_jsx(Heading,{level:`3`,id:`headers`,children:`Headers`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`What it means`}),_jsx(_components.th,{children:`How to use it`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`Header `,_jsx(_components.code,{children:`Idempotency-Key`})]}),_jsx(_components.td,{children:`Your unique ID for this one booking attempt. Required, up to 128 characters.`}),_jsxs(_components.td,{children:[`Generate it in your backend and save it `,_jsx(_components.strong,{children:`before`}),` the first request. Resend the same key to retry safely. See `,_jsx(_components.a,{href:`#idempotency-and-safe-retries`,children:`Idempotency and safe retries`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`Header `,_jsx(_components.code,{children:`X-Unifystays-End-User-IP`})]}),_jsx(_components.td,{children:`The traveler’s public IP address at checkout.`}),_jsxs(_components.td,{children:[`Needed for RateHawk offers. Private, loopback, reserved and malformed addresses are ignored, and then the request fails with `,_jsx(_components.code,{children:`VALIDATION_ERROR`}),`. If you omit the header, the address of your server connection is used, so always send the traveler’s IP.`]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`body`,children:`Body`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Where to get it`}),_jsx(_components.th,{children:`How to use it`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`prebooking_id`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`data.prebooking_id`}),` from the successful prebook.`]}),_jsxs(_components.td,{children:[`Send it unchanged. It is single use and expires at the offer’s `,_jsx(_components.code,{children:`lifecycle.expires_at`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`accepted_offer_id`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`data.offer.offer_id`}),` from `,_jsx(_components.strong,{children:`the same`}),` prebook response.`]}),_jsxs(_components.td,{children:[`Confirms the guest accepted the refreshed offer. Any other value returns `,_jsx(_components.code,{children:`ACCEPTED_OFFER_MISMATCH`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`booking_mode`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`data.offer.lifecycle.available_booking_modes`}),`.`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`INSTANT`}),` (default) books now. `,_jsx(_components.code,{children:`HOLD`}),` only when the list contains `,_jsx(_components.code,{children:`HOLD`}),`; see `,_jsx(_components.a,{href:`#hold-bookings`,children:`Hold bookings`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`rooms[]`})}),_jsxs(_components.td,{children:[`One entry per room in prebook `,_jsx(_components.code,{children:`data.offer.rooms[]`}),`.`]}),_jsx(_components.td,{children:`Send every room exactly once. Order does not matter.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`rooms[].room_allocation_id`})}),_jsxs(_components.td,{children:[`The prebook room’s `,_jsx(_components.code,{children:`room_allocation_id`}),`.`]}),_jsxs(_components.td,{children:[`The only room identity accepted. Never send `,_jsx(_components.code,{children:`unifystays_room_id`}),`, family or variant IDs, room names or array positions.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`rooms[].guests[]`})}),_jsx(_components.td,{children:`Your checkout guest form.`}),_jsx(_components.td,{children:`All adults, children and infants staying in that room.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`guests[].guest_id`})}),_jsx(_components.td,{children:`Generate it.`}),_jsx(_components.td,{children:`Up to 100 characters, unique in the whole request. It only labels the guest in error messages.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`guests[].guest_type`})}),_jsx(_components.td,{children:`Your checkout guest form.`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ADULT`}),`, `,_jsx(_components.code,{children:`CHILD`}),` or `,_jsx(_components.code,{children:`INFANT`}),`. See `,_jsx(_components.a,{href:`#building-the-room-assignments`,children:`Building the room assignments`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`guests[].is_lead_guest`})}),_jsx(_components.td,{children:`Your checkout.`}),_jsxs(_components.td,{children:[`Exactly one guest in the whole booking is `,_jsx(_components.code,{children:`true`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`guests[].answers[]`})}),_jsxs(_components.td,{children:[`Built from prebook `,_jsx(_components.code,{children:`data.offer.booking_requirements[]`}),`.`]}),_jsxs(_components.td,{children:[`Each answer is `,_jsx(_components.code,{children:`{ \"requirement_id\", \"value\" }`}),` with a string value. See `,_jsx(_components.a,{href:`#answering-booking_requirements`,children:`Answering booking_requirements`}),`.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`There is no separate field for a contact, a client reference or special\nrequests. The guest contact is the lead guest’s `,_jsx(_components.code,{children:`EMAIL`}),` and `,_jsx(_components.code,{children:`PHONE`}),` answers\nwhen the offer asks for them. Use the `,_jsx(_components.code,{children:`Idempotency-Key`}),` as your reference: it\nis stored with the booking and you can look the booking up with it (see `,_jsx(_components.a,{href:`/api-reference/get-booking-by-idempotency-key`,children:`Get\nBooking by Idempotency Key`}),`).\nKeep your own order number next to the returned `,_jsx(_components.code,{children:`booking_id`}),` in your database.`]}),`\n`,_jsx(Heading,{level:`3`,id:`building-the-room-assignments`,children:`Building the room assignments`}),`\n`,_jsx(_components.p,{children:`For every room in the prebook response:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Copy its `,_jsx(_components.code,{children:`room_allocation_id`}),` into one booking room object.`]}),`\n`,_jsxs(_components.li,{children:[`Read the room’s `,_jsx(_components.code,{children:`occupancy.adults`}),` and `,_jsx(_components.code,{children:`occupancy.child_ages`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Add one `,_jsx(_components.code,{children:`ADULT`}),` guest per adult.`]}),`\n`,_jsxs(_components.li,{children:[`Add one minor per entry in `,_jsx(_components.code,{children:`child_ages`}),`. A child aged 0 or 1 is an `,_jsx(_components.code,{children:`INFANT`}),`;\nage 2 and over is a `,_jsx(_components.code,{children:`CHILD`}),`.`]}),`\n`,_jsx(_components.li,{children:`Repeat until every prebook room appears once.`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`An occupancy of `,_jsx(_components.code,{children:`{\"adults\": 1, \"child_ages\": [8]}`}),` needs one `,_jsx(_components.code,{children:`ADULT`}),` and one\n`,_jsx(_components.code,{children:`CHILD`}),`. The child’s age is already known from the search, so the guest object\nsupplies identity only. If you also send a `,_jsx(_components.code,{children:`DATE_OF_BIRTH`}),` answer for a\nchild, it must give the quoted age on the check-in date.`]}),`\n`,_jsxs(_components.p,{children:[`A room with `,_jsx(_components.code,{children:`mapping_status: \"UNMAPPED\"`}),` is booked through its\n`,_jsx(_components.code,{children:`room_allocation_id`}),` in exactly the same way as a mapped room.`]}),`\n`,_jsx(Heading,{level:`3`,id:`answering-booking_requirements`,children:`Answering booking_requirements`}),`\n`,_jsxs(_components.p,{children:[`The prebook offer’s `,_jsx(_components.code,{children:`booking_requirements`}),` tell you which data to collect. Treat\nthem as the form definition:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Send `,_jsx(_components.code,{children:`{ \"requirement_id\": \"...\", \"value\": \"...\" }`}),` and copy the id exactly.\nNever build ids from `,_jsx(_components.code,{children:`code`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`scope`}),` says who answers: `,_jsx(_components.code,{children:`ALL_GUESTS`}),`, `,_jsx(_components.code,{children:`LEAD_GUEST`}),` (only the guest with\n`,_jsx(_components.code,{children:`is_lead_guest: true`}),`), or `,_jsx(_components.code,{children:`ADULT`}),`, `,_jsx(_components.code,{children:`CHILD`}),`, `,_jsx(_components.code,{children:`INFANT`}),` (by `,_jsx(_components.code,{children:`guest_type`}),`). When\n`,_jsx(_components.code,{children:`room_allocation_ids`}),` is not empty, only guests in those rooms answer.`]}),`\n`,_jsxs(_components.li,{children:[`Answer every requirement with `,_jsx(_components.code,{children:`required: true`}),` that applies to the guest.\nMissing answers return `,_jsx(_components.code,{children:`VALIDATION_ERROR`}),` listing what is missing.`]}),`\n`,_jsxs(_components.li,{children:[`Do not answer requirements that do not apply to the guest, answer one twice, or\nsend an id the offer did not declare. These return `,_jsx(_components.code,{children:`VALIDATION_ERROR`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Values are checked against the requirement: an `,_jsx(_components.code,{children:`EMAIL`}),` must be an email, a\n`,_jsx(_components.code,{children:`PHONE`}),` must be in international format with a leading `,_jsx(_components.code,{children:`+`}),` (for example\n`,_jsx(_components.code,{children:`+919876543210`}),`), a `,_jsx(_components.code,{children:`DATE`}),` must be `,_jsx(_components.code,{children:`YYYY-MM-DD`}),`, a `,_jsx(_components.code,{children:`COUNTRY_CODE`}),` must be an\nuppercase two-letter code, an `,_jsx(_components.code,{children:`ENUM`}),` must be one of `,_jsx(_components.code,{children:`allowed_values`}),`, and\n`,_jsx(_components.code,{children:`constraints`}),` (length, pattern, age range) apply. Values cannot be empty.`]}),`\n`,_jsxs(_components.li,{children:[`Titles are `,_jsx(_components.code,{children:`MR`}),`, `,_jsx(_components.code,{children:`MRS`}),`, `,_jsx(_components.code,{children:`MS`}),`, `,_jsx(_components.code,{children:`MISS`}),`, `,_jsx(_components.code,{children:`MASTER`}),` or `,_jsx(_components.code,{children:`OTHER`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Which fields exist depends on the supplier. First name, last name and title\nare asked for every guest. Email and phone appear only when the supplier needs\nthem, so do not assume a lead-guest contact is required. Passport or tax-ID\nrequirements, when present, apply to every guest. Names for suppliers that\nlimit characters (for example RateHawk: letters, spaces and `,_jsx(_components.code,{children:`' - , . ’`}),` only)\ncarry a `,_jsx(_components.code,{children:`constraints.pattern`}),`; a breach returns `,_jsx(_components.code,{children:`GUEST_NAME_INVALID`}),` (422).`]}),`\n`,_jsxs(_components.li,{children:[`Some suppliers need a booking contact saved in your portal settings. If it is\nmissing the request fails with `,_jsx(_components.code,{children:`PROVIDER_CONFIGURATION_ERROR`}),` (422).`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`order-of-rooms-and-guests`,children:`Order of rooms and guests`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`rooms`}),` array can be sent in any order. Unifystays matches each entry by\n`,_jsx(_components.code,{children:`room_allocation_id`}),` and restores the supplier’s trusted room order itself.`]}),`\n`,_jsx(Heading,{level:`2`,id:`what-happens-next`,children:`What happens next`}),`\n`,_jsxs(_components.p,{children:[`Create Booking answers `,_jsx(_components.code,{children:`200`}),` with a booking in one of two starting states:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Starting status`}),_jsx(_components.th,{children:`When`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PROCESSING`})}),_jsxs(_components.td,{children:[`The accepted offer has a free-cancellation window that ends `,_jsx(_components.strong,{children:`more than 2 days`}),` from now, or a `,_jsx(_components.code,{children:`HOLD`}),` request. Also non-refundable offers and free windows that end within 2 days, `,_jsx(_components.strong,{children:`unless`}),` your organization requires approval for them.`]}),_jsx(_components.td,{children:`The booking is queued for the supplier straight away. No approval is needed.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`AWAITING_REVIEW`})}),_jsxs(_components.td,{children:[`Non-refundable offers, free windows that end within 2 days or have already ended, and unclear cancellation terms, `,_jsx(_components.strong,{children:`only if`}),` your organization turned on “Require approval for non-refundable bookings”.`]}),_jsx(_components.td,{children:`Nothing is reserved. An organization owner or admin approves it in the portal first.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Neither status is a confirmed reservation. A `,_jsx(_components.code,{children:`PROCESSING`}),` booking that is queued\ngoes to the supplier as it is; it never moves to `,_jsx(_components.code,{children:`AWAITING_REVIEW`}),` afterwards.`]}),`\n`,_jsxs(_components.p,{children:[`An organization owner can turn on `,_jsx(_components.strong,{children:`Require approval for non-refundable\nbookings`}),` in the portal under Settings, Organization. It is off by default.\nBookings that are non-refundable or whose free cancellation ends within 2 days\nare then held for approval, as described below.`]}),`\n`,_jsx(Heading,{level:`3`,id:`example-queued-for-the-supplier`,children:`Example: queued for the supplier`}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:``,numberOfLines:`29`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`29`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"contract_version\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Booking request accepted and is being processed.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"booking_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ubk_eGQ0dW9uV1Vi\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accepted_offer_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"off_65db5f20d91b47d3a73d834dfa44c50e\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"PROCESSING\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"is_terminal\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"provider\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"RATEHAWK\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"booking_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"booking_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"hotel_confirmation_number\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"hotel_confirmation_status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"hotel_confirmation_note\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"hotel_contact_phone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"hotel_contact_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"next_poll_after_ms\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"processing_reason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SUPPLIER_CONFIRMATION_PENDING\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"action_required\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"available_actions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GET_STATUS\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GET_DETAILS\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"review_expires_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-14T12:27:00.000Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"hold_deadline_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-14T12:12:11.000Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"updated_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-14T12:12:11.000Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`3`,id:`example-awaiting-approval`,children:`Example: awaiting approval`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`29`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`29`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"contract_version\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Booking request received and awaiting manual review. No supplier reservation has been created. Price and availability are not guaranteed.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"booking_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ubk_eGQ0dW9uV1Vi\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accepted_offer_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"off_65db5f20d91b47d3a73d834dfa44c50e\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"AWAITING_REVIEW\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"is_terminal\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"provider\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TRIPJACK\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"booking_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"booking_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"hotel_confirmation_number\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"hotel_confirmation_status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"hotel_confirmation_note\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"hotel_contact_phone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"hotel_contact_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"next_poll_after_ms\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"processing_reason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"MANUAL_REVIEW_REQUIRED\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"action_required\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"available_actions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GET_STATUS\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GET_DETAILS\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"REVIEW_BOOKING\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"review_expires_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-14T12:15:00.000Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"hold_deadline_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-14T12:12:11.000Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"updated_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-14T12:12:11.000Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Response key`}),_jsx(_components.th,{children:`What it means`}),_jsx(_components.th,{children:`What your integration should do`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`success`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`false`}),` only when `,_jsx(_components.code,{children:`status`}),` is `,_jsx(_components.code,{children:`FAILED`}),`.`]}),_jsxs(_components.td,{children:[`Do not treat `,_jsx(_components.code,{children:`true`}),` as booked. Read `,_jsx(_components.code,{children:`status`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data.booking_id`})}),_jsxs(_components.td,{children:[`Stable Unifystays booking ID (`,_jsx(_components.code,{children:`ubk_...`}),`).`]}),_jsx(_components.td,{children:`Save it immediately, next to your order. Use it for status, details, cancel and confirm-hold.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data.status`})}),_jsx(_components.td,{children:`Current state. See the table below.`}),_jsx(_components.td,{children:`Branch on this.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data.is_terminal`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`true`}),` when the current step is finished.`]}),_jsxs(_components.td,{children:[`Stop polling when `,_jsx(_components.code,{children:`true`}),`, but check `,_jsx(_components.code,{children:`available_actions`}),` (an `,_jsx(_components.code,{children:`ON_HOLD`}),` booking is terminal yet needs your action).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data.next_poll_after_ms`})}),_jsx(_components.td,{children:`Milliseconds to wait before polling again.`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`null`}),` right after creation. Poll about every 5 seconds, or wait for webhooks.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data.processing_reason`})}),_jsx(_components.td,{children:`Why it is not final yet.`}),_jsxs(_components.td,{children:[`Display for support. Values are listed on `,_jsx(_components.a,{href:`/api-reference/get-booking-status`,children:`Get Booking Status`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data.action_required`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`true`}),` when a person must act.`]}),_jsxs(_components.td,{children:[`Read `,_jsx(_components.code,{children:`available_actions`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data.review_expires_at`})}),_jsx(_components.td,{children:`Deadline of the prebooked offer’s supplier quote.`}),_jsx(_components.td,{children:`Informational. Do not cancel or refund the guest because of it (see below).`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data.hold_deadline_at`})}),_jsxs(_components.td,{children:[`Deadline to confirm a `,_jsx(_components.code,{children:`HOLD`}),` booking.`]}),_jsxs(_components.td,{children:[`See `,_jsx(_components.a,{href:`/api-reference/confirm-hold`,children:`Confirm Hold`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data.provider`})}),_jsx(_components.td,{children:`Supplier references and hotel confirmation details.`}),_jsxs(_components.td,{children:[`Store them for support. Show `,_jsx(_components.code,{children:`hotel_confirmation_number`}),` to the guest when it appears.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`booking-statuses-and-what-to-do`,children:`Booking statuses and what to do`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Meaning`}),_jsx(_components.th,{children:`Your next step`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`AWAITING_REVIEW`})}),_jsx(_components.td,{children:`Received, not reserved. Waiting for approval in the portal.`}),_jsx(_components.td,{children:`Show “Awaiting verification: room and price are not reserved.” Do not issue a voucher. Wait for the webhook; poll rarely.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PROCESSING`})}),_jsx(_components.td,{children:`The supplier is booking it, or its answer is being checked.`}),_jsxs(_components.td,{children:[`Wait for `,_jsx(_components.code,{children:`booking.confirmed`}),` / `,_jsx(_components.code,{children:`booking.failed`}),` webhooks, or poll `,_jsx(_components.a,{href:`/api-reference/get-booking-status`,children:`Get Booking Status`}),` every few seconds.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CONFIRMED`})}),_jsx(_components.td,{children:`Booked.`}),_jsxs(_components.td,{children:[`Issue the voucher. The hotel confirmation number can arrive later; it is announced by a `,_jsx(_components.code,{children:`booking.updated`}),` webhook. Load `,_jsx(_components.a,{href:`/api-reference/get-booking-details`,children:`details`}),` for the itinerary.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ON_HOLD`})}),_jsxs(_components.td,{children:[`A `,_jsx(_components.code,{children:`HOLD`}),` booking is reserved but not final.`]}),_jsxs(_components.td,{children:[`Call `,_jsx(_components.a,{href:`/api-reference/confirm-hold`,children:`Confirm Hold`}),` before `,_jsx(_components.code,{children:`hold_deadline_at`}),`, or let it lapse.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`FAILED`})}),_jsxs(_components.td,{children:[`The booking was not made. `,_jsx(_components.code,{children:`message`}),` carries the reason.`]}),_jsxs(_components.td,{children:[`Tell the guest. Read `,_jsx(_components.code,{children:`failure.code`}),` in `,_jsx(_components.a,{href:`/api-reference/get-booking-details`,children:`Get Booking Details`}),`. To try again, prebook again and use a `,_jsx(_components.strong,{children:`new`}),` idempotency key.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CANCELLATION_PENDING`})}),_jsx(_components.td,{children:`A cancellation is in progress.`}),_jsxs(_components.td,{children:[`Poll until `,_jsx(_components.code,{children:`CANCELLED`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CANCELLED`})}),_jsx(_components.td,{children:`The booking is cancelled.`}),_jsx(_components.td,{children:`Final.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Webhook events for bookings are `,_jsx(_components.code,{children:`booking.created`}),`, `,_jsx(_components.code,{children:`booking.confirmed`}),`,\n`,_jsx(_components.code,{children:`booking.failed`}),`, `,_jsx(_components.code,{children:`booking.cancellation_requested`}),`, `,_jsx(_components.code,{children:`booking.cancelled`}),`,\n`,_jsx(_components.code,{children:`booking.cancellation_failed`}),` and `,_jsx(_components.code,{children:`booking.updated`}),` (other status changes such as\n`,_jsx(_components.code,{children:`PROCESSING`}),` to `,_jsx(_components.code,{children:`ON_HOLD`}),`, and new supplier references). Webhooks can arrive late\nor more than once, so make your handler safe to repeat and keep polling as a\nfallback. See `,_jsx(_components.a,{href:`/guides/webhooks`,children:`Webhooks`}),`.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`If the status is `,_jsx(_components.code,{children:`PROCESSING`}),` with `,_jsx(_components.code,{children:`processing_reason: \"RECONCILIATION_REQUIRED\"`}),`\nand `,_jsx(_components.code,{children:`CONTACT_SUPPORT`}),` in `,_jsx(_components.code,{children:`available_actions`}),`, the supplier’s answer was\nuncertain. Do not book again; contact support with the `,_jsx(_components.code,{children:`booking_id`}),`.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`approval-for-bookings-outside-free-cancellation`,children:`Approval for bookings outside free cancellation`}),`\n`,_jsx(_components.p,{children:`This applies only to organizations that require approval for non-refundable\nbookings.`}),`\n`,_jsxs(_components.p,{children:[`For `,_jsx(_components.code,{children:`AWAITING_REVIEW`}),`, show “Awaiting verification, room and price are not\nreserved”. An organization owner or admin reviews the saved hotel, rooms,\nguests, price and cancellation terms in the portal and chooses `,_jsx(_components.strong,{children:`Approve and\nbook`}),`. `,_jsx(_components.code,{children:`REVIEW_BOOKING`}),` is a portal action; API keys cannot approve.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`The booking reference and the price you agreed stay the same. If the supplier\nquote has expired, the reviewer obtains a fresh quote in the portal and\naccepts any supplier cost difference.`}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`data.review_expires_at`}),` is the quote deadline. Manual requests stay\n`,_jsx(_components.code,{children:`AWAITING_REVIEW`}),` after it passes; do not cancel or refund because of this\ntimestamp. Approval and supplier submission must happen before the fresh quote\nexpires.`]}),`\n`,_jsxs(_components.li,{children:[`Rejection ends in `,_jsx(_components.code,{children:`FAILED`}),` with `,_jsx(_components.code,{children:`failure.code`}),` `,_jsx(_components.code,{children:`BOOKING_REVIEW_REJECTED`}),`.\nExpiry while a free-cancellation booking waits for submission ends in\n`,_jsx(_components.code,{children:`FAILED`}),` with `,_jsx(_components.code,{children:`BOOKING_REVIEW_EXPIRED`}),`, before any reservation is submitted.\nA finished request cannot be refreshed.`]}),`\n`,_jsxs(_components.li,{children:[`A request that is still `,_jsx(_components.code,{children:`AWAITING_REVIEW`}),` is closed automatically as `,_jsx(_components.code,{children:`FAILED`}),`\nwith `,_jsx(_components.code,{children:`BOOKING_REVIEW_EXPIRED`}),` (and a `,_jsx(_components.code,{children:`booking.failed`}),` webhook) when its quote\nexpired more than 24 hours ago, when the check-in date has arrived, or when\nyou already have a `,_jsx(_components.code,{children:`CONFIRMED`}),` booking for the same hotel, dates, lead guest\nand number of rooms. Nothing was reserved, so no refund is needed beyond your\nusual handling of failed bookings.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`hold-bookings`,children:`Hold bookings`}),`\n`,_jsxs(_components.p,{children:[`Send `,_jsx(_components.code,{children:`\"booking_mode\": \"HOLD\"`}),` only if prebook `,_jsx(_components.code,{children:`lifecycle.available_booking_modes`}),`\ncontains `,_jsx(_components.code,{children:`HOLD`}),` (`,_jsx(_components.code,{children:`lifecycle.hold_allowed`}),` is `,_jsx(_components.code,{children:`true`}),`). Otherwise the request\nfails with `,_jsx(_components.code,{children:`HOLD_NOT_ALLOWED`}),` (409). The booking is reserved with the supplier\nbut not final: it goes `,_jsx(_components.code,{children:`PROCESSING`}),`, then `,_jsx(_components.code,{children:`ON_HOLD`}),`, with `,_jsx(_components.code,{children:`hold_deadline_at`}),` set.\nIt is announced by a `,_jsx(_components.code,{children:`booking.updated`}),` webhook. Then confirm it or let it lapse.\nDetails are on `,_jsx(_components.a,{href:`/api-reference/confirm-hold`,children:`Confirm Hold`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`A hold never waits for review: it costs nothing until confirmed, so it goes to\nthe supplier straight away however close its deadline is. If the hold deadline\nhas already passed, the request fails with `,_jsx(_components.code,{children:`HOLD_DEADLINE_EXPIRED`}),` (409).`]}),`\n`,_jsx(Heading,{level:`2`,id:`idempotency-and-safe-retries`,children:`Idempotency and safe retries`}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Generate one unique key per customer booking attempt. Save it before the first\nrequest. On a timeout or an unreadable response, retry with the `,_jsx(_components.strong,{children:`same key and\nthe same request body`}),`.`]})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`A repeat with the same key and the same body returns the `,_jsx(_components.strong,{children:`original booking`}),`\n(`,_jsx(_components.code,{children:`200`}),`, same `,_jsx(_components.code,{children:`booking_id`}),`). It never creates a second reservation, even after\nthe `,_jsx(_components.code,{children:`prebooking_id`}),` has been used. Array order and answer order do not\nchange the match.`]}),`\n`,_jsxs(_components.li,{children:[`The same key with a different body returns `,_jsx(_components.code,{children:`409`}),` `,_jsx(_components.code,{children:`IDEMPOTENCY_KEY_REUSED`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Keys are private to your organization and may be up to 128 characters. A missing\nkey returns `,_jsx(_components.code,{children:`IDEMPOTENCY_KEY_REQUIRED`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`If you never received the response, ask `,_jsx(_components.a,{href:`/api-reference/get-booking-by-idempotency-key`,children:`Get Booking by Idempotency\nKey`}),`. `,_jsx(_components.code,{children:`404`}),` means no booking was created, so it is\nsafe to resend with the same key.`]}),`\n`,_jsxs(_components.li,{children:[`A request that fails validation creates nothing and does not consume the\n`,_jsx(_components.code,{children:`prebooking_id`}),`. Correct the body and resend (same key is fine).`]}),`\n`,_jsx(_components.li,{children:`Use a new key only when the customer intentionally starts a new attempt, for\nexample after returning to the rooms and prebooking again. A new key is a new\nbooking.`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`errors-to-handle`,children:`Errors to handle`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Code (HTTP)`}),_jsx(_components.th,{children:`Meaning`}),_jsx(_components.th,{children:`What to do`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`IDEMPOTENCY_KEY_REQUIRED`}),` (400)`]}),_jsx(_components.td,{children:`Missing header.`}),_jsxs(_components.td,{children:[`Send `,_jsx(_components.code,{children:`Idempotency-Key`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`IDEMPOTENCY_KEY_REUSED`}),` (409)`]}),_jsx(_components.td,{children:`Key already used with a different body.`}),_jsx(_components.td,{children:`Resend the original body, or use a new key for a new attempt.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`PREBOOKING_ID_INVALID`}),`, `,_jsx(_components.code,{children:`PREBOOKING_ID_EXPIRED`}),`, `,_jsx(_components.code,{children:`PREBOOKING_ID_ALREADY_USED`}),`, `,_jsx(_components.code,{children:`PREBOOKING_ID_CONTEXT_NOT_FOUND`}),` (400 / 409)`]}),_jsx(_components.td,{children:`The prebooking cannot be used.`}),_jsx(_components.td,{children:`Prebook again. Do not edit or reuse the old ID.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ACCEPTED_OFFER_MISMATCH`}),` (400)`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`accepted_offer_id`}),` is not the prebook offer.`]}),_jsxs(_components.td,{children:[`Send `,_jsx(_components.code,{children:`data.offer.offer_id`}),` from the same prebook response.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`BOOKING_ROOM_COUNT_MISMATCH`}),`, `,_jsx(_components.code,{children:`BOOKING_ROOM_ALLOCATION_MISMATCH`}),` (400)`]}),_jsx(_components.td,{children:`Rooms are missing, duplicated or unknown.`}),_jsxs(_components.td,{children:[`Rebuild `,_jsx(_components.code,{children:`rooms`}),` from every prebook `,_jsx(_components.code,{children:`room_allocation_id`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`BOOKING_ROOM_OCCUPANCY_MISMATCH`}),` (400)`]}),_jsx(_components.td,{children:`Guest counts, child types or dates of birth do not match the room.`}),_jsxs(_components.td,{children:[`Match the adults and children (with `,_jsx(_components.code,{children:`INFANT`}),` / `,_jsx(_components.code,{children:`CHILD`}),` by age) to `,_jsx(_components.code,{children:`occupancy`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`VALIDATION_ERROR`}),` (400)`]}),_jsx(_components.td,{children:`Bad body, lead guest count, duplicate guest ID, missing or invalid answers, missing traveler IP for RateHawk, missing PAN or passport.`}),_jsxs(_components.td,{children:[`Read `,_jsx(_components.code,{children:`error.message`}),`; fix and resend.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`GUEST_NAME_INVALID`}),` (422)`]}),_jsx(_components.td,{children:`A name breaks the supplier’s character rule.`}),_jsxs(_components.td,{children:[`Apply the requirement’s `,_jsx(_components.code,{children:`constraints.pattern`}),` in your form and resend.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`HOLD_NOT_ALLOWED`}),` (409)`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`HOLD`}),` requested but not offered.`]}),_jsxs(_components.td,{children:[`Book with `,_jsx(_components.code,{children:`INSTANT`}),`, or choose a holdable offer.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`HOLD_DEADLINE_EXPIRED`}),` (409)`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`HOLD`}),` requested but the offer’s hold deadline has passed.`]}),_jsxs(_components.td,{children:[`Prebook again, or book with `,_jsx(_components.code,{children:`INSTANT`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`HOTEL_MAPPING_UNVERIFIED`}),` (409)`]}),_jsx(_components.td,{children:`The supplier’s listing could not be verified for this hotel.`}),_jsx(_components.td,{children:`Offer another room option.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`HOTEL_MAPPING_CHECK_PENDING`}),` (409)`]}),_jsx(_components.td,{children:`Verification still running.`}),_jsx(_components.td,{children:`Retry after a few seconds.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`PROVIDER_NOT_AUTHORIZED`}),` (403), `,_jsx(_components.code,{children:`PROVIDER_CONFIGURATION_ERROR`}),` (422)`]}),_jsx(_components.td,{children:`Your organization is not set up for this supplier or its booking contact.`}),_jsx(_components.td,{children:`Fix the setup in your portal or contact support.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PROVIDER_OPERATION_NOT_SUPPORTED`})}),_jsx(_components.td,{children:`The offer cannot be booked through the API.`}),_jsx(_components.td,{children:`Offer another room option.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`BOOKING_CREATE_FAILED`})}),_jsx(_components.td,{children:`Unexpected failure while saving the booking.`}),_jsx(_components.td,{children:`Look the booking up by idempotency key before trying again.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`The error envelope and request IDs are described in `,_jsx(_components.a,{href:`/errors`,children:`Errors \u0026\nRetries`}),`.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Booking contains guest personal data. Send it only from your trusted backend\nand avoid writing unprotected guest information to client-side logs.`})}),`\n`,_jsx(_components.p,{children:`The OpenAPI section below documents all booking fields and responses.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create Booking","description":"Create an idempotent hotel booking from a successful Unifystays prebooking response.","openapi":"reference/openapi.json POST /hotels/book","href":"/api-reference/create-booking"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Request example","slug":"request-example","depth":2,"children":[]},{"title":"Request field guide","slug":"request-field-guide","depth":2,"children":[{"title":"Headers","slug":"headers","depth":3,"children":[]},{"title":"Body","slug":"body","depth":3,"children":[]},{"title":"Building the room assignments","slug":"building-the-room-assignments","depth":3,"children":[]},{"title":"Answering booking_requirements","slug":"answering-booking_requirements","depth":3,"children":[]},{"title":"Order of rooms and guests","slug":"order-of-rooms-and-guests","depth":3,"children":[]}]},{"title":"What happens next","slug":"what-happens-next","depth":2,"children":[{"title":"Example: queued for the supplier","slug":"example-queued-for-the-supplier","depth":3,"children":[]},{"title":"Example: awaiting approval","slug":"example-awaiting-approval","depth":3,"children":[]}]},{"title":"Booking statuses and what to do","slug":"booking-statuses-and-what-to-do","depth":2,"children":[{"title":"Approval for bookings outside free cancellation","slug":"approval-for-bookings-outside-free-cancellation","depth":3,"children":[]}]},{"title":"Hold bookings","slug":"hold-bookings","depth":2,"children":[]},{"title":"Idempotency and safe retries","slug":"idempotency-and-safe-retries","depth":2,"children":[]},{"title":"Errors to handle","slug":"errors-to-handle","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"65\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$UNIFYSTAYS_BASE_URL\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">/hotels/book\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"content-type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"x-api-key: \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$UNIFYSTAYS_API_KEY\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Idempotency-Key: order-2987349823-booking-1\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"X-Unifystays-End-User-IP: 8.8.8.8\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"prebooking_id\": \"pbq7.bjNQb1Y5R2hRWEg.k6jQ3nW4cF1nL4MWvN7A9Q\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"accepted_offer_id\": \"off_65db5f20d91b47d3a73d834dfa44c50e\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"booking_mode\": \"INSTANT\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"rooms\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"room_allocation_id\": \"ra_2c1fb39ed54742f28d95bd8bc5f4375d\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"guests\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"guest_id\": \"guest_1\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"guest_type\": \"ADULT\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"is_lead_guest\": true,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"answers\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> { \"requirement_id\": \"br_title_all_guests_1\", \"value\": \"MR\" },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> { \"requirement_id\": \"br_first_name_all_guests_2\", \"value\": \"Shubham\" },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> { \"requirement_id\": \"br_last_name_all_guests_3\", \"value\": \"Gupta\" },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> { \"requirement_id\": \"br_email_lead_guest_4\", \"value\": \"shubham@example.com\" },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> { \"requirement_id\": \"br_phone_lead_guest_5\", \"value\": \"+919876543210\" }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"guest_id\": \"guest_2\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"guest_type\": \"ADULT\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"is_lead_guest\": false,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"answers\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> { \"requirement_id\": \"br_title_all_guests_1\", \"value\": \"MRS\" },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> { \"requirement_id\": \"br_first_name_all_guests_2\", \"value\": \"Aarohi\" },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> { \"requirement_id\": \"br_last_name_all_guests_3\", \"value\": \"Gupta\" }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"room_allocation_id\": \"ra_957cff0ac25243f29eb43bc32eb82136\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"guests\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"guest_id\": \"guest_3\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"guest_type\": \"ADULT\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"is_lead_guest\": false,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"answers\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> { \"requirement_id\": \"br_title_all_guests_1\", \"value\": \"MS\" },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> { \"requirement_id\": \"br_first_name_all_guests_2\", \"value\": \"Meera\" },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> { \"requirement_id\": \"br_last_name_all_guests_3\", \"value\": \"Gupta\" }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"guest_id\": \"guest_4\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"guest_type\": \"CHILD\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"is_lead_guest\": false,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"answers\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> { \"requirement_id\": \"br_title_all_guests_1\", \"value\": \"MASTER\" },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> { \"requirement_id\": \"br_first_name_all_guests_2\", \"value\": \"Arjun\" },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> { \"requirement_id\": \"br_last_name_all_guests_3\", \"value\": \"Gupta\" }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"29\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"contract_version\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"success\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Booking request accepted and is being processed.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"data\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"booking_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"ubk_eGQ0dW9uV1Vi\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"accepted_offer_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"off_65db5f20d91b47d3a73d834dfa44c50e\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"PROCESSING\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"is_terminal\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"provider\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"RATEHAWK\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"booking_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"booking_code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"hotel_confirmation_number\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"hotel_confirmation_status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"hotel_confirmation_note\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"hotel_contact_phone\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"hotel_contact_name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"next_poll_after_ms\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"processing_reason\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"SUPPLIER_CONFIRMATION_PENDING\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"action_required\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"available_actions\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"GET_STATUS\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"GET_DETAILS\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"review_expires_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-09-14T12:27:00.000Z\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"hold_deadline_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"created_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-09-14T12:12:11.000Z\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"updated_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-09-14T12:12:11.000Z\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}}},"jsLinks":[],"openApiReferenceData":{"operation":{"description":"Create an idempotent hotel booking from a successful Unifystays prebooking response.","operationId":"HotelBookingController_book","parameters":["3673dba5-cb20-4576-81f0-2618e9169394","d5129914-ae44-449f-9edc-0882c6585c57","1f33d12f-6a82-4e1c-910a-a709c1df07d9","5a56f0fe-f485-47e6-a66c-9a196c7f17c0","0ee0a11c-4be8-470e-b943-26cd383d6d62"],"requestBody":"381bf943-e273-4c14-920b-f34dedf62b43","responses":{"200":"d111302c-a5c4-4398-9af0-02c23e4ab82a","400":"d7ac1af9-2d6f-44ad-9f65-8b89abd1e59d","406":"0e28cd74-5e77-4022-b956-03725eac5fca","409":"e3438e57-fc9e-4ce5-96b1-d137766d9433"},"summary":"Create hotel booking (async-safe, idempotent)","tags":["Hotels"],"method":"post","type":"path","servers":["58b3027e-a79b-4d2c-898a-ec7cc8ae6eae","32e511f6-5caf-4d51-acd6-ad4d164fb151"],"security":["71ce26d4-cf7b-4d3b-ab99-f95701a1c420"],"path":"/hotels/book","baseUrlOptions":["https://api-sandbox.unifystays.com","https://api.unifystays.com"],"title":"Create hotel booking (async-safe, idempotent)","codeSamples":[],"requiredOnlyExamples":false,"requestExamples":[{"dropdown":false,"language":"shellscript","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"shellscript","children":{"type":"code","key":null,"ref":null,"props":{"language":"shellscript","numberOfLines":"65","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#DCDCAA"},"children":"curl"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"$UNIFYSTAYS_BASE_URL"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"/hotels/book\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -X"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" POST"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -H"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"content-type: application/json\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -H"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"x-api-key: "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"$UNIFYSTAYS_API_KEY"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -H"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"Idempotency-Key: order-2987349823-booking-1\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -H"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"X-Unifystays-End-User-IP: 8.8.8.8\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -d"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" '{"}}]}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"prebooking_id\": \"pbq7.bjNQb1Y5R2hRWEg.k6jQ3nW4cF1nL4MWvN7A9Q\","}}}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"accepted_offer_id\": \"off_65db5f20d91b47d3a73d834dfa44c50e\","}}}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"booking_mode\": \"INSTANT\","}}}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"rooms\": ["}}}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" {"}}}},"\n",{"type":"span","key":"24","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"room_allocation_id\": \"ra_2c1fb39ed54742f28d95bd8bc5f4375d\","}}}},"\n",{"type":"span","key":"26","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"guests\": ["}}}},"\n",{"type":"span","key":"28","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" {"}}}},"\n",{"type":"span","key":"30","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"guest_id\": \"guest_1\","}}}},"\n",{"type":"span","key":"32","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"guest_type\": \"ADULT\","}}}},"\n",{"type":"span","key":"34","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"is_lead_guest\": true,"}}}},"\n",{"type":"span","key":"36","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"answers\": ["}}}},"\n",{"type":"span","key":"38","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" { \"requirement_id\": \"br_title_all_guests_1\", \"value\": \"MR\" },"}}}},"\n",{"type":"span","key":"40","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" { \"requirement_id\": \"br_first_name_all_guests_2\", \"value\": \"Shubham\" },"}}}},"\n",{"type":"span","key":"42","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" { \"requirement_id\": \"br_last_name_all_guests_3\", \"value\": \"Gupta\" },"}}}},"\n",{"type":"span","key":"44","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" { \"requirement_id\": \"br_email_lead_guest_4\", \"value\": \"shubham@example.com\" },"}}}},"\n",{"type":"span","key":"46","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" { \"requirement_id\": \"br_phone_lead_guest_5\", \"value\": \"+919876543210\" }"}}}},"\n",{"type":"span","key":"48","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" ]"}}}},"\n",{"type":"span","key":"50","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" },"}}}},"\n",{"type":"span","key":"52","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" {"}}}},"\n",{"type":"span","key":"54","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"guest_id\": \"guest_2\","}}}},"\n",{"type":"span","key":"56","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"guest_type\": \"ADULT\","}}}},"\n",{"type":"span","key":"58","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"is_lead_guest\": false,"}}}},"\n",{"type":"span","key":"60","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"answers\": ["}}}},"\n",{"type":"span","key":"62","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" { \"requirement_id\": \"br_title_all_guests_1\", \"value\": \"MRS\" },"}}}},"\n",{"type":"span","key":"64","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" { \"requirement_id\": \"br_first_name_all_guests_2\", \"value\": \"Aarohi\" },"}}}},"\n",{"type":"span","key":"66","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" { \"requirement_id\": \"br_last_name_all_guests_3\", \"value\": \"Gupta\" }"}}}},"\n",{"type":"span","key":"68","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" ]"}}}},"\n",{"type":"span","key":"70","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" }"}}}},"\n",{"type":"span","key":"72","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" ]"}}}},"\n",{"type":"span","key":"74","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" },"}}}},"\n",{"type":"span","key":"76","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" {"}}}},"\n",{"type":"span","key":"78","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"room_allocation_id\": \"ra_957cff0ac25243f29eb43bc32eb82136\","}}}},"\n",{"type":"span","key":"80","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"guests\": ["}}}},"\n",{"type":"span","key":"82","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" {"}}}},"\n",{"type":"span","key":"84","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"guest_id\": \"guest_3\","}}}},"\n",{"type":"span","key":"86","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"guest_type\": \"ADULT\","}}}},"\n",{"type":"span","key":"88","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"is_lead_guest\": false,"}}}},"\n",{"type":"span","key":"90","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"answers\": ["}}}},"\n",{"type":"span","key":"92","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" { \"requirement_id\": \"br_title_all_guests_1\", \"value\": \"MS\" },"}}}},"\n",{"type":"span","key":"94","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" { \"requirement_id\": \"br_first_name_all_guests_2\", \"value\": \"Meera\" },"}}}},"\n",{"type":"span","key":"96","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" { \"requirement_id\": \"br_last_name_all_guests_3\", \"value\": \"Gupta\" }"}}}},"\n",{"type":"span","key":"98","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" ]"}}}},"\n",{"type":"span","key":"100","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" },"}}}},"\n",{"type":"span","key":"102","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" {"}}}},"\n",{"type":"span","key":"104","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"guest_id\": \"guest_4\","}}}},"\n",{"type":"span","key":"106","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"guest_type\": \"CHILD\","}}}},"\n",{"type":"span","key":"108","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"is_lead_guest\": false,"}}}},"\n",{"type":"span","key":"110","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"answers\": ["}}}},"\n",{"type":"span","key":"112","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" { \"requirement_id\": \"br_title_all_guests_1\", \"value\": \"MASTER\" },"}}}},"\n",{"type":"span","key":"114","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" { \"requirement_id\": \"br_first_name_all_guests_2\", \"value\": \"Arjun\" },"}}}},"\n",{"type":"span","key":"116","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" { \"requirement_id\": \"br_last_name_all_guests_3\", \"value\": \"Gupta\" }"}}}},"\n",{"type":"span","key":"118","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" ]"}}}},"\n",{"type":"span","key":"120","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" }"}}}},"\n",{"type":"span","key":"122","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" ]"}}}},"\n",{"type":"span","key":"124","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" }"}}}},"\n",{"type":"span","key":"126","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" ]"}}}},"\n",{"type":"span","key":"128","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" }'"}}}},"\n"]}}}},"filename":""}],"requestExampleType":"mdx","responseExamples":[{"dropdown":false,"language":"json","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"json","children":{"type":"code","key":null,"ref":null,"props":{"language":"json","numberOfLines":"29","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"{"}}}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"contract_version\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"2\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"success\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"true"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"message\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"Booking request accepted and is being processed.\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"data\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": {"}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"booking_id\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"ubk_eGQ0dW9uV1Vi\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"accepted_offer_id\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"off_65db5f20d91b47d3a73d834dfa44c50e\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"status\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"PROCESSING\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"is_terminal\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"false"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"provider\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": {"}}]}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"code\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"RATEHAWK\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"booking_id\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"null"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"24","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"booking_code\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"null"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"26","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"hotel_confirmation_number\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"null"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"28","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"hotel_confirmation_status\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"null"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"30","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"hotel_confirmation_note\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"null"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"32","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"hotel_contact_phone\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"null"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"34","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"hotel_contact_name\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"null"}}]}},"\n",{"type":"span","key":"36","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" },"}}}},"\n",{"type":"span","key":"38","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"next_poll_after_ms\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"null"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"40","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"processing_reason\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"SUPPLIER_CONFIRMATION_PENDING\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"42","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"action_required\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"false"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"44","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"available_actions\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": ["}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"GET_STATUS\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"GET_DETAILS\""}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"],"}}]}},"\n",{"type":"span","key":"46","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"review_expires_at\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"2026-09-14T12:27:00.000Z\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"48","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"hold_deadline_at\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"null"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"50","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"created_at\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"2026-09-14T12:12:11.000Z\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"52","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"updated_at\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"2026-09-14T12:12:11.000Z\""}}]}},"\n",{"type":"span","key":"54","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" }"}}}},"\n",{"type":"span","key":"56","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"}"}}}},"\n"]}}}},"filename":""}],"responseExampleType":"mdx"},"dependencies":{"parameters":{"3673dba5-cb20-4576-81f0-2618e9169394":{"name":"X-Unifystays-End-User-IP","in":"header","description":"Public IPv4 or IPv6 address of the traveler completing checkout. Needed for RateHawk offers: when it is missing or not a public address (private, loopback and reserved ranges are rejected) the request fails with VALIDATION_ERROR. If you omit the header the connection address is used, so send it whenever your server calls on the traveler's behalf.","required":false,"schema":{"type":"string","isRequired":false,"description":"Public IPv4 or IPv6 address of the traveler completing checkout. Needed for RateHawk offers: when it is missing or not a public address (private, loopback and reserved ranges are rejected) the request fails with VALIDATION_ERROR. If you omit the header the connection address is used, so send it whenever your server calls on the traveler's behalf.","uniqueKey":"","typeLabel":"string"}},"d5129914-ae44-449f-9edc-0882c6585c57":{"name":"Idempotency-Key","in":"header","description":"Required, max 128 characters. One unique key per booking attempt, saved before you send the request. Resending the same key with the same body (after a timeout, for example) returns the original booking and never books twice. The same key with a different body returns 409 IDEMPOTENCY_KEY_REUSED. Use a new key only for a new attempt.","required":true,"schema":{"type":"string","isRequired":true,"description":"Required, max 128 characters. One unique key per booking attempt, saved before you send the request. Resending the same key with the same body (after a timeout, for example) returns the original booking and never books twice. The same key with a different body returns 409 IDEMPOTENCY_KEY_REUSED. Use a new key only for a new attempt.","uniqueKey":"","typeLabel":"string"}},"1f33d12f-6a82-4e1c-910a-a709c1df07d9":{"name":"language","description":"Enter language code(ex. en)","in":"header","schema":{}},"5a56f0fe-f485-47e6-a66c-9a196c7f17c0":{"name":"X-Unifystays-Contract-Version","in":"header","required":false,"description":"Hotel API contract version. Optional: 2 is the current version and the default.","schema":{"type":"string","enum":["2"],"default":"2","isRequired":false,"description":"Hotel API contract version. Optional: 2 is the current version and the default.","uniqueKey":"","typeLabel":"enum\u003cstring>"}},"0ee0a11c-4be8-470e-b943-26cd383d6d62":{"name":"X-Unifystays-Currency","in":"header","required":false,"description":"ISO 4217 currency for display amounts (display_ledger, display_amount, commercial_display). Optional: defaults to your organization's display currency, USD unless configured. Read pricing.display_currency in the response.","schema":{"type":"string","minLength":3,"maxLength":3,"example":"EUR","isRequired":false,"description":"ISO 4217 currency for display amounts (display_ledger, display_amount, commercial_display). Optional: defaults to your organization's display currency, USD unless configured. Read pricing.display_currency in the response.","uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prebooking_id":{"type":"string","description":"The `data.prebooking_id` from the successful Prebook response. It is single use and expires with the prebooked offer (`offer.lifecycle.expires_at`). If this request fails validation the id is not consumed and you may correct the body and resend.","example":"pbq7.bjNQb1Y5R2hRWEg.k6jQ3nW4cF1nL4MWvN7A9Q","isRequired":true,"uniqueKey":"prebooking_id","typeLabel":"string"},"accepted_offer_id":{"type":"string","example":"off_65db5f20d91b47d3a73d834dfa44c50e","description":"The `data.offer.offer_id` from the same Prebook response as `prebooking_id`. It confirms you are booking the refreshed offer the guest saw and accepted; any other id is rejected with ACCEPTED_OFFER_MISMATCH.","isRequired":true,"uniqueKey":"accepted_offer_id","typeLabel":"string"},"rooms":{"description":"One entry per room in the prebook offer's `rooms[]`, each with its guests. The count must equal the number of prebook rooms and array order does not matter.","type":"array","items":{"type":"object","properties":{"room_allocation_id":{"type":"string","description":"The `room_allocation_id` of one room in the prebook offer's `rooms[]`. Send every allocation exactly once. Do not use family, variant or `unifystays_room_id` values here.","example":"ra_2c1fb39ed54742f28d95bd8bc5f4375d","isRequired":true,"uniqueKey":"rooms.items.[INDEX].room_allocation_id","typeLabel":"string"},"guests":{"description":"Every guest staying in this room: all adults and all children and infants, with the counts from the room's prebook `occupancy`. At least one guest.","type":"array","items":{"type":"object","properties":{"guest_id":{"type":"string","example":"guest_1","description":"Identifier you generate for this guest (max 100 characters, for example `guest_1`). It must be unique across the whole request and is used only to point at the guest in error messages. It is not sent to the hotel.","isRequired":true,"uniqueKey":"rooms.items.[INDEX].guests.items.[INDEX].guest_id","typeLabel":"string"},"guest_type":{"type":"string","enum":["ADULT","CHILD","INFANT"],"example":"ADULT","description":"ADULT, CHILD or INFANT. Counts must match the room's prebook `occupancy`: one ADULT per adult, and one minor per entry in `child_ages`, typed by the quoted age (INFANT for age 0-1, CHILD for age 2 and over).","isRequired":true,"uniqueKey":"rooms.items.[INDEX].guests.items.[INDEX].guest_type","typeLabel":"enum\u003cstring>"},"is_lead_guest":{"type":"boolean","example":true,"description":"Marks the main guest. Exactly one guest across the whole booking (all rooms) must be true. Requirements with scope LEAD_GUEST (such as EMAIL and PHONE) apply only to this guest.","isRequired":true,"uniqueKey":"rooms.items.[INDEX].guests.items.[INDEX].is_lead_guest","typeLabel":"boolean"},"answers":{"description":"This guest's answers, one per applicable requirement in the prebook offer's `booking_requirements[]` (title, names, and so on). Every `required` requirement that applies to this guest must be answered. Undeclared, duplicate or not-applicable requirement ids are rejected.","type":"array","items":{"type":"object","properties":{"requirement_id":{"type":"string","example":"br_first_name_all_guests_2","description":"The `requirement_id` of an entry in the prebook offer's `booking_requirements[]`. Copy it exactly; never build it from the field name. An id the offer did not declare, or one that does not apply to this guest, is rejected with VALIDATION_ERROR.","isRequired":true,"uniqueKey":"rooms.items.[INDEX].guests.items.[INDEX].answers.items.[INDEX].requirement_id","typeLabel":"string"},"value":{"type":"string","example":"Ronak","description":"The guest's answer as a string (max 2048 characters), checked against the requirement's `value_type`, `allowed_values` and `constraints`. Formats: EMAIL is an email address; PHONE is E.164 with a leading + (+14155550123); DATE is YYYY-MM-DD; COUNTRY_CODE is uppercase ISO 3166-1 alpha-2; ENUM must be one of `allowed_values`. Empty values are rejected.","isRequired":true,"uniqueKey":"rooms.items.[INDEX].guests.items.[INDEX].answers.items.[INDEX].value","typeLabel":"string"}},"required":["requirement_id","value"],"uniqueKey":"rooms.items.[INDEX].guests.items.[INDEX].answers.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"rooms.items.[INDEX].guests.items.[INDEX].answers","typeLabel":"object[]"}},"required":["guest_id","guest_type","is_lead_guest","answers"],"uniqueKey":"rooms.items.[INDEX].guests.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"rooms.items.[INDEX].guests","typeLabel":"object[]"}},"required":["room_allocation_id","guests"],"uniqueKey":"rooms.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"rooms","typeLabel":"object[]"},"booking_mode":{"type":"string","enum":["INSTANT","HOLD"],"default":"INSTANT","description":"INSTANT (default) books the room straight away. HOLD reserves it until a supplier deadline, and is accepted only when the prebook offer's `lifecycle.available_booking_modes` contains HOLD; otherwise HOLD_NOT_ALLOWED. A held booking is confirmed later with Confirm Hold.","uniqueKey":"booking_mode","typeLabel":"enum\u003cstring>"}},"required":["prebooking_id","accepted_offer_id","rooms"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"prebooking_id":"pbq7.bjNQb1Y5R2hRWEg.k6jQ3nW4cF1nL4MWvN7A9Q","accepted_offer_id":"off_65db5f20d91b47d3a73d834dfa44c50e","rooms":[{"room_allocation_id":"ra_2c1fb39ed54742f28d95bd8bc5f4375d","guests":[{"guest_id":"guest_1","guest_type":"ADULT","is_lead_guest":true,"answers":[{"requirement_id":"br_first_name_all_guests_2","value":"Ronak"}]}]}],"booking_mode":"INSTANT"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"d111302c-a5c4-4398-9af0-02c23e4ab82a":{"description":"The booking was created or an earlier booking with the same Idempotency-Key was returned. The status is PROCESSING or AWAITING_REVIEW at this point; it is not a confirmation. Track it with Get Booking Status or webhooks.","content":{"application/json":{"schema":{"type":"object","properties":{"contract_version":{"type":"string","example":"2","description":"Response contract version. Always \"2\".","isRequired":true,"uniqueKey":"contract_version","typeLabel":"string"},"success":{"type":"boolean","example":true,"description":"false only when the booking status is FAILED. true for every other status, including AWAITING_REVIEW and PROCESSING, which are not confirmations. Read data.status for the real state.","isRequired":true,"uniqueKey":"success","typeLabel":"boolean"},"message":{"type":"string","example":"Booking request accepted and is being processed.","description":"Human-readable summary for logs and support; for FAILED it carries the reason. Do not parse it; use data.status.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"data":{"type":"object","description":"The booking's current state.","required":["booking_id","accepted_offer_id","status","is_terminal","provider","next_poll_after_ms","processing_reason","action_required","available_actions","review_expires_at","hold_deadline_at","created_at","updated_at"],"properties":{"booking_id":{"type":"string","example":"ubk_eGQ0dW9uV1Vi","description":"Unifystays booking ID (ubk_...). Use it as the key for status, details, quote and cancel calls. Store it as soon as you receive it.","isRequired":true,"uniqueKey":"data.booking_id","typeLabel":"string"},"accepted_offer_id":{"type":"string","example":"off_65db5f20d91b47d3a73d834dfa44c50e","description":"ID of the offer this booking was made from. Send it back unchanged to Confirm Hold when you confirm a held booking.","isRequired":true,"uniqueKey":"data.accepted_offer_id","typeLabel":"string"},"status":{"type":"string","enum":["AWAITING_REVIEW","PROCESSING","CONFIRMED","ON_HOLD","FAILED","CANCELLATION_PENDING","CANCELLED"],"example":"PROCESSING","description":"AWAITING_REVIEW: waiting for approval in the portal; nothing is booked. PROCESSING: being booked with the supplier. CONFIRMED: booked. ON_HOLD: held; confirm before hold_deadline_at. FAILED: not booked. CANCELLATION_PENDING: cancellation requested, the supplier is still processing it. CANCELLED: cancelled.","isRequired":true,"uniqueKey":"data.status","typeLabel":"enum\u003cstring>"},"is_terminal":{"type":"boolean","example":false,"description":"True for CONFIRMED, ON_HOLD, FAILED and CANCELLED; false for AWAITING_REVIEW, PROCESSING and CANCELLATION_PENDING. Stop polling when true. A terminal booking can still change through your own action (CONFIRMED can be cancelled, ON_HOLD can be confirmed).","isRequired":true,"uniqueKey":"data.is_terminal","typeLabel":"boolean"},"provider":{"type":"object","description":"Supplier and hotel references for this booking.","required":["code","booking_id","booking_code","hotel_confirmation_number","hotel_confirmation_status","hotel_confirmation_note","hotel_contact_phone","hotel_contact_name"],"properties":{"code":{"type":"string","example":"TRIPJACK","description":"Code of the supplier that holds this booking. Informational; do not branch your logic on it.","isRequired":true,"uniqueKey":"data.provider.code","typeLabel":"string"},"booking_id":{"oneOf":[{"type":"object","example":"100055869","description":"Supplier's primary booking/order ID, used to locate the reservation at the supplier. Null until the supplier assigns it. Store it and quote it to support.","isRequired":true,"uniqueKey":"data.provider.booking_id.oneOf.0","typeLabel":"object"},{"type":"null","example":"100055869","description":"Supplier's primary booking/order ID, used to locate the reservation at the supplier. Null until the supplier assigns it. Store it and quote it to support.","isRequired":true,"uniqueKey":"data.provider.booking_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.provider.booking_id","typeLabel":"object | null"},"booking_code":{"oneOf":[{"type":"object","example":"REZ6A5A81E9","description":"Supplier's distinct secondary booking code. Null when the supplier returns only one reference. Not interchangeable with booking_id.","isRequired":true,"uniqueKey":"data.provider.booking_code.oneOf.0","typeLabel":"object"},{"type":"null","example":"REZ6A5A81E9","description":"Supplier's distinct secondary booking code. Null when the supplier returns only one reference. Not interchangeable with booking_id.","isRequired":true,"uniqueKey":"data.provider.booking_code.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.provider.booking_code","typeLabel":"object | null"},"hotel_confirmation_number":{"oneOf":[{"type":"object","example":"HCN-482910","description":"The hotel's own confirmation number. Null until the property confirms; it may arrive after the booking is CONFIRMED, so keep reading the status. Show it to the guest when present.","isRequired":true,"uniqueKey":"data.provider.hotel_confirmation_number.oneOf.0","typeLabel":"object"},{"type":"null","example":"HCN-482910","description":"The hotel's own confirmation number. Null until the property confirms; it may arrive after the booking is CONFIRMED, so keep reading the status. Show it to the guest when present.","isRequired":true,"uniqueKey":"data.provider.hotel_confirmation_number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.provider.hotel_confirmation_number","typeLabel":"object | null"},"hotel_confirmation_status":{"oneOf":[{"type":"object","example":"Confirmed","description":"Supplier-defined text for the state of the hotel confirmation. Display only; do not parse it. Null when not reported.","isRequired":true,"uniqueKey":"data.provider.hotel_confirmation_status.oneOf.0","typeLabel":"object"},{"type":"null","example":"Confirmed","description":"Supplier-defined text for the state of the hotel confirmation. Display only; do not parse it. Null when not reported.","isRequired":true,"uniqueKey":"data.provider.hotel_confirmation_status.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.provider.hotel_confirmation_status","typeLabel":"object | null"},"hotel_confirmation_note":{"oneOf":[{"type":"object","description":"Free-text note from the hotel or supplier about the confirmation. Show it to support or the guest when present. Null otherwise.","isRequired":true,"uniqueKey":"data.provider.hotel_confirmation_note.oneOf.0","typeLabel":"object"},{"type":"null","description":"Free-text note from the hotel or supplier about the confirmation. Show it to support or the guest when present. Null otherwise.","isRequired":true,"uniqueKey":"data.provider.hotel_confirmation_note.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.provider.hotel_confirmation_note","typeLabel":"object | null"},"hotel_contact_phone":{"oneOf":[{"type":"object","description":"Phone number of the hotel contact for this booking, when the supplier provides one. Null otherwise.","isRequired":true,"uniqueKey":"data.provider.hotel_contact_phone.oneOf.0","typeLabel":"object"},{"type":"null","description":"Phone number of the hotel contact for this booking, when the supplier provides one. Null otherwise.","isRequired":true,"uniqueKey":"data.provider.hotel_contact_phone.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.provider.hotel_contact_phone","typeLabel":"object | null"},"hotel_contact_name":{"oneOf":[{"type":"object","description":"Name of the hotel contact for this booking, when the supplier provides one. Null otherwise.","isRequired":true,"uniqueKey":"data.provider.hotel_contact_name.oneOf.0","typeLabel":"object"},{"type":"null","description":"Name of the hotel contact for this booking, when the supplier provides one. Null otherwise.","isRequired":true,"uniqueKey":"data.provider.hotel_contact_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.provider.hotel_contact_name","typeLabel":"object | null"}},"isRequired":true,"uniqueKey":"data.provider","typeLabel":"object"},"next_poll_after_ms":{"oneOf":[{"type":"object","description":"Milliseconds to wait before polling status again. Null when no poll is scheduled: terminal bookings, bookings waiting for a person (AWAITING_REVIEW), and the first moments of a PROCESSING booking. If a PROCESSING booking shows null, wait about 5 seconds. Null does not mean confirmed.","example":5000,"isRequired":true,"uniqueKey":"data.next_poll_after_ms.oneOf.0","typeLabel":"object"},{"type":"null","description":"Milliseconds to wait before polling status again. Null when no poll is scheduled: terminal bookings, bookings waiting for a person (AWAITING_REVIEW), and the first moments of a PROCESSING booking. If a PROCESSING booking shows null, wait about 5 seconds. Null does not mean confirmed.","example":5000,"isRequired":true,"uniqueKey":"data.next_poll_after_ms.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.next_poll_after_ms","typeLabel":"object | null"},"processing_reason":{"oneOf":[{"type":"string","enum":["SUPPLIER_CONFIRMATION_PENDING","HOTEL_CONFIRMATION_PENDING","CANCELLATION_PENDING","RECONCILIATION_REQUIRED","HOLD_CONFIRMATION_REQUIRED","MANUAL_REVIEW_REQUIRED","MANAGED_FULFILLMENT_PENDING"],"description":"Why the booking is not simply done, or null when nothing is pending. SUPPLIER_CONFIRMATION_PENDING: waiting for the supplier. HOTEL_CONFIRMATION_PENDING: supplier confirmed, hotel number not yet received. CANCELLATION_PENDING: supplier is processing a cancellation. RECONCILIATION_REQUIRED: the outcome is uncertain and Unifystays is verifying it; contact support if it does not clear. HOLD_CONFIRMATION_REQUIRED: on hold, needs confirming. MANUAL_REVIEW_REQUIRED: waiting for approval in the portal. MANAGED_FULFILLMENT_PENDING: recorded but not yet submitted to a supplier.","example":"SUPPLIER_CONFIRMATION_PENDING","isRequired":true,"uniqueKey":"data.processing_reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["SUPPLIER_CONFIRMATION_PENDING","HOTEL_CONFIRMATION_PENDING","CANCELLATION_PENDING","RECONCILIATION_REQUIRED","HOLD_CONFIRMATION_REQUIRED","MANUAL_REVIEW_REQUIRED","MANAGED_FULFILLMENT_PENDING"],"description":"Why the booking is not simply done, or null when nothing is pending. SUPPLIER_CONFIRMATION_PENDING: waiting for the supplier. HOTEL_CONFIRMATION_PENDING: supplier confirmed, hotel number not yet received. CANCELLATION_PENDING: supplier is processing a cancellation. RECONCILIATION_REQUIRED: the outcome is uncertain and Unifystays is verifying it; contact support if it does not clear. HOLD_CONFIRMATION_REQUIRED: on hold, needs confirming. MANUAL_REVIEW_REQUIRED: waiting for approval in the portal. MANAGED_FULFILLMENT_PENDING: recorded but not yet submitted to a supplier.","example":"SUPPLIER_CONFIRMATION_PENDING","isRequired":true,"uniqueKey":"data.processing_reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.processing_reason","typeLabel":"enum\u003cstring> | null"},"action_required":{"type":"boolean","example":false,"description":"True when a person must act: available_actions contains CONFIRM_HOLD, CONTACT_SUPPORT or REVIEW_BOOKING. False means waiting or polling is enough.","isRequired":true,"uniqueKey":"data.action_required","typeLabel":"boolean"},"available_actions":{"type":"array","example":["GET_STATUS","GET_DETAILS"],"description":"What you can do now. GET_STATUS: keep polling (listed while the booking is not terminal, and during CANCELLATION_PENDING). GET_DETAILS: details are readable. CANCEL: request a cancellation quote, then cancel. CONFIRM_HOLD: call Confirm Hold. CONTACT_SUPPORT: the outcome needs Unifystays support. REVIEW_BOOKING: approve or reject in the portal.","items":{"type":"string","enum":["GET_STATUS","GET_DETAILS","CANCEL","CONFIRM_HOLD","CONTACT_SUPPORT","REVIEW_BOOKING"],"uniqueKey":"data.available_actions.items.[INDEX]","typeLabel":"enum\u003cstring>"},"isRequired":true,"uniqueKey":"data.available_actions","typeLabel":"enum\u003cstring>[]"},"review_expires_at":{"oneOf":[{"type":"string","example":null,"description":"Deadline of the prebooked offer's supplier quote (ISO 8601, UTC); the prebooking_id stops being valid then. It matters most for AWAITING_REVIEW: after it passes the request stays pending until a reviewer approves a fresh quote, so do not cancel or refund the guest because of it. Null when no deadline is recorded.","isRequired":true,"uniqueKey":"data.review_expires_at.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"description":"Deadline of the prebooked offer's supplier quote (ISO 8601, UTC); the prebooking_id stops being valid then. It matters most for AWAITING_REVIEW: after it passes the request stays pending until a reviewer approves a fresh quote, so do not cancel or refund the guest because of it. Null when no deadline is recorded.","isRequired":true,"uniqueKey":"data.review_expires_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.review_expires_at","typeLabel":"string | null"},"hold_deadline_at":{"oneOf":[{"type":"string","example":null,"description":"Time by which a held booking must be confirmed (ISO 8601, UTC). Meaningful for bookings created with booking_mode HOLD; null when there is no hold deadline. After it passes Confirm Hold is refused, and the hold is closed as FAILED (HOLD_DEADLINE_EXPIRED) unless the supplier reports it confirmed.","isRequired":true,"uniqueKey":"data.hold_deadline_at.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"description":"Time by which a held booking must be confirmed (ISO 8601, UTC). Meaningful for bookings created with booking_mode HOLD; null when there is no hold deadline. After it passes Confirm Hold is refused, and the hold is closed as FAILED (HOLD_DEADLINE_EXPIRED) unless the supplier reports it confirmed.","isRequired":true,"uniqueKey":"data.hold_deadline_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.hold_deadline_at","typeLabel":"string | null"},"created_at":{"type":"string","example":"2026-04-15T12:12:11.000Z","description":"When the booking was created (ISO 8601, UTC).","isRequired":true,"uniqueKey":"data.created_at","typeLabel":"string"},"updated_at":{"type":"string","example":"2026-04-15T12:15:11.000Z","description":"When the booking last changed (ISO 8601, UTC).","isRequired":true,"uniqueKey":"data.updated_at","typeLabel":"string"}},"isRequired":true,"uniqueKey":"data","typeLabel":"object"}},"required":["contract_version","success","message","data"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"contract_version":"2","success":true,"message":"Booking request accepted and is being processed.","data":{"booking_id":"ubk_eGQ0dW9uV1Vi","accepted_offer_id":"off_65db5f20d91b47d3a73d834dfa44c50e","status":"PROCESSING","is_terminal":false,"provider":{"code":"TRIPJACK","booking_id":"100055869","booking_code":"REZ6A5A81E9","hotel_confirmation_number":"HCN-482910","hotel_confirmation_status":"Confirmed","hotel_confirmation_note":{},"hotel_contact_phone":{},"hotel_contact_name":{}},"next_poll_after_ms":5000,"processing_reason":"SUPPLIER_CONFIRMATION_PENDING","action_required":false,"available_actions":["GET_STATUS","GET_DETAILS"],"review_expires_at":null,"hold_deadline_at":null,"created_at":"2026-04-15T12:12:11.000Z","updated_at":"2026-04-15T12:15:11.000Z"}}}},"exampleType":"generated"}},"headers":{"X-Unifystays-Contract-Version":{"description":"Hotel contract version of this response.","schema":{"type":"string","enum":["2"]}}},"exampleType":"generated"},"d7ac1af9-2d6f-44ad-9f65-8b89abd1e59d":{"description":"Validation or booking creation error. Common codes: IDEMPOTENCY_KEY_REQUIRED, VALIDATION_ERROR, PREBOOKING_ID_INVALID, PREBOOKING_ID_EXPIRED, PREBOOKING_ID_ALREADY_USED, ACCEPTED_OFFER_MISMATCH, BOOKING_ROOM_COUNT_MISMATCH, BOOKING_ROOM_ALLOCATION_MISMATCH, BOOKING_ROOM_OCCUPANCY_MISMATCH, GUEST_NAME_INVALID, BOOKING_CREATE_FAILED.","headers":{"X-Unifystays-Contract-Version":{"description":"Hotel contract version of this response.","schema":{"type":"string","enum":["2"]}}},"content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"0e28cd74-5e77-4022-b956-03725eac5fca":{"description":"CONTRACT_VERSION_UNSUPPORTED","headers":{"X-Unifystays-Contract-Version":{"description":"Hotel contract version of this response.","schema":{"type":"string","enum":["2"]}}},"content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"e3438e57-fc9e-4ce5-96b1-d137766d9433":{"description":"IDEMPOTENCY_KEY_REUSED (same key, different body), HOLD_NOT_ALLOWED (HOLD requested but not offered), HOTEL_MAPPING_UNVERIFIED or HOTEL_MAPPING_CHECK_PENDING (choose another offer or retry shortly), PREBOOKING_ID_EXPIRED (start a new prebook).","headers":{"X-Unifystays-Contract-Version":{"description":"Hotel contract version of this response.","schema":{"type":"string","enum":["2"]}}},"content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{"71ce26d4-cf7b-4d3b-ab99-f95701a1c420":{"x-api-key":{"type":"apiKey","in":"header","name":"x-api-key","description":"Environment-specific API key created in the Unifystays portal","scopes":[],"schemeName":"x-api-key"}}},"servers":{"58b3027e-a79b-4d2c-898a-ec7cc8ae6eae":{"url":"https://api-sandbox.unifystays.com","description":"Sandbox"},"32e511f6-5caf-4d51-acd6-ad4d164fb151":{"url":"https://api.unifystays.com","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key","description":"Environment-specific API key created in the Unifystays portal","scopes":[],"schemeName":"x-api-key"},"schema":{"title":"x-api-key","type":"string","description":"Environment-specific API key created in the Unifystays portal","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"x-api-key","name":"x-api-key"}],"title":"x-api-key"}]},"originalFileLocation":"reference/openapi.json"},"subdomain":"unifystays","siteName":"Unifystays API","title":"Create Booking - Unifystays API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-20T11:44:16.464Z","originalFileLocation":"api-reference/create-booking.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Create an idempotent hotel booking from a successful Unifystays prebooking response.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Unifystays API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/unifystays/_generated/favicon/apple-touch-icon.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/unifystays/_generated/favicon/favicon-32x32.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/unifystays/_generated/favicon/favicon-16x16.png?v=3\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/unifystays/_generated/favicon/favicon.ico?v=3\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Booking - Unifystays API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create an idempotent hotel booking from a successful Unifystays prebooking response.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Unifystays API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.unifystays.com/api-reference/create-booking\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://unifystays.mintlify.app/_mintlify/api/og/v2?division=Bookings\u0026amp;title=Create+Booking\u0026amp;description=Create+an+idempotent+hotel+booking+from+a+successful+Unifystays+prebooking+response.\u0026amp;theme=8157bd32ddef625e2bd30aba\u0026amp;signature=c220be358d78c86a191718b6c75796c9c8f5e184c6cbad814382051995ae4c41\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create Booking - Unifystays API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create an idempotent hotel booking from a successful Unifystays prebooking response.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://unifystays.mintlify.app/_mintlify/api/og/v2?division=Bookings\u0026amp;title=Create+Booking\u0026amp;description=Create+an+idempotent+hotel+booking+from+a+successful+Unifystays+prebooking+response.\u0026amp;theme=8157bd32ddef625e2bd30aba\u0026amp;signature=c220be358d78c86a191718b6c75796c9c8f5e184c6cbad814382051995ae4c41\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"https://mintlify.s3.us-west-1.amazonaws.com/unifystays/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Unifystays API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0F766E\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.unifystays.com/api-reference/create-booking\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/create-booking.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.unifystays.com/#organization\",\"name\":\"Unifystays API\",\"url\":\"https://docs.unifystays.com\"},{\"@type\":\"WebSite\",\"@id\":\"https://docs.unifystays.com#website\",\"name\":\"Unifystays API\",\"url\":\"https://docs.unifystays.com\",\"publisher\":{\"@id\":\"https://docs.unifystays.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.unifystays.com/api-reference/create-booking#webpage\",\"url\":\"https://docs.unifystays.com/api-reference/create-booking\",\"name\":\"Create Booking\",\"description\":\"Create an idempotent hotel booking from a successful Unifystays prebooking response.\",\"dateModified\":\"2026-10-20T11:44:16.464Z\",\"isPartOf\":{\"@id\":\"https://docs.unifystays.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.unifystays.com/api-reference/create-booking#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.unifystays.com/api-reference/create-booking#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Unifystays API\",\"item\":\"https://docs.unifystays.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Booking\",\"item\":\"https://docs.unifystays.com/api-reference/create-booking\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.unifystays.com/api-reference/create-booking#apireference\",\"headline\":\"Create Booking\",\"name\":\"Create Booking\",\"description\":\"Create an idempotent hotel booking from a successful Unifystays prebooking response.\",\"url\":\"https://docs.unifystays.com/api-reference/create-booking\",\"mainEntityOfPage\":{\"@id\":\"https://docs.unifystays.com/api-reference/create-booking#webpage\"},\"dateModified\":\"2026-10-20T11:44:16.464Z\",\"publisher\":{\"@id\":\"https://docs.unifystays.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.unifystays.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Unifystays API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Unifystays API","nav":{"global":null,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"Overview","href":"/api-reference/overview"}]},{"group":"Destination \u0026 master data","pages":[{"title":"Destination Autocomplete","openapi":"reference/openapi.json GET /destinations/autocomplete","href":"/api-reference/destination-autocomplete"},{"title":"List Nationalities","openapi":"reference/openapi.json GET /master-data/nationalities","href":"/api-reference/nationalities"}]},{"group":"Search \u0026 hotels","pages":[{"title":"Get Hotel Filters","openapi":"reference/openapi.json GET /hotels/filters","href":"/api-reference/hotel-filters"},{"title":"Search Hotels","openapi":"reference/openapi.json POST /hotels/search","href":"/api-reference/search-hotels"},{"title":"Get Search Price Updates","openapi":"reference/openapi.json GET /hotels/search/{searchId}/prices","href":"/api-reference/search-price-updates"},{"title":"Get Hotel Content","openapi":"reference/openapi.json GET /hotels/{hotelId}/content","href":"/api-reference/hotel-content"},{"title":"Get Room Options","openapi":"reference/openapi.json POST /hotels/{hotel_id}/rooms","href":"/api-reference/hotel-rooms"},{"title":"Stream Room Updates","openapi":"reference/openapi.json GET /hotels/{hotel_id}/rooms/stream/{stream_id}","href":"/api-reference/hotel-room-stream"},{"title":"Prebook a Room","description":"Recheck the selected offer with the supplier and get the prebooking_id you need to book.","openapi":"reference/openapi.json POST /hotels/prebook","href":"/api-reference/prebook"}]},{"group":"Bookings","pages":[{"title":"Create Booking","openapi":"reference/openapi.json POST /hotels/book","href":"/api-reference/create-booking"},{"title":"Confirm Hold","description":"Confirm a TripJack held booking before its supplier deadline.","openapi":"reference/openapi.json POST /hotels/book/{booking_id}/confirm-hold","href":"/api-reference/confirm-hold"},{"title":"List Bookings","openapi":"reference/openapi.json GET /hotels/book","href":"/api-reference/list-bookings"},{"title":"Get Booking Status","openapi":"reference/openapi.json GET /hotels/book/{booking_id}","href":"/api-reference/get-booking-status"},{"title":"Find Booking by Idempotency-Key","openapi":"reference/openapi.json GET /hotels/book/by-idempotency-key","href":"/api-reference/get-booking-by-idempotency-key"},{"title":"Get Booking Details","openapi":"reference/openapi.json GET /hotels/book/{booking_id}/details","href":"/api-reference/get-booking-details"},{"title":"Quote Cancellation","openapi":"reference/openapi.json POST /hotels/book/{booking_id}/cancellation-quote","href":"/api-reference/cancellation-quote"},{"title":"Cancel Booking","openapi":"reference/openapi.json POST /hotels/book/{booking_id}/cancel","href":"/api-reference/cancel-booking"}]},{"group":"Webhook endpoints","pages":[{"title":"Create Webhook Endpoint","openapi":"reference/openapi.json POST /webhooks/endpoints","href":"/api-reference/webhooks/create-endpoint"},{"title":"List Webhook Endpoints","openapi":"reference/openapi.json GET /webhooks/endpoints","href":"/api-reference/webhooks/list-endpoints"},{"title":"Get Webhook Endpoint","openapi":"reference/openapi.json GET /webhooks/endpoints/{endpoint_id}","href":"/api-reference/webhooks/get-endpoint"},{"title":"Update Webhook Endpoint","openapi":"reference/openapi.json PATCH /webhooks/endpoints/{endpoint_id}","href":"/api-reference/webhooks/update-endpoint"},{"title":"Delete Webhook Endpoint","openapi":"reference/openapi.json DELETE /webhooks/endpoints/{endpoint_id}","href":"/api-reference/webhooks/delete-endpoint"},{"title":"Rotate Webhook Secret","openapi":"reference/openapi.json POST /webhooks/endpoints/{endpoint_id}/rotate-secret","href":"/api-reference/webhooks/rotate-secret"},{"title":"Send Test Webhook","openapi":"reference/openapi.json POST /webhooks/endpoints/{endpoint_id}/test","href":"/api-reference/webhooks/test-endpoint"}]},{"group":"Webhook logs","pages":[{"title":"List Webhook Events","openapi":"reference/openapi.json GET /webhooks/events","href":"/api-reference/webhooks/list-events"},{"title":"List Webhook Deliveries","openapi":"reference/openapi.json GET /webhooks/deliveries","href":"/api-reference/webhooks/list-deliveries"},{"title":"Get Webhook Delivery","openapi":"reference/openapi.json GET /webhooks/deliveries/{delivery_id}","href":"/api-reference/webhooks/get-delivery"},{"title":"Replay Webhook Delivery","openapi":"reference/openapi.json POST /webhooks/deliveries/{delivery_id}/replay","href":"/api-reference/webhooks/replay-delivery"}]}]}]},"basePath":"","title":"Create Booking - Unifystays API","buildId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","deploymentId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DCDCdBVX.js","utils-ME8dDnLe.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-0e84ACsd.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-wgRBj-ia.js","snippetPresets-C11Sgb-o.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-C0lapOpP.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-ZeRQV8fF.js","shallow-BupWh095.js","getApiPlaygroundDisplay-BnYQO2Ss.js","CodeSnippet-RKKOc8c_.js","CodeSnippets-Drf_m8wS.js","Page-Bevw23-4.js","getPastedJson-u6QiPzNZ.js","icon-Bb-CBSxO.js","MethodPill-F7l5AI7V.js","DuplicateIcon-IiAXkdSg.js","createIcon-FliI8EBc.js","DynamicMarkdown-B62XqCSI.js","SectionHeading-Dj31pT03.js","axios-vUo_bRtp.js","Markdown-BOgQCTwD.js","clsx-BIWXJmsZ.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-DKZWslLH.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-UDqbR6xh.js"]}