Skip to main content
POST
Create and manage a trip: add or remove items and set travelers
Assemble and edit a trip before sending it to checkout. Use it to add a flight, hotel, or car rental offer, set traveler details, swap one item for another, or attach ancillaries like bags and seats. Flights, hotels, and rental cars can sit side by side in the same trip and settle through a single checkout. A trip with a car item also needs contact.title (the honorific, for example mr or ms) before checkout. Unified trip management endpoint. In a single call you can add_item (by trip_item_token), remove_item (by item_id), and upsert_travelers (travelers + contact). Omit trip_id to create a new trip; include it to update an existing one. Returns the resulting trip state. Creating or editing a trip does not start pricing. A new item has no price until pricing succeeds. Call checkout to start pricing and wait for its result. Polling GET /v1/trip/{trip_id} after creation does not initiate a quote. A missing price means unpriced, never free. Traveler and room-guest names take Latin letters only (accents allowed), spaces, hyphens and apostrophes, on every trip. Any other character is refused with 400 BAD_REQUEST and error.field. See Traveler names. Ancillaries are selected on a separate endpoint. See select-ancillaries. A trip lapses after 24 hours with no activity, and the offers and quote inside it expire sooner. See Lifetimes and expiry.

Authorizations

X-API-Key
string
header
required

Body

application/json
trip_id
string
add_item
object
remove_item
object
upsert_travelers
object
hotel_room_guests
object

Optional primary adult room-contact overrides keyed by the returned hotel item_id/product_id. Each product array is non-empty and occupancy_number values are unique positive room slots. A single-room stay takes one contact, at occupancy_number 1, who is the room's lead guest at the hotel in place of the first adult traveler (the room is still booked for the trip travelers it was priced for); a stay of several rooms takes one contact per room slot. Every hotel item sold in production and to sandbox partners takes room contacts; only internal test configurations sell hotel items that take none, and those are booked under their first adult traveler. Naming such an item, a slot the item does not have, or a key that is not a hotel item of the trip is refused with 400 BAD_REQUEST, the message says which, and nothing in the request is kept. A single-room stay with no contact named is booked under its first adult traveler, and trip reads list no contact for it. On a stay of several rooms, rooms take the trip travelers in occupancy_number order, each room as many as it was priced for (the hotel_search occupancies, adults counted by age at check-in): with rooms of 2 and 1 adults and travelers [A, B, C], room 1 holds A and B and room 2 holds C. A contact named here who is one of the trip travelers is placed in that room first, and the other travelers fill the remaining places in order; a contact who is not a trip traveler is only that room's contact. An omitted slot uses the first adult of its room, with the trip contact email, as the room contact. Once the trip has adult travelers and a contact email, trip reads return the resolved contact of every room before checkout, so each room contact can be confirmed before paying. The read lists contacts only: who else is in each room follows from the traveler order and each room's priced party. The trip must already exist because the keys refer to its items.

intent
object

Response

The trip

trip_id
string
required
Example:

"trip_1048576"

status
enum<string>

Where the trip is in its lifecycle, as one value for the whole trip. The booking’s progress after payment is booking_state (GET /v1/trip/{trip_id}); the four booking values below (fulfilling, fulfilled, partially_fulfilled, failed) are deprecated in favour of it and still sent. draft: being built or priced, nothing paid. fulfilling: payment was submitted and booking started. Then exactly one outcome: fulfilled (booking_state completed), partially_fulfilled (partial) or failed (failed). cancelled: replaced by a new trip when it was re-shopped. expired: the trip lapsed under a limit that no longer applies. A trip left unpaid stays open, so no new trip reaches this state. On an expired trip, adding items, setting travelers and checkout are refused with TRIP_EXPIRED; any other state that refuses a write answers TRIP_STATE_CONFLICT and names the state here. Start a new trip — an expired one cannot be revived. quoting, quoted and fulfillment_prepared are reserved and not currently set; quote progress is in quote.status.

Available options:
draft,
quoting,
quoted,
fulfillment_prepared,
fulfilling,
fulfilled,
partially_fulfilled,
failed,
cancelled,
expired
Example:

"draft"

actions_performed
string[]
Example:
items
object[]
travelers
object[]
contact
object
hotel_room_guests
object

Optional primary adult room-contact overrides keyed by the returned hotel item_id/product_id. Each product array is non-empty and occupancy_number values are unique positive room slots. A single-room stay takes one contact, at occupancy_number 1, who is the room's lead guest at the hotel in place of the first adult traveler (the room is still booked for the trip travelers it was priced for); a stay of several rooms takes one contact per room slot. Every hotel item sold in production and to sandbox partners takes room contacts; only internal test configurations sell hotel items that take none, and those are booked under their first adult traveler. Naming such an item, a slot the item does not have, or a key that is not a hotel item of the trip is refused with 400 BAD_REQUEST, the message says which, and nothing in the request is kept. A single-room stay with no contact named is booked under its first adult traveler, and trip reads list no contact for it. On a stay of several rooms, rooms take the trip travelers in occupancy_number order, each room as many as it was priced for (the hotel_search occupancies, adults counted by age at check-in): with rooms of 2 and 1 adults and travelers [A, B, C], room 1 holds A and B and room 2 holds C. A contact named here who is one of the trip travelers is placed in that room first, and the other travelers fill the remaining places in order; a contact who is not a trip traveler is only that room's contact. An omitted slot uses the first adult of its room, with the trip contact email, as the room contact. Once the trip has adult travelers and a contact email, trip reads return the resolved contact of every room before checkout, so each room contact can be confirmed before paying. The read lists contacts only: who else is in each room follows from the traveler order and each room's priced party. The trip must already exist because the keys refer to its items.

totals
object
Example: