Description

The search operation returns details of flights matching the provided criteria. The results are returned as a sequence of Priced Itineraries in no particular order.

Flights can be searched for based on origin and destination airports, as well as departure and return dates.

Required input:

OTA_AirLowFareSearchRQ

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="http://www.opentravel.org/OTA/2003/05">
    <soapenv:Header/>
    <soapenv:Body>
        <OTA_AirLowFareSearchRQ TimeStamp="2012-04-18T07:30:42.663Z"
        Target="Production" Version="1.0"
        PrimaryLangID="en" AltLangID="en"
        RetransmissionIndicator="false" xmlns="http://www.opentravel.org/OTA/2003/05">
            <POS>
                <Source ISOCountry="ZA" ISOCurrency="ZAR"
                DisplayCurrency="ZAR" DisplayRate="1.0"
                FirstDepartPoint="CPT" FinalDestinationPoint="JNB">
                    <RequestorID Type="Company" ID="website"
                    ID_Context="ts" MessagePassword="<PASSWORD>">
                        <CompanyName><USERNAME></CompanyName>
                    </RequestorID>
                </Source>
            </POS>
            <OriginDestinationInformation RefNumber="0">
                <DepartureDateTime>2012-07-26T00:00:00CAT</DepartureDateTime>
                <OriginLocation LocationCode="CPT" CodeContext="iata"
                />
                <DestinationLocation LocationCode="JNB" CodeContext="iata"
                />
            </OriginDestinationInformation>
            <OriginDestinationInformation RefNumber="1">
                <DepartureDateTime>2012-07-29T00:00:00CAT</DepartureDateTime>
                <OriginLocation LocationCode="JNB" CodeContext="iata"
                />
                <DestinationLocation LocationCode="CPT" CodeContext="iata"
                />
            </OriginDestinationInformation>
            <TravelPreferences>
                <FlightTypePref FlightType="Nonstop" DirectAndNonStopOnlyInd="true"
                />
                <!-- This line is optional – include to filter direct flights only -->
                <CabinPref Cabin="Economy" />
            </TravelPreferences>
            <TravelerInfoSummary>
                <AirTravelerAvail>
                    <PassengerTypeQuantity Code="7" Quantity="0"
                    />
                    <PassengerTypeQuantity Code="8" Quantity="0"
                    />
                    <PassengerTypeQuantity Code="9" Quantity="0"
                    />
                    <PassengerTypeQuantity Code="10" Quantity="1"
                    />
                </AirTravelerAvail>
            </TravelerInfoSummary>
        </OTA_AirLowFareSearchRQ>
    </soapenv:Body>
</soapenv:Envelope>

The request message requires one or two OriginDestinationInformation types, one for each travel direction. The OriginDestinationInformation types must include an index RefNumber attribute, with 0 for the departing type, and 1 for the returning type.

Each type must include elements for DepartureDateTime, OriginLocation and DestinationLocation.

Direct Flights Only:

Flights can be filtered to show direct flights only; this is done by including a FlightTypePrefs element in the TravelPreferences element, with the following attributes:

  • "FlightType": "Nonstop"
  • "DirectAndNonStopOnly": "true"

Flexible Departure / Arrival Dates:

The DepartureDateTime and ArrivalDateTime types each have 2 attributes, WindowBefore and WindowAfter , which allow one to search for flights with a date range for departure or arrival, respectively.

This is done by populating one (or both) of these attributes with an integer value for the window period (in DAYS).

Relevant types:

Expected output

A series of Priced Itinerary elements. If the search operation was invoked with a return date (i.e. Round Trip), the response will contain elements for both flight directions; it is the responsibility of the client to separate the flights into departing and returning flights based on the origin and destination airports for each itinerary.

On how to handle multi-ticket itinerary types ItineraryTypeType="MultiTicket" click here