v1

latestOpenAPI 3.0.02026-07-247251950.2 KB
Flight Bookings

1.2 Attach services to prebook (Optional)

Overview

Add ancillary services such as seat selection or extra baggage to an existing prebook before confirming the final booking.

When to Use

  • Seat selection - Allow users to choose specific seats after prebook
  • Extra baggage - Let users add additional luggage allowance
  • 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
  • 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
  • Updated payment: Creates a new Stripe payment intent when the prebook used Stripe (usePaymentSdk: true). When the prebook used credit line only (usePaymentSdk: false), no new intent is returned
  • 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

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.

post/flights/prebooks/{prebookId}/services

Path parameters

prebookIdstring required

The prebook ID (must have provider_booking_id from initial prebook)

Request body

voucherCodestring

An optional voucher code to apply discounts to the booking. The vouchers API allows creation of these discounts

Example request

{
  "selectedServices": [
    {
      "serviceId": "g6Rwc2lk2SQwMTlkMDY3NC1hMzQzLTc0OGEtYmYyYS1jMDk4ZmNjMTk2ZGGhcMtAfB6PXCj1w6Fjo1VTRA==",
      "quantity": 1
    }
  ]
}

Response

Services attached successfully; returns updated prebook data with new price and transactionId

Example response

{
  "data": [
    {
      "booking": {
        "selectedServices": [
          {
            "serviceId": "g6Rwc2lk2SQwMTlkMDY3NC1hMzQzLTc0OGEtYmYyYS1jMDk4ZmNjMTk2ZGGhcMtAfB6PXCj1w6Fjo1VTRA==",
            "quantity": 1
          }
        ]
      }
    }
  ]
}