Skip to content

Get air itineraries

Request

Get Air Itineraries available for the given search parameters

Security
Bearer
Bodyapplication/jsonrequired
travelersArray of objects(TravelerSearchInfo)required

Information about each of the travelers in the search request. This information is required.

legsArray of objects(SearchLeg)required

The list of all legs for which search results need to be returned.

filtersArray of objects(Filter)

The list of filters to be applied in the search request.

sortOptionsArray of objects(SortOption)

The sort options to be used for ordering the itineraries.

legSearchParamsobject(LegSearchParams)
corporateInfoobject(CorporateInfo)

Corporate data to be collected during the search request workflow.

searchModestring(SearchMode)

The search mode to be used for the search request.

Default:"NORMAL"
Enum:"NORMAL""EXPRESS""EXPRESS_EXTENDED"
Example:"EXPRESS"
rateCodesArray of strings

List of rate codes to be used for the search request.

Example:
[ "AMX01" ]
tripIdstring

Internal trip ID. Required for exchange and modify search flows.

Example:"9527251668"
bookingTypestring(AirSearchBookingType)

The type of booking requested.

Default:"NORMAL_BOOKING"
Enum:"NORMAL_BOOKING""GROUP_BOOKING"
numberOfCheapestOptionsinteger, (int32)

Number of cheapest options to be returned in the response.

Example:4
scopedSearchParamsobject(ScopedSearchParams)

Air search restricted per leg by every scope, on scope enabled suppliers only.

curl -i -X POST \
  https://api-ext-sboxmeta.partners.spotnana.com/v2/air/search-flights \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "travelers": [
      {
        "travelerType": "ADULT",
        "travelerAge": {
          "numYears": 22
        },
        "travelerInfo": {
          "userId": {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          }
        }
      }
    ],
    "legs": [
      {
        "origin": {
          "city": "NYC",
          "airport": "JFK",
          "multiAirports": {
            "airports": [
              "JFK"
            ]
          }
        },
        "destination": {
          "city": "NYC",
          "airport": "JFK",
          "multiAirports": {
            "airports": [
              "JFK"
            ]
          }
        },
        "date": {
          "iso8601": "2017-07-21"
        }
      }
    ],
    "filters": [
      {
        "cabin": {
          "type": "DEFAULT",
          "cabin": "ECONOMY",
          "cabins": [
            "ECONOMY"
          ]
        },
        "maxNumStops": 0,
        "timeRange": {
          "timeRanges": [
            {
              "legIndex": 0,
              "departure": {
                "min": {},
                "max": {}
              },
              "arrival": {
                "min": {},
                "max": {}
              }
            }
          ]
        },
        "alliance": {
          "alliances": [
            "STAR_ALLIANCE"
          ],
          "airlines": [
            "string"
          ]
        },
        "fareRange": {
          "min": {
            "amount": 510,
            "currencyCode": "GBP",
            "convertedAmount": 715.42,
            "convertedCurrency": "USD",
            "otherCoinage": [
              {
                "coinageCode": "BREX_POINTS",
                "amount": 1000,
                "conversionRate": 0.01,
                "preferredCurrencyConversionRate": 0.01,
                "otherCoinageMetadata": {}
              }
            ]
          },
          "max": {
            "amount": 510,
            "currencyCode": "GBP",
            "convertedAmount": 715.42,
            "convertedCurrency": "USD",
            "otherCoinage": [
              {
                "coinageCode": "BREX_POINTS",
                "amount": 1000,
                "conversionRate": 0.01,
                "preferredCurrencyConversionRate": 0.01,
                "otherCoinageMetadata": {}
              }
            ]
          }
        },
        "airlinePref": {
          "airlinePrefs": [
            {
              "legIndex": 0,
              "airline": [
                "string"
              ]
            }
          ]
        },
        "fareType": "UNKNOWN",
        "changeable": "NO_CHANGEABLE_FILTER",
        "connectingAirports": {
          "legFilters": [
            {
              "legIndex": 0,
              "airportCodes": [
                "string"
              ]
            }
          ]
        },
        "seatPref": {
          "seatTypes": [
            "UNKNOWN"
          ],
          "minPitchInch": 0
        },
        "covid": {
          "vaccine": "NO_PREFERENCE",
          "covidTest": "NO_PREFERENCE",
          "faceMask": "NO_PREFERENCE",
          "temperatureCheck": "NO_PREFERENCE",
          "blockedAdjacentSeats": "NO_PREFERENCE"
        },
        "baggage": {
          "freeCheckedBag": true,
          "freeCarryOn": true
        },
        "flightNumber": {
          "flightNumber": {
            "num": "321",
            "airlineCode": "AA"
          },
          "flightIdentifier": "string"
        },
        "policyFilter": {
          "onlyInPolicy": true
        },
        "multiTicketFilter": {
          "hideMultiTicket": true
        },
        "fareCategoryFilter": {
          "fareCategories": [
            {
              "ngsCategory": "UNKNOWN_NGS_CATEGORY",
              "cabinViewCategory": "UNKNOWN_CABIN_CATEGORY"
            }
          ]
        },
        "corporateCodeFilter": {
          "corpAccountCodes": [
            "PPF03"
          ]
        },
        "unusedCreditFilter": {
          "hideWithoutCredits": true
        },
        "payByPointsFilter": {
          "payByPoints": true
        }
      }
    ],
    "sortOptions": [
      {
        "sortBy": "PRICE",
        "sortOrder": "ASCENDING",
        "shelfNumber": 0
      }
    ],
    "legSearchParams": {
      "searchId": "string",
      "selectedRateOptionId": "string",
      "legIndex": 0,
      "asyncRouteHappy": true,
      "pageNumber": 0,
      "pageSize": 0,
      "legCloneInfo": {
        "pnrId": "string",
        "pnrLegIndex": 0
      }
    },
    "corporateInfo": {
      "preSearchAnswers": {
        "answers": [
          {
            "entityId": "string",
            "userInput": "string",
            "itemIds": [
              0
            ],
            "answers": [
              {
                "item": "string",
                "value": "string",
                "description": "string"
              }
            ],
            "customFieldType": "QUESTION",
            "questionDisplayText": "string",
            "question": {
              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
              "name": "string",
              "questionFormat": "CHECKBOX",
              "optionInfo": {
                "source": "MANUAL",
                "sourceMetadata": {},
                "totalNumOptions": 0,
                "options": [
                  null
                ]
              },
              "isRequired": true,
              "isDisabled": true,
              "includeInItinerary": true,
              "customFieldLocations": [
                "POLICY_APPROVAL_EMAIL"
              ],
              "matchConditions": {
                "travelerConditions": {
                  "workerTypes": [],
                  "countries": [],
                  "legalEntities": [],
                  "departments": [],
                  "costCenters": [],
                  "offices": []
                },
                "travelTypes": [
                  null
                ],
                "travelRegionTypes": [
                  null
                ],
                "tripUsageTypes": [
                  null
                ]
              },
              "questionType": {
                "preSearchQuestionType": "PURPOSE_OF_TRIP",
                "preCheckoutQuestionType": "OOP_REASON_CODE"
              }
            }
          }
        ],
        "userEntitiesResponseId": "string"
      },
      "customFieldV3Responses": [
        {
          "fieldId": "84922011-b03d-4966-bc95-c5b49bc2e342",
          "fieldName": "string",
          "armId": "0fd508db-63ff-4444-bfb1-b89c43061433",
          "includeLocations": [
            "APPROVAL_EMAILS"
          ],
          "selectedOptions": [
            {
              "name": "string",
              "translatedName": "string",
              "description": "string",
              "translatedDescription": "string",
              "additionalUserInput": "string",
              "additionalInfos": [
                "string"
              ],
              "additionalInfoConfigs": [
                {}
              ],
              "optionId": "dee15a0e-f1fe-4cd8-88ac-c090810707f8"
            }
          ]
        }
      ]
    },
    "searchMode": "EXPRESS",
    "rateCodes": [
      "AMX01"
    ],
    "tripId": "9527251668",
    "bookingType": "NORMAL_BOOKING",
    "numberOfCheapestOptions": 4,
    "scopedSearchParams": {
      "scopes": [
        {
          "legScopes": [
            {
              "legIndex": 0,
              "airlines": [
                "AA"
              ],
              "cabin": "ECONOMY",
              "departureTimeRange": {
                "min": {},
                "max": {}
              }
            }
          ]
        }
      ],
      "reusePreviousLegResponse": false,
      "scopeSource": "CALLER",
      "searchCoverage": "SCOPED_ONLY",
      "legResponseType": "CURRENT_LEG"
    }
  }'

Responses

OK

Bodyapplication/json
searchIdstringrequired

The unique ID for this search response. This value must be passed on in the subsequent booking API calls.

Example:"ChBjZDg3ZjRjZmRmMTFmMWFiEhBjZDg3Z"
itineraryDetailsobject(ItineraryInfo)required

The list of itineraries in the search response.

paginationParamsobject(PaginationResponseParams)

Pagination parameters for response.

metadataobject(AirMetadata)

Metadata associated with the air search response.

currSelectedItineraryobject(AirItin)

Currently selected itinerary for exchange or modify flows.

unusedCreditsArray of objects(UnusedCreditInfo)

Applicable unused airline credits based on the search.

cheapestOptionsArray of objects(AirItin)

List of cheapest itineraries after applying filters.

waiverApplicabilityTypestring(WaiverApplicabilityType)

Type of waiver applicable to an exchange:

  • WAIVER_APPLICABILITY_UNKNOWN: No waiver is applicable.
  • AIRLINE_DISRUPTION_WAIVER: Airline-issued disruption waiver is applicable.
Enum:"WAIVER_APPLICABILITY_UNKNOWN""AIRLINE_DISRUPTION_WAIVER"
Response
{ "searchId": "ChBjZDg3ZjRjZmRmMTFmMWFiEhBjZDg3Z", "itineraryDetails": { "itineraries": [ … ], "flightData": [ … ] }, "paginationParams": { "numResults": 0, "numPages": 0, "currentPageNumber": 0, "currentPageSize": 0 }, "metadata": { "airlineInfo": [ … ], "applicableAlliances": [ … ], "legBylegPricing": true, "enableFareCategories": [ … ], "isExpressSearch": true, "availableConnectingAirports": [ … ], "flightRestrictions": [ … ], "paymentMetadata": { … }, "logicalFareStatistics": [ … ], "shelfInfo": [ … ], "vendorPrograms": [ … ], "currentItinerary": { … }, "fareCategoryView": "UNKNOWN" }, "currSelectedItinerary": { "itineraryId": "kjdUjak8hX", "searchId": "ChBjZDg3ZjRjZmRmMTFmMWFiEhBjZDg3Z", "legs": [ … ], "travelers": [ … ], "fareInfo": { … }, "ticketType": "SINGLE", "policyInfos": { … }, "posInfo": [ … ], "publicFare": { … }, "allowedFopRules": [ … ], "fareAttributes": { … }, "additionalTotalFares": [ … ], "changeFee": { … }, "hasApplicableCredits": true, "applicableCreditIndices": [ … ], "showRawFareRules": true, "cloneInfo": { … }, "airline": "string", "isUnselectable": true, "inPolicyAmount": { … }, "checkoutApprovalInfo": { … }, "allowedFop": [ … ] }, "unusedCredits": [ { … } ], "cheapestOptions": [ { … } ], "waiverApplicabilityType": "WAIVER_APPLICABILITY_UNKNOWN" }