Improved Data Structure for Fare Calculations Breakdown

by Alex Xavier

Fare calculations

Historically, developers have struggled with parsing information from Fare Calculations as part of pricing responses.

For example, parsing the Q surcharge amount from the plain text string can be challenging, especially when multiple Q charges may apply for more than one segment. Given that most airlines pay commission based on the Base Fare (less any Q-surcharges) which must be included in ticketing request, simplifying this effort provides great value.

Below is an example of how the Q surcharge may appear in a Fare Calculation string in the Price Air Itinerary (OTA_AirPriceLLSRS) service:


<?xml version="1.0" ?>
<Text>KRK BA LON394.19NUC394.19END ROE3.77983</Text>


In SWS TPF Version 2.8.0 of Price Air Itinerary we have enhanced the response by adding and element-based structure for various fare calculation components that were previously returned as plain text.

<?xml version="1.0" ?>
<Branch FirstJointCarrier="BA" PCC="7TZA"/>
<Departure AirlineCode="BA" AirportCode="KRK" ArrivalAirportCode="LHR" ArrivalCityCode="LON" CityCode="KRK" GenericInd="O"/>
<FareBasis Cabin="Y" Code="YV3HO" FareAmount="394.19" FarePassengerType="ADT" FareType="P" FilingCarrier="BA" GlobalInd="EH" Market="KRKLON" TripTypeInd="O"/>


Access the Price Air Itinerary technical documentation for more information.

About Alex Xavier

Alex Xavier is a veteran Marketer with years of experience in Product Marketing and Sales, developing effective marketing, product, communications strategies and innovative programs to drive demand. He leads a team of Global Product Marketers responsible for Corporate, Lodging, Ground and Sea and Developer Experience on APIs and SDKs. Follow him on Twitter @XZanze

Leave a Reply

Your email address will not be published. Required fields are marked *