Fortrip

Create order

Creates an unpaid order from one offer, with the guests and a contact. Nothing is charged: the order waits for the user to pay it, on the page its payment link opens.

create_order · Creates an unpaid order · CLI: fortrip orders create

What the model reads (tool description)

Create an unpaid order for one offer from get_hotel_offers. It takes items, one item with the offer's offerId inside it (nowhere else in the arguments) and hotel.rooms, and contact. The answer is the order, awaiting payment: its reference, the total, the stay and its terms, and a payment link, a Fortrip page to pay on. Nothing is charged until the order is paid, on that page or with pay_order; 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: another order of the stay (another party, or a corrected guest name or contact) takes a new offer. cancel_order cancels or closes an order; for changes, or a cancellation it can't make, the user emails info@fortrip.ai with the order's reference.

Input

itemsobject[]required

What to order: exactly one item, which holds the offer's offerId and what its hotel needs to know. The offerId goes inside the item, not beside items.1–1 items

items[].offerIdstringrequired

The offer to order: an offerId from an offers response. It goes here, inside the item, and nowhere else in the request.matches ^off_[0-9A-Za-z]{20}$

items[].hotelobjectrequired

What the hotel needs to know.

items[].hotel.roomsobject[]required

One entry per room of the offer, in order: as many entries as the offer has rooms, not one per adult.1–8 items

items[].hotel.rooms[].guestsobject[]required

Guests staying in this room: at least one, no more than the room sleeps. List only the guests the user named; one is enough, even when more adults share the room.1–12 items

items[].hotel.rooms[].guests[].firstNamestringrequired

Guest's first name, in Latin letters as on the passport; transliterate accents (Müller → Mueller).1–60 chars

items[].hotel.rooms[].guests[].lastNamestringrequired

Guest's last name, in Latin letters as on the passport.1–60 chars

items[].hotel.specialRequestsstring

Requests for the hotel, in English. Not guaranteed.0–500 chars

contactobjectrequired

Who the hotel and the confirmation reach.

contact.namestringrequired

Contact person's full name, in any script, at most 119 characters.1–119 chars

contact.emailstringrequired

Contact email; the confirmation is sent here.

contact.phonestringrequired

Contact phone number, with country code.3–40 chars

Output

The result is one text block, content[0]: the answer as compact text, then the consent rule when the answer holds a payment link and the pay rule when an order has a "Pay without the link" line. There is no structuredContent: the same answer as JSON is the Order object, from the HTTP API or fortrip orders create --json. Errors are described in the overview.

On this page