Air API (v2)

Download OpenAPI description
Languages
Servers
Staging URL
https://apis.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 selected itinerary

Request

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

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://apis.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

The itinerary selected by the user.

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[].​flightDataFlightData (object) or FlightData (object)(FlightData)
One of:

Wrapper of flight reference to be used in oneOf.

itinerary.​legs[].​flights[].​cabinstring(Cabin)required

The cabin type for this flight in the associated itinerary

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)

The CO2 emission details for this flight

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)

The fare amount for the traveler for a given leg

itinerary.​legs[].​travelerInfos[].​fareRulesobject(FareRules)

Fare rules applicable for the traveler

itinerary.​legs[].​totalLegFareobject(FareAmount)required

Total cumulative fare for this leg summed across all passengers

itinerary.​legs[].​totalLegFare.​baseobject(Money)required

Base fare amount.

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

Tax amount.

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[].​fareCategoryobject(FareCategory)required

Fare category of this leg. It describes the cabin class for this flight.

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)

Rate or fare type for this leg (for example "public" or "corporate").

Enum"RATE_TYPE_UNKNOWN""PUBLISHED""TMC_NEGOTIATED""COMPANY_NEGOTIATED"
itinerary.​legs[].​vendorProgramTypestring(VendorProgramType)

The type of the vendor program

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

Type of passenger

Enum"UNKNOWN_PASSENGER_TYPE""ADULT""CHILD""INFANT""INFANT_ON_LAP""YOUTH""SENIOR""TEEN"
itinerary.​travelers[].​travelerAgeobject(PassengerAge)

Age of the traveler

itinerary.​travelers[].​fareInfoobject(FareInfo)required

The detailed information about the fare (including tax and merchant fee details).

itinerary.​travelers[].​fareInfo.​totalFareobject(FareAmount)required

Total fare applicable to the associated entity.

itinerary.​travelers[].​fareInfo.​totalFare.​baseobject(Money)required

Base fare amount.

itinerary.​travelers[].​fareInfo.​totalFare.​taxobject(Money)required

Tax amount.

itinerary.​travelers[].​fareInfo.​taxBreakdownArray of objects(TaxBreakdown)

Details about of the tax amount in totalFare field.

itinerary.​travelers[].​fareInfo.​merchantFeeInfoobject(MerchantFeeInfo)

Describes the merchant fee applicable on the itinerary.

itinerary.​travelers[].​fareMetadataobject(FareMetadata)

Metadata about pax fare

itinerary.​fareInfoobject(FareInfo)

Describes the fare amount and taxes.

itinerary.​ticketTypestring(TicketType)required

Indicates whether this itinerary will be a single or multi ticket

Enum"SINGLE""MULTI"
itinerary.​policyInfosobject(PnrPolicyInfo)

The policy details evaluated on the itinerary.

itinerary.​posInfoArray of objects(POSInfo)

The point of sales which offer the itinerary.

itinerary.​publicFareobject(FareAmount)

The public fare attribute in case private fare is applied for any pax

itinerary.​allowedFopRulesArray of objects(AllowedFopRule)

The payment method types applicable to the itinerary.

itinerary.​fareAttributesobject(FareAttributes)

The fare attributes applicable to the itinerary.

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

Get Airlines Information (Air)

Request

Returns airlines information for active marked airlines.

Query
includeInactivebooleanrequired

Include Airlines with inactive status along with active.

curl -i -X GET \
  'https://apis.spotnana.com/v2/air/airlines-info?includeInactive=true' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
airlineInfoArray of objects(AirlineInfoComplete)required
airlineInfo[].​airlineCodestringrequired

Airline code

Example: "AA"
airlineInfo[].​airlineNamestringrequired

Airline name

Example: "American Airlines"
airlineInfo[].​countrystringrequired

Airline country

Example: "United States"
airlineInfo[].​twoLetterCountryCodestringrequired

Two letter country code

Example: "US"
airlineInfo[].​isActivebooleanrequired

Airline active status

Example: true
airlineInfo[].​loyaltyProgramNamestringrequired

Airline loyalty program name

Example: "AA Advantage"
airlineInfo[].​loyaltyProgramCodestringrequired

Airline loyalty program code

Example: "AA Adv"
airlineInfo[].​airlineTicketPrefixstringrequired

Airline ticket prefix

Example: "001"
Response
application/json
{ "airlineInfo": [ {} ] }

Get flight checkout details

Request

Get the flight checkout details associated with the selected itinerary.

Bodyapplication/jsonrequired
searchIdstringrequired

Search id returned in the corresponding air search API response.

Example: "ChBjZDg3ZjRjZmRmMTFm"
itineraryIdstringrequired

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

Example: "IthBjZDg3ZjRjZmRmMTFm"
curl -i -X POST \
  https://apis.spotnana.com/v2/air/flight-checkout \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "searchId": "ChBjZDg3ZjRjZmRmMTFm",
    "itineraryId": "IthBjZDg3ZjRjZmRmMTFm"
  }'

Responses

OK

Bodyapplication/json
checkoutResponseIdstringrequired

The unique ID which identifies this checkout response. This value must passed on in the subsequent booking API calls.

Example: "ChBjZDg3ZjRjZmRmMTFmMWFiEhBjZDg3Z"
baggageInfoobject(BaggageSelectionInfo)

Describes the baggage selection options available for the user to buy on the flight checkout page.

ancillariesArray of objects(AncillarySelectionInfo)

List of ancillaries available for purchase.

mandatoryCheckoutParamsArray of objects(MandatoryParamForCheckout)
airlineCardFeesArray of objects(AirlineCardFee)

List of all the supported card options. If this list is empty, all cards are supported.

Response
application/json
{ "checkoutResponseId": "ChBjZDg3ZjRjZmRmMTFmMWFiEhBjZDg3Z", "baggageInfo": { "baggageSelectionGroups": [] }, "ancillaries": [ {} ], "mandatoryCheckoutParams": [ {} ], "airlineCardFees": [ {} ] }

Loyalty Programs

Operations