Create hotel order and payment link
Order one offer from get_hotel_offers.
The answer is an unpaid order with a payment link: status awaiting_payment, the total, the stay and its terms, and payment.url, a Fortrip page to pay on. Nothing is charged until the order is paid, on that page or with pay_order (or Alipay/WeChat Pay); anyone holding the link can pay. Send the contact and, for each room of the offer, at least one guest. If the price or terms changed since the offer, the answer is offer_changed with every change and a new offer: show the changes and ask the user again before ordering it. Sending the same details again returns the same order. An offer is ordered once: for another order of the stay (another party, or a corrected guest name), get offers again and order the new offer; when it replaces an unpaid order, tell the user to pay only the new link, as the earlier one expires unpaid. To cancel an order, use cancel_order; for changes, or a cancellation cancel_order can't make, the user emails info@fortrip.ai with the order's reference.
book_hotel · Creates an unpaid order · CLI: fortrip hotels book
Input
contactobjectrequiredWho the hotel and the confirmation reach.
contact.firstNamestringrequiredContact person's first name, at most 59 characters.
contact.lastNamestringrequiredContact person's last name, at most 59 characters.
contact.emailstringrequiredContact email; the confirmation is sent here.
contact.phonestringrequiredContact phone number, with country code.3–40 chars
itemsobject[]requiredThe offer to book: exactly one.1–1 items
items[].offerIdstringrequiredofferId from an offers response.matches ^off_[0-9A-Za-z]{20}$
items[].hotelobjectrequiredWhat the hotel needs to know.
items[].hotel.roomsobject[]requiredOne entry per room of the offer, in order.1–8 items
items[].hotel.rooms[].guestsobject[]requiredGuests staying in this room: at least one, no more than the room sleeps.1–12 items
items[].hotel.rooms[].guests[].firstNamestringrequiredGuest's first name, in Latin letters as on the passport; transliterate accents (Müller → Mueller).1–60 chars
items[].hotel.rooms[].guests[].lastNamestringrequiredGuest's last name, in Latin letters as on the passport.1–60 chars
items[].hotel.specialRequestsstringRequests for the hotel, in English. Not guaranteed.0–500 chars
Output
structuredContent is the Order object. content[0] is the answer as compact text. It also carries nextStep, the rule for sharing payment.url. Errors are described in the overview.