Search code examples
amadeus

With new v2 flight-offers endpoint includedAirlineCodes & exlcludedAirlineCodes cannot be used together?


In the previous version, V1, Low-fare search, these two parameters could both be used. Is that no longer possible? These parameters:

{'adults': 1, 'children': 0, 'currencyCode': 'USD', 'departureDate': '2020-09-30', 'destinationLocationCode': 'FLL', 'excludedAirlineCodes': 'NK,B6', 'includedAirlineCodes': 'DL', 'infants': 0, 'nonStop': 'false', 'originLocationCode': 'MSP', 'returnDate': '2020-10-07', 'travelClass': 'ECONOMY'}

Generate this error:

{'errors': [{'status': 400, 'code': 2668, 'title': 'PARAMETER COMBINATION INVALID/RESTRICTED', 'detail': 'excludedAirlineCodes and includedAirlineCodes are not compatible'}]}


Solution

  • In the Flight Offers Search API (v2) we fixed something that was confusing for users: if you use includedAirlineCodes you only get the flights of the airline(s) specified (so it excludes all other airlines). Using includedAirlineCodes and excludedAirlineCodes at the same time is not possible.