Skip to main content
POST
Create a trip
The reservation is asynchronous, so the answer is 202 Accepted with the trip; a trip still PENDING is being reserved. Read the trip to follow it to RESERVED, then issue it before its reservationExpiresAt. Send exactly one of air, hotel, bus or vehicle, using the ids from the search responses and your passengers’ IDs. Every required trip custom field of the organization must be in customFields; they can’t be changed afterwards. The booking is placed with the travel provider before the trip is recorded, so a request that fails with a 4xx booked nothing and can be corrected and sent again. An error the provider reports about the booking — a seat or fare no longer available, say — is returned with its own status, code and message. Each request books once: repeating a request that succeeded books a second trip, and so may repeating one that failed with a 503, whose outcome at the provider is unknown.

Path Parameters

realmId
string<uuid>
required

ID of your realm.

Format: UUID

organizationId
string<uuid>
required

ID of the organization to book the trip for.

Format: UUID

Body

application/json
air
object

The flight to book: one air search item. Send exactly one of air, hotel, bus or vehicle — a trip is one booked product.

hotel
object

The hotel stay to book: one hotel search item. Send exactly one of air, hotel, bus or vehicle — a trip is one booked product.

bus
object

The bus ticket to book: one passenger on one bus search item — book each passenger as a separate trip. Send exactly one of air, hotel, bus or vehicle — a trip is one booked product.

vehicle
object

The vehicle rental to book: one vehicle search item. Send exactly one of air, hotel, bus or vehicle — a trip is one booked product.

customFields
object

Values of the organization's trip custom fields, keyed by the custom field's slug. Every required one must be present. They can't be changed after the trip is created.


Example: {"cost-center":"CC-1020"}

Example:

Response

Successful response

A trip: ONE booked product — a flight, a hotel stay, a bus ticket or a vehicle rental — for the organization's passengers, with its lifecycle. Booking several products means creating several trips.

id
string
required

ID of the trip.

Example:

"6711b4c0d8e1a30012b7c9f2"

realmId
string<uuid>
required

ID of the realm the trip belongs to.

Example:

"f495ff0c-ab54-4f99-8e92-ca8682e4de9b"

organizationId
string<uuid>
required

ID of the organization the trip belongs to.

Example:

"c4bd3f21-dfbd-44e8-8055-68ba15bed410"

customFields
object
required

Values of the organization's trip custom fields, keyed by the custom field's slug. Empty when none were set.


Example: {"cost-center":"CC-1020"}

Example:
vertical
enum<string>
required

Type of product booked. It tells which shape productSnapshot has.

Available options:
AIR,
HOTEL,
BUS,
VEHICLE
Example:

"AIR"

state
enum<string>
required

Where the booking is in its life: PENDING while the reservation is being made, RESERVED once held (until reservationExpiresAt), ISSUED once ticketed and CANCELED. It only moves forward.

Available options:
PENDING,
RESERVED,
ISSUED,
CANCELED
Example:

"RESERVED"

status
enum<string>
required

Finer-grained status: it also reports work in progress (PROCESSING_*) and failures, and can change back and forth. Use state to decide what the booking is; use status to tell what is happening to it.

Available options:
PROCESSING_RESERVATION,
RESERVATION_FAILED,
RESERVED,
PROCESSING_ISSUE,
ISSUED,
PROCESSING_CANCELLATION,
CANCELED,
AWAITING_MANUAL_CANCELLATION,
CANCELLATION_FAILED,
FAILED,
FAILED_BY_INCONSISTENT_DATA,
FAILED_BY_UNAVAILABLE_RESOURCE,
FAILED_BY_BUDGET_EXCEEDED,
EXPIRED,
BLOCKED,
UNKNOWN,
ISSUANCE_FAILED
Example:

"RESERVED"

passengers
object[]
required

The passengers booked on the trip.

createdBy
string<uuid>

ID of the user who created the trip. Omitted when a service did.

Example:

"e3553bc1-5e20-4e17-b22a-a796fda0aa99"

reservationExpiresAt
string<date-time> | null

Until when the reservation is held. Past it, a trip that was not issued expires. null or omitted when there is no hold.

Example:

"2026-10-02T13:45:12.000Z"

issuedAt
string<date-time> | null

When the trip was issued. null or omitted until it is.

originalAmount
number

Price before discounts, in cents. Omitted until the price is known.

Example:

95000

discountAmount
number

Discount applied, in cents. Omitted until the price is known.

Example:

3010

feeAmount
number

Fees added, in cents. Omitted until the price is known.

Example:

0

totalAmount
number

Amount to pay, in cents: originalAmount - discountAmount + feeAmount. Omitted until the price is known.

Example:

91990

currency
string

Currency of the amounts, as the numeric ISO 4217 code (986 is BRL).

Example:

"986"

productSnapshot
Air trip · object

The booked product: the itinerary, stay, ticket or rental as recorded by the travel provider — journeys and flights, the hotel and its rooms, the route and boarding information, the rental — with its fares, policies and booking locators. It does not repeat the trip's own fields (state, status, the amounts, the dates) and carries no identifier of the travel provider; passengers are referenced by their id in passengers[]. Its shape depends on vertical: a flight (AIR), a hotel stay (HOTEL), a bus ticket (BUS) or a vehicle rental (VEHICLE) — see the four schemas below. Omitted until the record is first fetched.

cancellation
object

The confirmed cancellation. Omitted until one is confirmed.

createdAt
string<date-time>

When the trip was created.

Example:

"2026-10-01T13:45:12.000Z"

updatedAt
string<date-time>

When the trip last changed.

Example:

"2026-10-01T13:46:03.000Z"