The /shop API will provide priced availability for the requested route and dates. Both one way and return availability is supported. The shop API will only return flights for which there are seats available (the number of seats available is included in the response). The fares will be the lowest fares available for the flights. If you want to display a range of fares (e.g. Economy, Economy Flex, Economy Plus) you will need to call this API multiple times.

GET /shop

Verb URI Description
GET /shop/{ver}/{airline}/{dep}/{arr}/{adults}/{children}/
Get priced availability.

Path Parameters

Path Parameter Notes Example
ver API Version number v1
airline 2 character IATA code. MH
dep Departure airport - 3 digit IATA code DUB
arr Arrival airport - 3 digit IATA code LHR
adults Number of adult passengers. The maximum number of combined adult/child passengers is 9. 2
cabin Name of cabin class to search in. This value must match one of the cabinClasses returned from the GET /config API. Economy Flexible
children Number of child passengers 1
infants Number of infant passengers. The number of infants must be less than or equal to the number of Adult passengers 1
outboundDate Date of outbound travel, in yyyy-MM-dd format. 2013-09-13
returnDate Date of return travel, in yyyy-MM-dd format. The return date is optional. For one way shopping, do not specify this value 2013-10-30

Query Parameters

Query Parameter Notes Example
shopDeals Set to true if this /shop query is related to a previous call to the /deals API. Defaults to false. true
corporateFareAccountCode When shopDeals is true, you must specify the account code found in the /deals API response. true
outboundFlightsMatcher Use this parameter to restrict the search list to a specified set of flights. It is a comma separated list of flight numbers (including airline code). MH2, MH4
returnFlightsMatcher Use this parameter to restrict the search list to a specified set of flights. It is a comma separated list of flight numbers (including airline code).

Response Data

This section provides a high level overview of the important, non-obvious elements of the response data.

  • outboundOptions : The flight results are returned in an array called outboundOptions. This outboundOption contains details about the flights, price and return options. The key sections are detailed below:
    • Flights
      The flight info is in an array of flights. If there is a direct flight, then there is only one flight object. For non-direct flights, there will be two flights (the maximum number of flights is 2). This contains the scheduled departure/arrival, details on the airports, the marketing name for the class of travel and number of seats available, aircraft type and airport terminal information (if available). The flight object also has the duration of this flight in minutes (durationMinutes field).

    • returnOptions
      For return flights, this will contain an array of options that match the current outboundOption. Each outboundOption can have multiple valid return options. The returnOption structure contains the same data as the outboundOption. For direct flights, this value will be null.

    • fareDetails
      The fareDetails object contains the details of the fare and taxes. Fare information is available for both the individual journeys (outbound leg is one journey, and return leg is another journey) and for the overall trip. The trip prices do NOT include taxes.
      For return trips, the fareDetails object is present in both the outboundOption object and the returnOption object. In the former, it will have only the price details of the outbound journey. The overall trip price and tax breakdown is only available in the returnOption.

      • fareCurrency - ISO 4217 currency code
      • totalTripFare - Cost of the total trip, including taxes.
      • journeyFare - Cost of the outbound journey, or return journey. Excluding taxes.
      • perPassengerTripTaxes - Breakdown of the tax information per passenger type (Adult, Child, Infant).
      • perPassengerJourneyFares - Cost of each journey, per passenger type.
    • magicString
      The magicString is an encoded string containing the fare rules and other details that are not relevant to the user display, but are necessary when creating a booking. There is a magicString associated with each valid shop result, and this value must be passed into the /reservations API when creating a booking.

    • eligibleForEticketing
      Set to true if this flight allows eTicket. False means eTicket cannot be issued.

    • flightCanBeHeld
      Set to true if the user can book and hold this flight. False if the user must pay at when making a booking.

    • stopOvers(aka Layover)
      For flights options that include a stopover at an airport enroute (e.g. LAX>JFK->LHR), this object will contain details of the stopover airport, and the stopover duration. A stop over generally means the passenger will be waiting in the airport for a connecting flight (as opposed to stopping in the city for a few days).

    • durationMinutes
      This field contains the total duration of a journey, including any layover if the journey consists of multiple segments (e.g. LHR->KUL->SYD). The duration is in minutes.

  • fareRules : The fareRules contain a list of rules related to the fare displayed. These include baggage limits, change fees, frequent flyer tier points, etc. The rules are in a list of text strings to display to the user. Each fareRules has a code which matches the flight->fareMarketingType value.
  • validCreditCards : This is an array of strings, indicating the valid payment cards for this route. This list can vary by route.
  • payPal : Set to true if PayPal payment is allowed for this route.