Skip to content

Segments API

Segments represent individual travel legs within a booking (flights, hotel stays, car rentals).


Add Segment

http
POST /api/v1/bookings/{id}/segments

Base Fields (all segment types):

FieldTypeRequiredDescription
booking_iduuid✅ YesBooking ID
segment_typestring✅ YesFLIGHT, HOTEL, RENTAL_CAR
sequence_numberint✅ YesSegment order
costnumber✅ Yes>= 0
notesstringNoMax 1000 chars

✈️ Flight Segment Fields

FieldTypeDescription
carrier_iduuidAirline carrier ID
flight_numberstringMax 20 chars
departure_airportstringIATA code (max 10 chars)
arrival_airportstringIATA code (max 10 chars)
departure_timedatetimeISO 8601
arrival_timedatetimeISO 8601
ticket_classstringECONOMY, PREMIUM_ECONOMY, BUSINESS, FIRST
eu_flightbooleanWithin EU
national_flightbooleanDomestic flight
third_world_flightbooleanTo developing country

🏨 Hotel Segment Fields

FieldTypeDescription
hotel_namestringMax 255 chars
hotel_numberstringMax 50 chars
check_in_datedateYYYY-MM-DD
check_out_datedateYYYY-MM-DD
room_typestringMax 100 chars
nightsint>= 1
hotel_supplier_iduuidSupplier ID

🚗 Rental Car Segment Fields

FieldTypeDescription
pickup_locationstringMax 255 chars
return_locationstringMax 255 chars
pickup_datedatetime2006-01-02T15:04:05
return_datedatetime2006-01-02T15:04:05
vehicle_typestringMax 100 chars
rental_supplier_iduuidSupplier ID
rental_total_daysint>= 1
rental_flight_numberstringMax 20 chars
rental_flight_timestringMax 20 chars
rental_fuel_typestringMax 50 chars
rental_gear_typestringMax 50 chars
rental_optionsstringMax 5000 chars

Update Segment

http
PUT /api/v1/bookings/{id}/segments/{segmentId}

Delete Segment

http
DELETE /api/v1/bookings/{id}/segments/{segmentId}

Unified API Documentation