Search code examples
c#asp.netsoapsabre

add discount code for return flight in Bargain Finder Max


I'm using sabre soap api to power a travel application.

<OTA_AirLowFareSearchRQ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="3.0.0" ResponseType="OTA" ResponseVersion="3.0.0">
    <POS xmlns="http://www.opentravel.org/OTA/2003/05">
        <Source PseudoCityCode="XXXX">
                <RequestorID Type="1" ID="1">
                <CompanyName Code="TN"/>
                </RequestorID>
        </Source>
        </POS>
        <OriginDestinationInformation xmlns="http://www.opentravel.org/OTA/2003/05" RPH="1">
                <DepartureDateTime>2017-05-19T17:33:49</DepartureDateTime>
                        <OriginLocation LocationCode="YYZ"/>
                        <DestinationLocation LocationCode="LHR"/>
                <TPA_Extensions>
                        <SegmentType Code="O"/>
                </TPA_Extensions>
        </OriginDestinationInformation>
        <OriginDestinationInformation xmlns="http://www.opentravel.org/OTA/2003/05" RPH="2">
                <DepartureDateTime>2017-05-29T00:00:00</DepartureDateTime>
                    <OriginLocation LocationCode="LHR"/>
                    <DestinationLocation LocationCode="YYZ"/>
                    <TPA_Extensions>
                          <SegmentType Code="O"/>
                    </TPA_Extensions>
       </OriginDestinationInformation>
        <TravelPreferences xmlns="http://www.opentravel.org/OTA/2003/05">
                <TPA_Extensions>
                        <TripType Value="Return"/>
                </TPA_Extensions>
        </TravelPreferences>
        <TravelerInfoSummary xmlns="http://www.opentravel.org/OTA/2003/05">
                <AirTravelerAvail>
                        <PassengerTypeQuantity Code="ADT" Quantity="1"/>
                </AirTravelerAvail>
        </TravelerInfoSummary>
        <TPA_Extensions xmlns="http://www.opentravel.org/OTA/2003/05">
                <IntelliSellTransaction>
                        <RequestType Name="50ITINS"/>
        </IntelliSellTransaction>
</TPA_Extensions>

    </OTA_AirLowFareSearchRQ>

But Using this approach i can't choose the departure and return flights seperately as the result from this request has the depart and return flights as pairs. This is mentioned in the comments section in this question - Choose different return flight for Bargain Finder Max Flight

My Question is :

So If i want the user to select departure flight and then a return flight, Should i use two different calls to BFM to get the flights.

if this is the case, how to apply discount code since it is a return flight and it usually has a lower price


Solution

  • If you are going to make 2 calls, then you should put the discount code on both calls.

    Anyway, this is covered in my answer to your other stackoverflow question:
    https://stackoverflow.com/a/43680531/3701641