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

How to Retrieve Fare Rules for a Flight

Last updated: 2026-03-03

How to Retrieve Fare Rules for a Flight

Before booking a flight, you can check the fare rules to understand cancellation policies, exchange options, and any associated penalties. The fare rules endpoint uses the cabinavailabilitytoken obtained from the availability check.

Endpoint

GET /flights/api/v2/farerules/{cabinavailabilitytoken}

Headers

HeaderRequiredDescription
x-api-keyYesYour API key.
x-correlation-idYesCorrelation ID from the autocomplete response.

Path Parameters

ParameterTypeRequiredDescription
cabinavailabilitytokenstringYesThe availability token from the availability endpoint response.

Example Request

GET /flights/api/v2/farerules/cat_xyz789abc123

Example Response

JSON
{
  "status": "success",
  "data": {
    "fare_type": "Published",
    "fare_rules": [
      {
        "city_pair": "SFO - BLR",
        "void_applicable": true,
        "fareruletext": "CANCELLATIONS: Ticket is non-refundable after 24 hours of purchase. CHANGES: Changes permitted with a fee of USD 200 per passenger.",
        "structuredpenaltyinfo": {
          "cancellable": true,
          "exchangeable": true,
          "penalty_details": [
            {
              "passenger_type": "ADULT",
              "cancellation_charge": {
                "amount": 250,
                "currency": "USD",
                "type": "fixed"
              },
              "exchange_charge": {
                "amount": 200,
                "currency": "USD",
                "type": "fixed"
              }
            },
            {
              "passenger_type": "CHILD",
              "cancellation_charge": {
                "amount": 250,
                "currency": "USD",
                "type": "fixed"
              },
              "exchange_charge": {
                "amount": 200,
                "currency": "USD",
                "type": "fixed"
              }
            },
            {
              "passenger_type": "INFANT",
              "cancellation_charge": {
                "amount": 0,
                "currency": "USD",
                "type": "fixed"
              },
              "exchange_charge": {
                "amount": 0,
                "currency": "USD",
                "type": "fixed"
              }
            }
          ]
        }
      }
    ]
  },
  "message": "Fare rules retrieved successfully"
}

Response Fields

Top-Level Fields

FieldTypeDescription
faretypestringThe type of fare (e.g., "Published", "Private").
farerulesarrayArray of fare rule objects, one per city pair in the itinerary.

Fare Rule Object

FieldTypeDescription
citypairstringThe origin-destination pair this rule applies to (e.g., "SFO - BLR").
voidapplicablebooleanWhether the ticket can be voided (typically within 24 hours of purchase).
fareruletextstringFree-text fare rule description from the airline. Contains the full terms in plain language.
structuredpenaltyinfoobjectMachine-readable penalty information.

Structured Penalty Info

FieldTypeDescription
cancellablebooleanWhether the fare is cancellable.
exchangeablebooleanWhether the fare allows date or route changes.
penalty_detailsarrayPenalty charges broken down by passenger type.

Penalty Details (Per Passenger Type)

FieldTypeDescription
passengertypestring"ADULT", "CHILD", or "INFANT".
cancellationcharge.amountnumberCancellation penalty amount.
cancellationcharge.currencystringCurrency of the penalty.
cancellationcharge.typestringCharge type (e.g., "fixed", "percentage").
exchangecharge.amountnumberExchange/change penalty amount.
exchangecharge.currencystringCurrency of the penalty.
exchange_charge.typestringCharge type.

Understanding Fare Rules

Cancellable vs. Non-Cancellable

  • If cancellable is true, the booking can be cancelled, but a penalty may apply based on cancellation_charge.
  • If cancellable is false, the ticket is non-refundable. You will not receive any refund if you cancel.

Exchangeable vs. Non-Exchangeable

  • If exchangeable is true, you can change the travel dates or route by paying the exchange_charge penalty.
  • If exchangeable is false, no changes are permitted. You would need to cancel and rebook.

Void Window

If void_applicable is true, you may be able to void the ticket within a short window (often 24 hours after purchase) without penalty. Policies vary by airline.

Tips

  • Always present fare rules to users before confirming a booking so they understand cancellation and change policies.
  • The fareruletext field contains the airline's official terms. Use this for display when detailed terms are needed.
  • The structuredpenaltyinfo is best for programmatic logic, such as calculating potential refund amounts.
  • Fare rules can differ between city pairs on multi-segment itineraries. Check each entry in the fare_rules array.

Related Articles

Was this article helpful?