Getting Started with the Xeni Activities APIHow to Book an ActivityHow to Browse Activity Tags and CategoriesHow to Cancel an Activity BookingHow to Check Activity AvailabilityHow to Get Activity DetailsHow to Retrieve Activity Booking DetailsHow to Search for Activities with FiltersHow to Search for Activity DestinationsCar Rental API - Getting StartedCar Rental API - Understanding Response FieldsHow to Book a Car RentalHow to Get Rental Car Details and Equipment Add-OnsHow to Retrieve or Cancel a Car Rental BookingHow to Search for Available Rental CarsHow to Search for Pickup LocationsHow to Use Car Rental Search FiltersDeals API Best Practices for IntegrationDeals API Frequently Asked QuestionsGetting Started with the Xeni Deals APIDeals API Request Parameters and Headers ReferenceDeals API Supported Currencies and LocalizationHow to Display Deals in Your ApplicationHow to Fetch Hotel Deals by LocationFlights API Error Codes and TroubleshootingGetting Started with the Xeni Flights APIHow to Book a FlightHow to Check Flight Availability and PricingHow to Confirm or Cancel a Flight BookingHow to Retrieve Fare Rules for a FlightHow to Retrieve Flight Booking DetailsHow to Search for Airports Using AutocompleteHow to Search for FlightsHow to Use Flight Search Filters, Sorting, and PaginationHow to Check Room Availability and PricingHow to Filter Vacation Rental ResultsHow to Get Resort Property Details, Amenities, and AccessibilityHow to Hold and Confirm a Resort BookingHow to Release a Resort HoldHow to Retrieve Resort Booking DetailsHow to Search for Available ResortsHow to Search for Resort DestinationsHow to Search for Vacation Rental LocationsHow to Search for Vacation RentalsHow to Use Resort Search Filters and SortingGetting Started with the Xeni Resorts APIResorts API: Understanding Booking Statuses and PoliciesGetting Started with the Vacation Rentals APIVacation Rentals Frequently Asked QuestionsVacation Rentals Supported Property TypesUnderstanding Async Search for Vacation RentalsAuthentication & API SignaturesBooking Hotels — Direct API & SSO CheckoutError Handling, Rate Limits & Best PracticesGetting Started with the Xeni Hotels APIManaging Bookings: Status, Retrieval & CancellationPricing Confirmation & Token LifecycleRetrieving Hotel Details & Room AvailabilitySearching for Hotels: Locations, Filters & PaginationSearching for HotelsSession Management & Correlation IDsAPI authentication and getting your API keys

Getting Started with the Xeni Flights API

Last updated: 2026-03-03

Getting Started with the Xeni Flights API

The Xeni Flights API v2 provides programmatic access to global flight inventory. You can search for airports, query available flights, check availability and fare rules, and complete bookings entirely via API.

What You Can Do

The Flights API supports the full booking lifecycle:

  • Search airports — Use autocomplete to resolve airport names or IATA codes to structured airport data.
  • Search flights — Query available flights by route, dates, passenger counts, cabin class, and apply filters for stops, airlines, departure times, and more.
  • Check availability — Retrieve detailed flight segments, real-time pricing, and passport requirements for a selected cabin.
  • View fare rules — Inspect cancellation and exchange policies, including structured penalty details per passenger type.
  • Create bookings — Submit traveler information, passport details, and optional extra services to book a flight.
  • Manage bookings — Confirm, cancel, or retrieve booking details by booking ID.

Base URL

All Flights API v2 endpoints use the following base path:

{{api_host}}/flights/api/v2/...

Replace {{api_host}} with your environment-specific host (UAT or production), provided during onboarding.

Authentication

Every request to the Flights API requires the following header:

HeaderDescription
x-api-keyYour unique API key, provided during onboarding.

Some endpoints also require:
HeaderDescription
x-correlation-idA correlation ID captured from the autocomplete response headers. Required for search and downstream endpoints.

If you have not received your API key, contact your Xeni account representative.

The Booking Flow

The Flights API uses a token chaining pattern. Each step in the flow produces a token or ID that is required by the next step.

1. Autocomplete
   └── Captures x-correlation-id from response headers
  1. Search
└── Returns cabinsearchsession_id (per cabin option)
  1. Availability
└── Returns cabinavailabilitytoken
  1. Fare Rules (optional)
└── Uses cabinavailabilitytoken
  1. Create Booking
└── Uses cabinavailabilitytoken └── Returns booking_id
  1. Confirm / Cancel / Get Booking
└── Uses booking_id

Step-by-Step Summary

  1. Autocomplete — Resolve airport names or codes. Capture the x-correlation-id from the response headers for use in subsequent requests.
  2. Search — Submit origin, destination, dates, passengers, and cabin type. The response includes flight options, each with one or more cabin entries containing a cabinsearchsession_id.
  3. Availability — Pass a cabinsearchsessionid to get detailed segment information, final pricing, and a cabinavailability_token.
  4. Fare Rules — Pass the cabinavailabilitytoken to retrieve cancellation and exchange policies before booking.
  5. Create Booking — Submit the cabinavailabilitytoken along with traveler details to create a booking. The response includes a booking_id.
  6. Confirm or Cancel — Use the booking_id to confirm the booking (issue tickets) or cancel it.

API Endpoints at a Glance

MethodEndpointPurpose
GET/flights/api/v2/autocompleteSearch airports by name or IATA code
POST/flights/api/v2/searchSearch for available flights
GET/flights/api/v2/availability/{cabinsearchsessionid}Check availability and pricing
GET/flights/api/v2/farerules/{cabinavailabilitytoken}Retrieve fare rules and penalties
POST/flights/api/v2/bookingsCreate a new booking
GET/flights/api/v2/bookings?bookingid={id}Retrieve booking details
PATCH/flights/api/v2/bookings/{booking_id}Confirm or cancel a booking

Next Steps

Was this article helpful?