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 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": [ {} ] }

Get flight seat map

Request

Get seat map for the flights in the given itinerary.

Bodyapplication/jsonrequired
itineraryAirItineraryIdWrapper (object) or PnrItineraryWrapper (object)(SeatMapItinerary)required
One of:

The itinerary for which the seat map needs to be returned.

itinerary.​airItineraryIdobject(AirItineraryIdentifier)

An air itinerary ID wrapper.

travelerInfosArray of objects(TravelerSeatInfo)required

Information about the travelers on the itinerary.

travelerInfos[].​travelerTypestring(PassengerType)

Type of passenger

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

Age of the traveler. Only required if traveler type is Child.

travelerInfos[].​travelerInfoAirRequestTravelerInfo (object) or AirRequestTravelerInfo (object)(AirRequestTravelerInfo)
One of:

The information around the given traveler.

travelerInfos[].​loyaltyInfosArray of objects(SeatLoyaltyInfo)

Information about the traveler's loyalty program memberships.

indexesArray of objects(SeatIndexes)

Indexes for the seat map request must be provided only when specific legs or flights need to be selected. If not provided, all legs and flights will be considered.

curl -i -X POST \
  https://apis.spotnana.com/v2/air/seat-map \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "itinerary": {
      "airItineraryId": {
        "searchId": "Xjdks78X",
        "itineraryId": "ijdks78X"
      }
    },
    "travelerInfos": [
      {
        "travelerType": "ADULT",
        "travelerAge": {
          "numYears": 22
        },
        "travelerInfo": {
          "userId": {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          }
        },
        "loyaltyInfos": [
          {
            "flightId": "flight_0",
            "loyaltyInfos": [
              {
                "appliedTo": [
                  null
                ],
                "id": "firstId",
                "issuedBy": "firstIssuedBy",
                "type": "AIR"
              }
            ]
          }
        ]
      }
    ],
    "indexes": [
      {
        "legIndex": 0,
        "flightIndex": [
          0
        ]
      }
    ]
  }'

Responses

OK

Bodyapplication/json
seatMapResponseIdstring

Unique identifier for this seat map response, which would need to be passed on in subsequent booking APIs.

Example: "seat1234"
travelerSeatMapsArray of objects(TravelerSeatMap)

Seat maps for a flight for each traveler type.

seatMapsArray of objects(FlightSeatMap)

The list of seat maps available in the response.

Response
application/json
{ "seatMapResponseId": "seat1234", "travelerSeatMaps": [ {} ], "seatMaps": [ {} ] }

Loyalty Programs

Operations