Prepare Hotel Booking
prepare_bookingPrepares a booking for a chosen room offer and returns the final price plus a preparedBookingId (also returned as the alias bookingInternalId). A prepared booking has NO fixed expiry — what expires is the search session behind its quoteId, which surfaces as "This booking is unavailable"; re-run hotel_search and re-quote if you see that. Required: quoteId (from get_hotel_rooms), searchKey (the SAME one from hotel_search — omitting it is a 400), rooms[] (each {roomIndex (0-based), guests:[{firstName, lastName, title?}], children?} — one guest entry per adult), and a contactPerson (firstName, lastName, email, phone); the searchKey is required (it warms the cancellation-policy cache the backend needs to book). Collect every guest's first/last name and a contact email + phone from the user before calling. REQUIRES A SESSION: for a guest booking, first call guest_login with the user's email and pass the returned token as the sessionToken argument. After this, send preparedBookingId to create_checkout (consumer, recommended) or get_payment_url (consumer, Stripe alternative); B2B partners use confirm_booking.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rooms | Yes | ||
| quoteId | Yes | Quote ID from get_hotel_rooms | |
| searchKey | Yes | Search key from hotel_search (needed to validate cancellation policy) | |
| sessionToken | No | Optional guest-checkout token returned by `guest_login`. | |
| contactPerson | Yes | ||
| specialRequests | No |