1.2 Attach or detach services on prebook (Optional)
Overview
Set the ancillary selection (seats / bags) on an existing prebook before confirming the final booking. Each call replaces the prebook's current selection — it is not additive.
When to Use
- Seat selection - Allow users to choose specific seats after prebook
- Extra baggage - Let users add additional luggage allowance
- Detach / clear services - Remove previously attached seats or bags before book
- Price update - Required when services change the total booking cost
- Voucher discount - Optional voucherCode when attaching services changes the total and you need the discount reflected on the new payment intent
What You Get
- Updated prebook with the selected services attached (or cleared)
- New payment intent (transactionId, secretKey) reflecting the updated total price (after any voucher discount)
- Same response format as POST /flights/prebooks for easy integration
Key Features
- Seat selection: Assign specific seats to each passenger and segment
- Extra baggage: Add checked baggage or overweight allowances
- Full replacement: Send the complete desired selectedServices list every time
- Detach: Omit a service from selectedServices to remove it; send selectedServices: [] to clear all seats/bags and refresh the payment intent to the journey-only total
- Updated payment: Creates a new Stripe payment intent when the prebook used Stripe (usePaymentSdk: true). For whitelabel/CMI prebooks (used_custom_payment_keys), no new intent is returned — re-charge via WL and submit a fresh JWT at POST /flights/bookings
- Voucher recalculation: When a voucher applies, the discount is recomputed against the updated total (journey + ancillaries); invalid or expired vouchers return 400 (same as prebook)
- Modifies in place: Updates the existing prebook record in the database
Changing / removing services
This endpoint replaces the prebook's ancillary selection. To detach one seat or bag, re-POST without that item. To detach all services:
{ "selectedServices": [] }
The field must be present (selectedServices is required); an empty array clears the selection. Omitting the field entirely is a validation error.
Quick Start
Provide the prebookId in the URL path and selectedServices in the request body. Optionally pass voucherCode to apply a discount. Use the new transactionId from this response (not the original prebook transactionId) when confirming payment with Stripe and when calling POST /flights/bookings.
Request
- Base URLhttps://api.liteapi.travel/v3.0
- URLhttps://api.liteapi.travel/v3.0/flights/prebooks/{prebookId}/services
- AuthAPI key in header X-API-Key
Path parameters
The prebook ID (must have provider_booking_id from initial prebook)
Request body
Example request
{
"selectedServices": [
{
"serviceId": "g6Rwc2lk2SQwMTlkMDY3NC1hMzQzLTc0OGEtYmYyYS1jMDk4ZmNjMTk2ZGGhcMtAfB6PXCj1w6Fjo1VTRA==",
"quantity": 1
}
]
}Response
Selection updated successfully; returns updated prebook data with new price and transactionId
Example response
{
"data": [
{
"booking": {
"journey": {
"segments": [
{
"stops": [
{
"airportCode": "GIG",
"airportName": "Rio Galeão – Tom Jobim International Airport",
"arrivalTime": "2026-10-17T18:35:00",
"departureTime": "2026-10-17T19:25:00",
"duration": {
"iso8601": "PT50M",
"minutes": 50
}
}
]
}
],
"baggage": {
"included": [
{
"bagType": "cabin",
"description": "1 cabin bag up to 8 kg",
"passengerType": "ADT",
"pieces": 1,
"size": "55x40x20",
"unit": "kg",
"weightKg": 8
}
],
"paid": [
{
"bagType": "cabin",
"description": "1 cabin bag up to 8 kg",
"passengerType": "ADT",
"pieces": 1,
"size": "55x40x20",
"unit": "kg",
"weightKg": 8
}
]
},
"terms": {
"summary": [
{
"level": "warning",
"message": "Changes allowed with fee"
}
]
},
"cabinClass": "ECONOMY"
},
"selectedServices": [
{
"serviceId": "g6Rwc2lk2SQwMTlkMDY3NC1hMzQzLTc0OGEtYmYyYS1jMDk4ZmNjMTk2ZGGhcMtAfB6PXCj1w6Fjo1VTRA==",
"quantity": 1
}
]
},
"servicesAttachable": {
"metadata": {
"ancillaryExclusions": [
{
"type": "selectOne",
"scope": "perPassenger",
"reason": "These options are alternatives - select at most one."
}
]
}
}
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.