Booking
Create hotel booking payment link
Create (or resume) a booking for one rate from get_hotel_rates, with the same rooms, adults and childrenAges (per room). Returns the amount and currency the user will be charged, the accepted terms (meal plan, cancellation, confirmation, pay-at-hotel fees), the stay as booked, and paymentUrl: a Fortrip page that recaps the booking and continues to payment. Nothing is charged until the user pays there; anyone holding paymentUrl can pay. The same user and stay always returns the same order; a stay that is already paid returns 409. This tool can't change or cancel a booking: for changes, cancellations or refunds the user emails info@fortrip.ai with the booking's orderUrl. Can take up to about two minutes; if the call times out, call it again with the same details — it resumes the same order.
Input
hotelIdintegerrequiredHotel id.
roomIdstringrequiredroomId from get_hotel_rates
ratePlanCodestringrequiredratePlanCode from get_hotel_rates
checkInstringrequiredCheck-in date, yyyy-MM-dd.
checkOutstringrequiredCheck-out date, yyyy-MM-dd. Stays are 1 to 15 nights.
roomsintegerrequiredNumber of rooms, as in get_hotel_rates; every room has the same occupancy
adultsintegerrequiredAdults per room, not in total, as in get_hotel_rates (2 rooms for 4 adults = rooms 2, adults 2)
childrenAgesinteger[]Age of each child in one room (0-17), per room, as in get_hotel_rates
guestsobject[]requiredAt least one guest per room, no more than the room sleeps. Names in Latin letters as on the passport; transliterate accents (Müller → Mueller).
guests[].firstNamestringrequiredFirst name.
guests[].lastNamestringrequiredLast name.
guests[].roomNointegerrequiredRoom the guest stays in, starting at 1.
contactNamestringrequiredContact person for the booking.
contactPhonestringrequiredContact phone number.
contactEmailstringContact email.
specialRequestsstringRequests for the hotel, in English. Not guaranteed.
Output
Returns the Booking result object as structuredContent. Errors are described in the overview.