Skip to content

Air API (v2)

Download OpenAPI description
Languages
Servers
Sandbox URL
https://api-ext-sboxmeta.partners.spotnana.com/
Spotnana mock server
https://developer.spotnana.com/_mock/openapi/airapi/

Air

APIs to perform search, checkout and book an air pnr

Operations

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.

travelers[].​travelerTypestring(PassengerType)required
Enum"UNKNOWN_PASSENGER_TYPE""ADULT""CHILD""INFANT""INFANT_ON_LAP""YOUTH""SENIOR""TEEN"
travelers[].​travelerAgeobject(PassengerAge)
travelers[].​travelerInfoUserIdWrapper (object) or AdhocTravelerInfoWrapper (object)(AirRequestTravelerInfo)
One of:

The information about the traveler of given travelerType.

legsArray of objects(SearchLeg)required

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

legs[].​originobject(AirportLocation)required
legs[].​origin.​citystring

The code of a city used to identify a set of airports associated with it. For example, NYC or LON.

Example: "NYC"
legs[].​origin.​airportstring^[A-Z]{3}$

The airport code identifying a specific airport. For example, JFK or EWR.

Example: "JFK"
legs[].​origin.​multiAirportsobject(MultiAirports)
legs[].​destinationobject(AirportLocation)required
legs[].​destination.​citystring

The code of a city used to identify a set of airports associated with it. For example, NYC or LON.

Example: "NYC"
legs[].​destination.​airportstring^[A-Z]{3}$

The airport code identifying a specific airport. For example, JFK or EWR.

Example: "JFK"
legs[].​destination.​multiAirportsobject(MultiAirports)
legs[].​dateobject(DateModel)required
legs[].​date.​iso8601string^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01...required
Example: "2017-07-21"
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)
searchModestring(SearchMode)
Enum"NORMAL""EXPRESS""EXPRESS_EXTENDED"
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"
        },
        "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
              }
            ]
          },
          "max": {
            "amount": 510,
            "currencyCode": "GBP",
            "convertedAmount": 715.42,
            "convertedCurrency": "USD",
            "otherCoinage": [
              {
                "coinageCode": "BREX_POINTS",
                "amount": 1000,
                "conversionRate": 0.01,
                "preferredCurrencyConversionRate": 0.01
              }
            ]
          }
        },
        "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"
          }
        },
        "policyFilter": {
          "onlyInPolicy": true
        },
        "multiTicketFilter": {
          "hideMultiTicket": true
        },
        "fareCategoryFilter": {
          "fareCategories": [
            {
              "ngsCategory": "UNKNOWN_NGS_CATEGORY",
              "cabinViewCategory": "UNKNOWN_CABIN_CATEGORY"
            }
          ]
        },
        "corporateCodeFilter": {
          "corpAccountCodes": [
            "PPF03"
          ]
        },
        "unusedCreditFilter": {
          "hideWithoutCredits": true
        }
      }
    ],
    "sortOptions": [
      {
        "sortBy": "PRICE",
        "sortOrder": "ASCENDING",
        "shelfNumber": 0
      }
    ],
    "legSearchParams": {
      "searchId": "string",
      "selectedRateOptionId": "string",
      "legIndex": 0,
      "asyncRouteHappy": true,
      "pageNumber": 0,
      "pageSize": 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"
      }
    },
    "searchMode": "EXPRESS"
  }'

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
itineraryDetails.​itinerariesArray of objects(AirItin)
itineraryDetails.​flightDataArray of objects(FlightCommon)

The set of flights and their details that are contained in this response.

paginationParamsobject(PaginationResponseParams)
metadataobject(AirMetadata)
Response
application/json
{ "searchId": "ChBjZDg3ZjRjZmRmMTFmMWFiEhBjZDg3Z", "itineraryDetails": { "itineraries": [], "flightData": [] }, "paginationParams": { "numResults": 0, "numPages": 0 }, "metadata": { "airlineInfo": [], "applicableAlliances": [], "legBylegPricing": true, "enableFareCategories": [], "isExpressSearch": true } }

Get flight attributes

Request

Get Flight attributes, amenities and fare rules for the given search response id. Returns the full air search response along with attribute details.

Security
Bearer
Bodyapplication/jsonrequired
searchIdstringrequired

The unique ID for the search response for which the attributes are being requested.

Example: "ChBjZDg3ZjRjZmRmMTFmMWFiEhBjZDg3Z"
curl -i -X POST \
  https://api-ext-sboxmeta.partners.spotnana.com/v2/air/flight-attributes \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "searchId": "ChBjZDg3ZjRjZmRmMTFmMWFiEhBjZDg3Z"
  }'

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
itineraryDetails.​itinerariesArray of objects(AirItin)
itineraryDetails.​flightDataArray of objects(FlightCommon)

The set of flights and their details that are contained in this response.

paginationParamsobject(PaginationResponseParams)
metadataobject(AirMetadata)
Response
application/json
{ "searchId": "ChBjZDg3ZjRjZmRmMTFmMWFiEhBjZDg3Z", "itineraryDetails": { "itineraries": [], "flightData": [] }, "paginationParams": { "numResults": 0, "numPages": 0 }, "metadata": { "airlineInfo": [], "applicableAlliances": [], "legBylegPricing": true, "enableFareCategories": [], "isExpressSearch": true } }

Get selected itinerary

Request

Get the selected itinerary for the traveler in the search and checkout flow.

Security
Bearer
Bodyapplication/jsonrequired
searchIdstringrequired

The searchId returned in the corresponding air search API response.

Example: "ChBjZDg3ZjRjZmRmMTFm"
itineraryIdstringrequired

The itineraryId of the itinerary selected by the user in the corresponding air search API response.

Example: "IthBjZDg3ZjRjZmRmMTFm"
curl -i -X POST \
  https://api-ext-sboxmeta.partners.spotnana.com/v2/air/selected-itinerary \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "searchId": "ChBjZDg3ZjRjZmRmMTFm",
    "itineraryId": "IthBjZDg3ZjRjZmRmMTFm"
  }'

Responses

OK

Bodyapplication/json
itineraryobject(AirItin)required
itinerary.​itineraryIdstringrequired

The unique ID for this itinerary.

Example: "kjdUjak8hX"
itinerary.​legsArray of objects(AirLegInfo)required
itinerary.​legs[].​idstringrequired

The unique ID for this leg.

Example: "leg_0"
itinerary.​legs[].​flightsArray of objects(FlightDetail)required

Details of the list of flights present in the leg.

itinerary.​legs[].​flights[].​idstringrequired

The unique ID for this flight in the itinerary.

Example: "flight_0"
itinerary.​legs[].​flights[].​flightDataFlightRefWrapper (object) or FlightCommonWrapper (object)(FlightData)
One of:

Wrapper of flight reference to be used in oneOf.

itinerary.​legs[].​flights[].​cabinstring(Cabin)required
Enum"UNKNOWN_CABIN""ECONOMY""PREMIUM_ECONOMY""BUSINESS""FIRST"
itinerary.​legs[].​flights[].​bookingCodestring

The airline's one-letter code for the associated fare

Example: "B"
itinerary.​legs[].​flights[].​seatAvailabilityinteger(int32)

The availability of seats on this flight

Example: 9
itinerary.​legs[].​flights[].​corpAccountCodestring

The account code is used to get corporate negotiated price

Example: "DFG"
itinerary.​legs[].​flights[].​carbonEmissionobject(CO2EmissionDetail)
itinerary.​legs[].​flights[].​amenitiesArray of SeatAmenityWrapper (object) or WifiAmenityWrapper (object) or PowerAmenityWrapper (object) or EntertainmentAmenityWrapper (object) or BeverageAmenityWrapper (object) or AircraftAmenityWrapper (object) or LayoutAmenityWrapper (object) or FreshFoodAmenityWrapper (object) or CleaningAmenityWrapper (object) or MaskAmenityWrapper (object) or TemperatureAmenityWrapper (object) or PassengerCapacityAmenityWrapper (object) or BlockedAdjacentSeatsAmenityWrapper (object) or CovidTestingAmenityWrapper (object) or VaccineAmenityWrapper (object)(AirAmenity)

The amenities associated with the flight.

itinerary.​legs[].​flights[].​flightAttributesArray of objects(FlightAttribute)

The set of product attributes associated with the flight.

itinerary.​legs[].​travelerInfosArray of objects(TravelerLegInfo)required

Details of passenger(s) information for this leg.

itinerary.​legs[].​travelerInfos[].​travelerIdstringrequired

Unique identifier for the traveler in this response

Example: "adult_0"
itinerary.​legs[].​travelerInfos[].​travelerLegFareobject(FareAmount)
itinerary.​legs[].​travelerInfos[].​fareRulesobject(FareRules)
itinerary.​legs[].​totalLegFareobject(FareAmount)required
itinerary.​legs[].​totalLegFare.​baseobject(Money)required
itinerary.​legs[].​totalLegFare.​base.​amountnumber(double)required

The numeric value for the amount of money.

Example: 510
itinerary.​legs[].​totalLegFare.​base.​currencyCodestringrequired

The 3-letter currency code for the money amount (defined using ISO 4217 standard).

Example: "GBP"
itinerary.​legs[].​totalLegFare.​base.​convertedAmountnumber(double)

The converted currency and amount that has been converted (if a currency conversion has been requested). For example, if the call requests that money be sent in a specified currency (because the frontend requested the backend to send money in the user's preferred currency).

Example: 715.42
itinerary.​legs[].​totalLegFare.​base.​convertedCurrencystring

The 3-letter currency code for the converted currency (defined using ISO 4217 standard).

Example: "USD"
itinerary.​legs[].​totalLegFare.​base.​otherCoinageArray of objects(OtherCoinage)

List of the dollar amount in other coinage systems like reward points, cryptocurrency etc.

itinerary.​legs[].​totalLegFare.​taxobject(Money)required
itinerary.​legs[].​totalLegFare.​tax.​amountnumber(double)required

The numeric value for the amount of money.

Example: 510
itinerary.​legs[].​totalLegFare.​tax.​currencyCodestringrequired

The 3-letter currency code for the money amount (defined using ISO 4217 standard).

Example: "GBP"
itinerary.​legs[].​totalLegFare.​tax.​convertedAmountnumber(double)

The converted currency and amount that has been converted (if a currency conversion has been requested). For example, if the call requests that money be sent in a specified currency (because the frontend requested the backend to send money in the user's preferred currency).

Example: 715.42
itinerary.​legs[].​totalLegFare.​tax.​convertedCurrencystring

The 3-letter currency code for the converted currency (defined using ISO 4217 standard).

Example: "USD"
itinerary.​legs[].​totalLegFare.​tax.​otherCoinageArray of objects(OtherCoinage)

List of the dollar amount in other coinage systems like reward points, cryptocurrency etc.

itinerary.​legs[].​totalLegFare.​taxBreakdownArray of objects(TaxBreakdown)
itinerary.​legs[].​fareCategoryobject(FareCategory)required
itinerary.​legs[].​fareCategory.​ngsCategorystring(NGSFareCategory)
Enum"UNKNOWN_NGS_CATEGORY""BASE""STANDARD""ENHANCED""PREMIUM""LUXURY""ULTRA_LUXURY"
itinerary.​legs[].​fareCategory.​cabinViewCategorystring(CabinViewFareCategory)
Enum"UNKNOWN_CABIN_CATEGORY""BASIC""ECONOMY""PREMIUM_ECONOMY""ECONOMY_PLUS""BUSINESS""FIRST"
itinerary.​legs[].​brandNamestring

The brand name advertised by the airline.

Example: "Economy Flex"
itinerary.​legs[].​brandCodestring

The brand code assigned by the airline corresponding brandName.

Example: "AADOM-MAIN"
itinerary.​legs[].​validatingAirlinestring

The airline code for the airline which is validating this booking and orchestrating the payment.

Example: "AA"
itinerary.​legs[].​rateTypestring(RateType)
Enum"RATE_TYPE_UNKNOWN""PUBLISHED""TMC_NEGOTIATED""COMPANY_NEGOTIATED"
itinerary.​legs[].​vendorProgramTypestring(VendorProgramType)
Enum"UA_PASS_PLUS""GENERIC_PROGRAM_TYPE"
itinerary.​travelersArray of objects(TravelerDetail)required
itinerary.​travelers[].​travelerIdstringrequired

Unique identifier for the traveler in this response

Example: "adult_0"
itinerary.​travelers[].​travelerTypestring(PassengerType)required
Enum"UNKNOWN_PASSENGER_TYPE""ADULT""CHILD""INFANT""INFANT_ON_LAP""YOUTH""SENIOR""TEEN"
itinerary.​travelers[].​travelerAgeobject(PassengerAge)
itinerary.​travelers[].​fareInfoobject(FareInfo)required
itinerary.​travelers[].​fareInfo.​totalFareobject(FareAmount)required
itinerary.​travelers[].​fareInfo.​totalFare.​baseobject(Money)required
itinerary.​travelers[].​fareInfo.​totalFare.​taxobject(Money)required
itinerary.​travelers[].​fareInfo.​totalFare.​taxBreakdownArray of objects(TaxBreakdown)
itinerary.​travelers[].​fareInfo.​taxBreakdownArray of objects(TaxBreakdown)
itinerary.​travelers[].​fareInfo.​merchantFeeInfoobject(MerchantFeeInfo)
itinerary.​travelers[].​fareMetadataobject(FareMetadata)
itinerary.​fareInfoobject(FareInfo)
itinerary.​ticketTypestring(TicketType)required
Enum"SINGLE""MULTI"
itinerary.​policyInfosobject(PnrPolicyInfo)
itinerary.​posInfoArray of objects(POSInfo)

The point of sales which offer the itinerary.

itinerary.​publicFareobject(FareAmount)
itinerary.​allowedFopRulesArray of objects(AllowedFopRule)

The payment method types applicable to the itinerary.

itinerary.​fareAttributesobject(FareAttributes)
Response
application/json
{ "itinerary": { "itineraryId": "kjdUjak8hX", "legs": [], "travelers": [], "fareInfo": {}, "ticketType": "SINGLE", "policyInfos": {}, "posInfo": [], "publicFare": {}, "allowedFopRules": [], "fareAttributes": {} } }

Autocomplete

Operations

Loyalty Programs

Operations