Improved Data Structure for Fare Calculations Breakdown
Alex Xavier | July 2015
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:
Before:
<?xml version="1.0" ?> <FareCalculation> <Text>KRK BA LON394.19NUC394.19END ROE3.77983</Text> </FareCalculation>
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" ?> <FareCalculationBreakdown> <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"/> <FreeBaggageAllowance>PC001</FreeBaggageAllowance> <RuleCategoryIndicator>4</RuleCategoryIndicator> <RuleCategoryIndicator>8</RuleCategoryIndicator> <RuleCategoryIndicator>9</RuleCategoryIndicator> <RuleCategoryIndicator>10</RuleCategoryIndicator> <RuleCategoryIndicator>16</RuleCategoryIndicator> <RuleCategoryIndicator>18</RuleCategoryIndicator> </FareCalculationBreakdown>
Access the Price Air Itinerary technical documentation for more information.