● Travel Never Stops. Neither Do We. 365 Days a Year.

Hotel API Search to Confirmation

Follow a hotel API booking from property search and room selection to rate recheck and confirmation, with occupancy and failure-handling checkpoints.

Traveller with luggage approaching a hotel reservations desk

A hotel API booking workflow is not complete when a search result displays a price or when a booking request receives an HTTP success. It is complete only when the intended occupants, rate conditions, payment obligations, and supplier-confirmed room records agree, and one controlled confirmation is released. This guide defines that path for an OTA integrating hotel inventory through an explicit supplier adapter.

Every traveler, property, amount, identifier, timestamp, response, policy, and outcome in the Lisbon scenario below is illustrative fictional test data, not customer history, a live quote, or proof of supplier inventory. The orchestration and acceptance rules are proposed implementation controls, not vendor guarantees.

Booking boundary and outcome contract

The fictional Lisbon OTA must book two rooms at one property for three nights. Room A holds two adults and one child aged eight; Room B holds one adult. Search, selection, revalidation, approval, submission, recovery, reconciliation, and voucher generation form one logical order. The booking orchestrator owns the order state; each supplier adapter owns the semantics of its own tokens, pricing components, booking calls, and retrieval methods.

Success requires supplier evidence for both requested rooms, not merely a booking identifier or a captured payment. An unknown response is not failure, and a partial response is not full success. A voucher is emitted only after the complete order passes reconciliation. Any unresolved case remains visible to operations without creating a second booking through an uncontrolled retry.

Illustrative search contract

Illustrative fictional Lisbon search and order fixture
FieldFixture valueRequired interpretation
Order referenceTT365-LIS-0332-01Local immutable logical order key
PropertyMiradouro Example Hotel, LisbonFictional name, mapped separately per supplier
Stay12–15 April 2027Three nights; check-out is exclusive
Room AAdults Ana Silva and Luis Silva; child Eva Silva, age 8Three occupants assigned only to A
Room BAdult Marta CostaOne occupant assigned only to B
Request localeen-GB; EUR display requestedSubject to active point-of-sale contract
Initial merchant amountEUR 322.00Illustrative merchant-collected subtotal
Property amountEUR 16.00Illustrative amount payable at property
Initial totalEUR 338.00322.00 plus 16.00, without double counting

Names and the hotel label are synthetic; they must never be exported into analytics as production travelers. The test assumes one supplier fulfills both rooms in a supported multiroom booking path. If a supplier cannot represent this occupancy and room combination atomically, the product must disclose a different fulfillment strategy before accepting payment.

Separate descriptive inventory from bookable offers

Static property content

Static content supports search discovery: mapped property identifiers, location, address, descriptions, amenities, facility policies, and room descriptions. It does not prove that a room is available on the requested dates. Store source, content version, fetch time, and mapping confidence.

For Expedia Rapid, the Lodging overview distinguishes property content and geography from Shopping availability and says property content needs daily refreshes. For HBX, content mapping and Booking API Availability are separate concerns. A shared canonical property record may organize the UI, but Expedia property identifiers, HBX hotel codes, room codes, and policies stay in provider-specific namespaces.

Live availability and offer freshness

Live shopping resolves check-in, check-out, room-by-room occupancies, ages, currency context, and selected property IDs. Preserve the returned supplier rate reference and its surrounding request context. Do not present stale cached rates as guaranteed or substitute a cheaper room because its display name resembles the original selection.

Capture the raw response in restricted, redacted observability storage and persist normalized offer fields for the UI. Booking must use the chosen supplier's native rate or token. Cross-supplier matching is for discovery only; it never authorizes booking a different provider's offer without a new explicit selection.

Hotel concierge handing paperwork to a traveller with a suitcase

Provider-specific search and revalidation

Expedia Rapid path

Rapid Shopping is called with supported parameters and separate occupancy instances for the two rooms. Its response carries room rates, fee details, cancellation terms, and tokenized next-step links. The selected room's Shopping-provided price-check link, rather than an invented static URL, is followed to revalidate the offer. A matched price yields the booking link; a changed price supplies refreshed terms and the applicable continuation link.

Rapid documentation distinguishes the property_inclusive total, which includes property-collected amounts, from other price fields. The implementation must inspect payment collection, billable currency, and components, not infer that a single display number is entirely payable online. Rapid's booking response and Retrieve operation provide itinerary context; neither should be replaced with an HBX rateKey.

HBX Group Hotels path

HBX Availability returns native rateKey values and a rateType. A RECHECK rate needs the HBX CheckRate operation; a BOOKABLE rate can proceed under the supplier's documented rules. The adapter inspects CheckRate's current price, availability, cancellation policies, and expanded rate comments, then uses the appropriate bookable rate key for Booking.

These are alternatives, not consecutive steps in one booking. A Rapid link cannot be used in an HBX Booking request, and HBX CheckRate cannot validate Rapid inventory. An implementation may support both suppliers behind a common orchestration interface while preserving their distinct schema, credentials, references, and failure semantics.

Supplier-scoped operation mapping for the illustrative integration
PhaseExpedia RapidHBX Hotels
Property metadataProperty content and geography mappingContent API hotel-code mapping
Live shoppingShopping availability with occupancy instancesAvailability with occupancies and hotel codes
ValidationSelected rate's price-check linkCheckRate for RECHECK; apply BOOKABLE rules
SubmitBooking link, guests, payment contextBooking with rateKey, holder, rooms, paxes
ReconcileItinerary Retrieve using documented contextSupplier-supported booking detail or lookup path

Occupancy mapping is a non-negotiable invariant

The checkout basket stores two room allocations, not a flattened four-person party. Room A must contain two adult guest records and one child guest record carrying age eight at the supplier-required age reference date. Room B must contain one adult guest. Ages can influence rate eligibility, bedding rules, or availability; dropping the child age during validation may produce an unrelated offer.

Validate full names, allowed characters, nationality or contact requirements where contractual, and lead-guest assignment. Associate each person with a room index and supplier-specific passenger identifier when required. Do not copy all four guests into both room arrays, or reduce Room A to two adults merely because a provider's example uses that occupancy.

If the chosen provider returns only one room or cannot map the child correctly, return to selection. Never promise two rooms from one successful room record. Acceptance requires matching room count, dates, property identity, occupancy distribution, board basis, and cancellation rules against the approved booking snapshot.

Explain and approve the price movement

The fictional initial selection contains EUR 220.00 merchant for A and EUR 102.00 for B, totaling EUR 322.00. Illustrative pay-at-property components are EUR 10.00 for A and EUR 6.00 for B. The original displayed grand total is therefore EUR 338.00, with payment timing and collector shown separately.

Revalidation changes A to EUR 232.00 and B to EUR 108.00, making the merchant-collected amount EUR 340.00. The property amount remains EUR 16.00. The new grand total is EUR 356.00, an EUR 18.00 increase from the initial EUR 338.00. The increase is entirely in the merchant component; do not mislabel it as a new property tax.

Illustrative fictional price evidence in EUR, with no currency conversion
ComponentSelectedRefreshedChange
Room A merchant220.00232.00+12.00
Room B merchant102.00108.00+6.00
Merchant subtotal322.00340.00+18.00
Property collected16.0016.000.00
Grand total338.00356.00+18.00

The UI must display old and refreshed totals, room-level differences, collection party, cancellation conditions, and any newly disclosed restrictions. Set the order to AWAITING_PRICE_APPROVAL. The fictional buyer approves exactly EUR 356.00 at 10:14:20 UTC on 2 February 2027; this timestamp is illustrative evidence, not an assertion of a real consent event.

Approval is bound to a versioned snapshot of room choices, price, currency, fees, payment distribution, and rate terms. Any changed price or policy invalidates approval. No booking request may leave the server until approval is recorded and the selected rate is still usable.

Freeze a submission envelope before network I/O

Create a durable order record and supplier-attempt record in a single database transaction before any Booking call. Reserve the unique merchant reference, supplier token, room mapping, approved-terms hash, and outbox event transactionally. Do not generate a new reference when a worker restarts.

For Rapid, map the local key into a unique affiliate_reference_id according to its requirements and keep the associated booking email for subsequent retrieval. For HBX, persist the chosen clientReference and any supplier correlation data that its implementation actually supports. Neither reference should be presented as a provider-independent idempotency guarantee.

Illustrative internal submission envelope

The following is an internal logical fixture, not a request body accepted verbatim by Rapid or HBX. Its values and field names are illustrative; the adapter translates them into one chosen supplier's documented schema and excludes fields that provider does not support.

{
  "orderRef": "TT365-LIS-0332-01",
  "attemptRef": "TT365-LIS-0332-01-A1",
  "provider": "RAPID_OR_HBX_SELECTED_ONCE",
  "propertyAlias": "LIS-ILLUSTRATIVE-17",
  "checkIn": "2027-04-12",
  "checkOut": "2027-04-15",
  "rooms": [
    {"id":"A","adults":2,"children":[8],"guests":["Ana Silva","Luis Silva","Eva Silva"]},
    {"id":"B","adults":1,"children":[],"guests":["Marta Costa"]}
  ],
  "currency": "EUR",
  "merchantAmount": "340.00",
  "propertyAmount": "16.00",
  "approvedGrandTotal": "356.00",
  "approvalVersion": 2,
  "state": "READY_TO_SUBMIT"
}

Only one provider is selected for this attempt. Store provider-native booking links or keys as protected secrets associated with the attempt, not as generic customer-visible metadata. Enforce a unique logical attempt and atomic ready-to-submitting transition.

Submit once and classify the response correctly

The worker first checks that approval is current, the supplier continuation is valid, and the intended room count equals two. It then submits precisely one logical booking attempt through the provider adapter. The orchestration service records send time, timeout configuration, correlation identifier, HTTP outcome, and sanitized supplier response without exposing card data or guest contact details in logs.

A clean, explicit rejection that the supplier documents as final becomes FAILED; the customer can select a new offer. A definitive confirmation becomes RECONCILING until supplier details confirm both rooms. A network interruption, 5xx, ambiguous booking acknowledgement, or downstream timeout becomes UNKNOWN, not FAILED. This prevents duplicate reservations.

Rapid's published error guidance recommends a 90-second connection timeout for Lodging booking calls and explains that a booking can exist even after timeout or 5xx. This is Rapid-scoped guidance, not a universal value for HBX or a rule for shopping. Do not blindly resend the same Booking POST on an ambiguous outcome.

Recover a timeout using the original supplier context

In the illustrative run, the adapter submits at 10:14:27 UTC and the connection ends without a reliable final response. The attempt remains UNKNOWN. Recovery uses the same persisted supplier reference and identity context; never replace them or shop another rate to infer success.

Rapid-specific reconciliation

For Rapid, use Itinerary Retrieve with the existing affiliate_reference_id and corresponding email as described in its error guidance, or its retained retrieval link when available. Handle an itinerary that is pending or exposes hold/resume information as pending until its final state is understood. Retrieval is not merely a check for HTTP 200: examine the itinerary status, dates, occupants, room details, and booking confirmations.

Rapid guidance suggests repeated retrieval in the early resolution window and continued checks for unresolved cases before supplier support escalation. Use bounded scheduling, backoff, and alerting consistent with the current Rapid documentation; do not treat a single 404 or a brief delay as proof that a duplicate POST is safe.

HBX-specific reconciliation

For HBX, use the documented Booking Detail or supported booking search process available to the contracted integration, anchored to the persisted HBX reference and response context. Verify how clientReference can be searched in the implemented account; do not assume Rapid's email-based lookup applies. If lookup is inconclusive, halt resubmission and escalate with evidence.

Any later attempt needs an explicit resolution decision demonstrating the first booking did not persist, plus a fresh rate and consent if commercial terms have changed. Provider-level uniqueness, timeout handling, and recovery guarantees must be verified per contract, sandbox behavior, and production documentation before automation is enabled.

Reconcile two rooms, not just one itinerary

A supplier response containing an itinerary number is evidence of a reservation object, not automatically evidence that both requested allocations were confirmed. Normalize each returned room into a reconciliation record with property identity, stay dates, board basis, cancellation terms, occupancy, guest association, room status, and confirmation identifier where supplied.

For the fictional successful outcome, Room A is confirmed for Ana, Luis, and Eva; Room B is confirmed for Marta. The returned merchant amount is EUR 340.00 and the disclosed property amount EUR 16.00. The two confirmed records must map to the two requested room slots without duplication, missing guests, changed dates, or mismatched payment collectors.

Partial and indeterminate outcomes

If Room A is confirmed while Room B is rejected, set PARTIAL_ACTION_REQUIRED. Do not issue a two-room voucher or tell the traveler the original order succeeded. Route the case to a controlled service workflow to evaluate provider-permitted cancellation, alternative inventory with informed approval, or appropriate refund handling. Do not automatically cancel a real booking without validating applicable penalties and authorization.

If a room is pending or cannot be correlated, keep UNKNOWN or RECONCILING and suppress final confirmation. If the supplier definitively rejects both rooms, set FAILED with evidence. Track authorization, capture, confirmation, and refund separately.

Generate exactly one final voucher

After reconciliation passes, transition the order to CONFIRMED in a transaction that also creates one voucher issuance event. Make the event idempotent on the logical order and confirmation version; reruns may regenerate a file representation but must not send duplicate customer confirmations. Distribute only after the successful transaction commits.

The voucher names the illustrative hotel, Lisbon address placeholder clearly labeled illustrative, stay dates, lead guest, all room occupants, room types, meal plans, supplier confirmations, support contact, and cancellation summary. It distinguishes EUR 340.00 merchant-collected from EUR 16.00 due at property and identifies the EUR 356.00 combined obligation without presenting EUR 356.00 as an additional charge.

Never put booking tokens, internal supplier URLs, credentials, full payment instruments, or sensitive audit payloads into the voucher. Include only verified check-in notices. If both rooms cannot be verified, the only permissible communication is a pending or assistance notice, not a completed-stay voucher.

For delivery after booking, see the travel booking notification workflow for recipient rules, delivery tracking and recovery.

Bound India agent and exceptional supplier workflows

An agent located in India does not, by itself, define the legal point of sale, market eligibility, payment currency, or supplier billing currency. Resolve the actual merchant entity, contracted point of sale, applicable state or regional tax configuration, accepted sales channel, and permitted display and charge currencies from the live agreement and implementation configuration. The fictional EUR fixture is valid only if those conditions allow it.

Keep contractual POS, agent location, traveler residence, property country, display currency, booking currency, settlement currency, and property-collected currency as distinct fields. If a configured state affects invoicing or tax treatment, apply the verified merchant-specific rule rather than inferring a nationwide default. Any conversion must identify its source, timestamp, rounding policy, and who bears rate movement.

A BlockRoom stage is not a universal hotel API booking workflow requirement. Use it only where a named supplier integration expressly documents and enables a room-blocking or hold operation, with its own expiration, release, and payment rules. Rapid's documented hold/resume behavior and HBX's CheckRate are not interchangeable with a generic BlockRoom call. If the selected supplier does not support that operation, the state machine must not pretend a room has been held.

Evidence retained across the illustrative run

Evidence is stored as immutable or append-only operational records with access controls and retention governed by the actual business agreement. The table represents a filled fictional verification trace, not production telemetry. Hashes are illustrative labels, not cryptographic output; supplier identifiers are synthetic placeholders rather than real reservations.

Filled illustrative fictional evidence register for order TT365-LIS-0332-01
UTC eventEvidence referenceObserved illustrative resultGate decision
10:11:04CAT-17Illustrative property mapping validated; source version C04Continue to live search
10:11:16SHOP-41A: 2 adults plus age 8; B: 1 adult; EUR 338.00 totalOffer shown, not guaranteed
10:13:52RATE-42Refreshed EUR 340.00 merchant plus EUR 16.00 propertyApproval required
10:14:20APP-02EUR 356.00 approved; terms snapshot version 2Ready to submit
10:14:25ATT-A1Reference and room mapping persisted before network callSubmit authorized once
10:14:27POST-A1Booking request sent; response later ambiguousUnknown, no repeat POST
10:15:59LOOK-01Original supplier lookup context reusedContinue reconciliation
10:16:14ROOMS-02Illustrative confirmed A and B records both matchedFull confirmation permitted
10:16:17VCH-001One voucher issuance event committedOne confirmation released

Acceptance is evidence-driven: a reviewer can reconstruct the exact approved commercial snapshot, the first outbound request, the absence of a duplicate submit, the supplier-scoped lookup, both room confirmations, and one voucher event. A missing evidence link is a failed operational control even if the guest-facing page happens to show a success banner.

Concise acceptance test matrix

Use provider-specific sandbox fixtures where possible and locally simulated responses for failures a sandbox cannot reproduce. Each test must assert state, payment presentation, audit linkage, and outward communications, not just an API status code. Re-run concurrency cases with two workers to expose duplicate-event races.

Illustrative fictional integration and release acceptance tests
Test IDStimulusPass criterion
T01Shop A with child aged 8; B with adultTwo distinct room allocations preserved end to end
T02Refresh EUR 338.00 to EUR 356.00EUR 18.00 change blocks submit until new approval
T03Change cancellation term, price unchangedPrior consent invalidated; reapproval captured
T04Rapid price-check continuationRapid token and booking link remain Rapid-scoped
T05HBX RECHECK then BOOKABLECheckRate applied only as required by HBX rateType
T06Ambiguous POST timeoutSame lookup identity used; zero blind reposts
T07Only A confirmedPartial status, manual resolution, no final voucher
T08Both confirmed; duplicate event deliveryExactly one final voucher issuance
T09Unapproved POS or currency settingBooking blocked with explicit configuration error
T10BlockRoom unavailableNo fictitious hold or unverified room guarantee

Official supplier references and implementation limits

Use the Expedia Rapid Lodging overview for the content, shopping, price-check, booking, and retrieve sequence. Use the Rapid Shopping documentation for occupancy handling and price presentation. Consult the Rapid error guidance before implementing timeout resolution or interpreting 5xx responses.

For HBX, consult the HBX Hotels Booking API workflow for Availability, native rate keys, RECHECK, CheckRate, BOOKABLE, and Booking semantics. Verify actual supported endpoints, credentials, market permissions, multiroom behavior, error codes, and contractual payment rules during onboarding. These sources do not grant access or certify a build.

Verification and handoff checklist

Before technical sign-off, the engineering owner and operations owner must jointly verify every control below against the selected provider's current contract and executable test evidence. Record the reviewer, environment, adapter version, and date against the release ticket. An unchecked item blocks production enablement for this flow.

  • Verify mapped property identity and content provenance; demonstrate fresh supplier-specific availability rather than static catalog pricing.
  • Verify dates and the exact A/B room allocations, including the eight-year-old child and all four guest associations.
  • Verify EUR 322.00 plus EUR 16.00 equals EUR 338.00 initially; EUR 340.00 plus EUR 16.00 equals EUR 356.00 after refresh.
  • Verify recorded approval of the EUR 18.00 increase and the final cancellation, occupancy, currency, and collection terms.
  • Verify durable reference, attempt identity, and approval snapshot exist before the first Booking network submission.
  • Verify Rapid and HBX adapters use their own validation, submission, retrieval, and error-handling rules without cross-provider tokens.
  • Verify timeout recovery reuses the original lookup context; no blind duplicate Booking POST occurs.
  • Verify supplier evidence matches two confirmed rooms; route partial, pending, rejected, and unknown results to explicit states.
  • Verify the confirmed order creates exactly one voucher and separates merchant-collected from property-collected payment.
  • Verify the actual India-agent POS, state, currency, tax, and supplier contract settings, and disable unsupported BlockRoom assumptions.
  • Attach the filled evidence register, passing test matrix, redacted traces, supplier escalation runbook, and named operations owner to the release ticket.

Handoff is accepted only when the team can demonstrate a repeatable, auditable hotel API booking workflow from two-room search through explicit price approval, safe timeout recovery, matched supplier confirmations, and a single final customer voucher.