Skip to main content
POST
/
v1
/
trip
Create and manage a trip — add or remove items, set travelers, select ancillaries
curl --request POST \
  --url https://api.example.com/v1/trip \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "trip_id": "trip_1048576",
  "add_item": {
    "trip_item_token": "tok_flt_9f3b2a17"
  }
}
'
{
  "trip_id": "trip_1048576",
  "status": "draft",
  "actions_performed": [
    "created",
    "add_item"
  ],
  "items": [
    {
      "item_id": "itm_4b91c2",
      "kind": "flight",
      "price": {
        "amount": 318.4,
        "value": 123,
        "currency": "USD",
        "decimal_places": 2
      },
      "pax_count": 1,
      "available_ancillaries": [
        null
      ],
      "selected_ancillaries": [
        null
      ]
    }
  ],
  "travelers": [
    null
  ],
  "contact": {
    "email": "<string>",
    "phone": "<string>"
  },
  "totals": {
    "currency": "USD",
    "total": 318.4
  }
}
Assemble and edit a trip before sending it to checkout. Use it to add a flight or hotel offer, set traveler details, swap one item for another, or attach ancillaries like bags and seats. Flights and hotels can sit side by side in the same trip and settle through a single 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. Ancillaries are selected on a separate endpoint — see select-ancillaries.

Authorizations

X-API-Key
string
header
required

Body

application/json
trip_id
string
add_item
object
remove_item
object
upsert_travelers
object

Response

The trip

trip_id
string
required
Example:

"trip_1048576"

status
string
Example:

"draft"

actions_performed
string[]
Example:
["created", "add_item"]
items
object[]
travelers
null[]
contact
object
totals
object
Example:
{ "currency": "USD", "total": 318.4 }