Air API (v2)

Download OpenAPI description
Languages
Servers
Mock server
https://developer.spotnana.com/_mock/openapi/airapi/
Staging URL
https://apis.spotnana.com/

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

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

Type of passenger

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

Age of the traveler

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

Wrapper over UserId object to be used as an identifier in a oneOf case

legsArray of objects(SearchLeg)required

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

legs[].​originobject(AirportLocation)required

3 letter IATA airport or metropolitan code for the origin

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)

List of airports. All airports should belong to the same country.

legs[].​destinationobject(AirportLocation)required

3 letter IATA airport or metropolitan code for the destination

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)

List of airports. All airports should belong to the same country.

legs[].​dateobject(DateModel)required

Date in ISO 8601 standard.

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)

Corporate data to be collected during the search request workflow.

curl -i -X POST \
  https://developer.spotnana.com/_mock/openapi/airapi/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"
      }
    }
  }'

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

Describes the detailed itinerary information provided in the search response.

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)

Pagination parameters for response.

metadataobject(AirMetadata)

Metadata associated with the air search response.

Response
application/json
{ "searchId": "ChBjZDg3ZjRjZmRmMTFmMWFiEhBjZDg3Z", "itineraryDetails": { "itineraries": [], "flightData": [] }, "paginationParams": { "numResults": 0, "numPages": 0 }, "metadata": { "airlineInfo": [], "applicableAlliances": [], "legBylegPricing": true, "enableFareCategories": [] } }

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.

Bodyapplication/jsonrequired
searchIdstringrequired

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

Example: "ChBjZDg3ZjRjZmRmMTFmMWFiEhBjZDg3Z"
curl -i -X POST \
  https://developer.spotnana.com/_mock/openapi/airapi/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

Describes the detailed itinerary information provided in the search response.

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)

Pagination parameters for response.

metadataobject(AirMetadata)

Metadata associated with the air search response.

Response
application/json
{ "searchId": "ChBjZDg3ZjRjZmRmMTFmMWFiEhBjZDg3Z", "itineraryDetails": { "itineraries": [], "flightData": [] }, "paginationParams": { "numResults": 0, "numPages": 0 }, "metadata": { "airlineInfo": [], "applicableAlliances": [], "legBylegPricing": true, "enableFareCategories": [] } }

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://developer.spotnana.com/_mock/openapi/airapi/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

Describes an itinerary containing legs and flights.

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

Flight cabin

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)

CO2 emission details for the 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)

Fare amount including base fare and tax.

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

The rules and restrictions associated with the fare.

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

Fare amount including base fare and tax.

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

Money object containing details such as the amount, the currency code, and the converted 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

Money object containing details such as the amount, the currency code, and the converted 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)

Type of booked fare

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

Fare amount including base fare and tax.

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

Money object containing details such as the amount, the currency code, and the converted amount.

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

Money object containing details such as the amount, the currency code, and the converted 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)

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

itinerary.​ticketTypestring(TicketType)required

The ticket issuance type for a given itinerary, whether single or multiple

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

Policy Info applicable for the associated itinerary

itinerary.​posInfoArray of objects(POSInfo)

The point of sales which offer the itinerary.

itinerary.​publicFareobject(FareAmount)

Fare amount including base fare and tax.

itinerary.​allowedFopRulesArray of objects(AllowedFopRule)

The payment method types applicable to the itinerary.

itinerary.​fareAttributesobject(FareAttributes)

The rules and attributes related to the fare.

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://developer.spotnana.com/_mock/openapi/airapi/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://developer.spotnana.com/_mock/openapi/airapi/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

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

Wrapper over UserId object to be used as an identifier in a oneOf case

travelerInfos[].​loyaltyInfosArray of objects(SeatLoyaltyInfo)

Information about the traveler's loyalty program memberships.

curl -i -X POST \
  https://developer.spotnana.com/_mock/openapi/airapi/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"
              }
            ]
          }
        ]
      }
    ]
  }'

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

Initiate booking

Request

Initiates a new air booking for the trip. The identityDocs field supports the following traveler identity documents: Passport, National ID, Known Traveler Number (KTN), redress number, and immigration documents. The traveler can choose one among the list of identity documents available and provide its information during checkout.

Bodyapplication/jsonrequired
initiateBookingWorkflowIdsobject(InitiateBookingWorkflowIds)

The set of unique response ids associated with initiate booking workflow.

travelersArray of objects(AirBookTravelerInfo)
bookingChargesArray of objects(BookingCharge)
bookingContactobject(BookingContact)

Booking contact for the itinerary. Airlines send all update and change information to booking contact as well.

useExistingBookingboolean

Use existing booking if it exists to initiate

curl -i -X POST \
  https://developer.spotnana.com/_mock/openapi/airapi/v2/air/initiate-booking \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "initiateBookingWorkflowIds": {
      "checkoutResponseId": "string",
      "seatMapResponseId": "string"
    },
    "travelers": [
      {
        "travelerDetails": {
          "travelerId": {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          },
          "travelerInfo": {
            "userId": {
              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
            }
          },
          "travelerType": "ADULT",
          "title": "MR",
          "name": {
            "family1": "Gandas",
            "family2": "FamilyTwo",
            "given": "Vichitr",
            "middle": "Kumar",
            "suffix": "SR",
            "preferred": "Don"
          },
          "gender": "FEMALE",
          "dob": {
            "iso8601": "2017-07-21"
          },
          "phoneNumber": {
            "countryCode": 91,
            "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
            "extension": "222",
            "isoCountryCode": "IN",
            "italianLeadingZero": true,
            "nationalNumber": 8150,
            "numberOfLeadingZeros": 1,
            "preferredDomesticCarrierCode": "7",
            "rawInput": "77777",
            "type": "MOBILE"
          },
          "email": "example@email.com",
          "identityDocs": [
            {
              "passport": {
                "docId": "PassportID",
                "expiryDate": {},
                "issueCountry": "IN",
                "issuedDate": {},
                "nationalityCountry": "IN",
                "type": "REGULAR"
              }
            }
          ],
          "address": {
            "addressLines": [
              "Golden Gate Bridge"
            ],
            "administrativeArea": "CA",
            "administrativeAreaName": "California",
            "description": "San Francisco Home",
            "isDefault": true,
            "languageCode": "en",
            "locality": "San Francisco",
            "locationCode": "LAX",
            "organization": "Spotnana",
            "postalCode": "94130",
            "continentCode": "AF",
            "recipients": [
              "string"
            ],
            "regionCode": "US",
            "regionName": "America",
            "revision": 1,
            "sortingCode": "Jamaica",
            "sublocality": "string",
            "timezone": "America/Los_Angeles",
            "coordinates": {
              "latitude": 77.1025,
              "longitude": 28.7041
            }
          },
          "emergencyContactInfo": {
            "address": {
              "addressLines": [
                "Golden Gate Bridge"
              ],
              "administrativeArea": "CA",
              "administrativeAreaName": "California",
              "description": "San Francisco Home",
              "isDefault": true,
              "languageCode": "en",
              "locality": "San Francisco",
              "locationCode": "LAX",
              "organization": "Spotnana",
              "postalCode": "94130",
              "continentCode": "AF",
              "recipients": [
                "string"
              ],
              "regionCode": "US",
              "regionName": "America",
              "revision": 1,
              "sortingCode": "Jamaica",
              "sublocality": "string",
              "timezone": "America/Los_Angeles",
              "coordinates": {
                "latitude": 77.1025,
                "longitude": 28.7041
              }
            },
            "designation": "MANAGER",
            "email": "emergency-contact@email.com",
            "name": {
              "family1": "Gandas",
              "family2": "FamilyTwo",
              "given": "Vichitr",
              "middle": "Kumar",
              "suffix": "SR",
              "preferred": "Don"
            },
            "phoneNumber": {
              "countryCode": 91,
              "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
              "extension": "222",
              "isoCountryCode": "IN",
              "italianLeadingZero": true,
              "nationalNumber": 8150,
              "numberOfLeadingZeros": 1,
              "preferredDomesticCarrierCode": "7",
              "rawInput": "77777",
              "type": "MOBILE"
            },
            "userOrgId": {
              "organizationAgencyId": {
                "id": "string"
              },
              "organizationId": {
                "id": "string"
              },
              "userId": {
                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
              },
              "tmcInfo": {
                "id": {},
                "primaryServiceProviderTmc": {},
                "secondaryServiceProviderTmcs": [
                  null
                ],
                "partnerTmcId": {}
              },
              "tmcBasicInfo": {
                "contractingTmc": {},
                "bookingTmc": {}
              }
            }
          },
          "loyaltyInfos": [
            {
              "appliedTo": [
                "TAJ"
              ],
              "id": "firstId",
              "issuedBy": "firstIssuedBy",
              "type": "AIR"
            }
          ],
          "emergencyContact": {
            "name": "John Smith",
            "email": "emergency-contact@email.com",
            "designation": "MANAGER",
            "relation": "SPOUSE",
            "phoneNumbers": [
              {
                "countryCode": 91,
                "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
                "extension": "222",
                "isoCountryCode": "IN",
                "italianLeadingZero": true,
                "nationalNumber": 8150,
                "numberOfLeadingZeros": 1,
                "preferredDomesticCarrierCode": "7",
                "rawInput": "77777",
                "type": "MOBILE"
              }
            ],
            "preferredLanguage": "en-US"
          }
        },
        "seats": [
          {
            "flightId": "string",
            "seatNumbers": [
              "string"
            ]
          }
        ],
        "baggages": [
          {
            "legId": "string",
            "baggageIds": [
              "string"
            ]
          }
        ],
        "ancillaries": [
          {
            "ancillaryId": "ancillary_0"
          }
        ],
        "shareContactInfo": false
      }
    ],
    "bookingCharges": [
      {
        "amount": {
          "base": {
            "amount": 510,
            "currencyCode": "GBP",
            "convertedAmount": 715.42,
            "convertedCurrency": "USD",
            "otherCoinage": [
              {
                "coinageCode": "BREX_POINTS",
                "amount": 1000,
                "conversionRate": 0.01,
                "preferredCurrencyConversionRate": 0.01
              }
            ]
          },
          "tax": {
            "amount": 510,
            "currencyCode": "GBP",
            "convertedAmount": 715.42,
            "convertedCurrency": "USD",
            "otherCoinage": [
              {
                "coinageCode": "BREX_POINTS",
                "amount": 1000,
                "conversionRate": 0.01,
                "preferredCurrencyConversionRate": 0.01
              }
            ]
          }
        },
        "paymentMethod": {
          "selectedPaymentSource": {
            "paymentSourceId": "f49d00fe-1eda-4304-ba79-a980f565281d",
            "rawPaymentSource": {
              "type": "string",
              "cardDetails": {
                "company": "VISA",
                "token": "4111111111111111",
                "expiry": {}
              }
            },
            "postPaymentRedirectionUrl": "https://mycompany.com/checkout?paymentSourceId=f49d00fe-1eda-4304-ba79-a980f565281d",
            "cvv": "string",
            "amount": {
              "amount": 510,
              "currencyCode": "GBP",
              "convertedAmount": 715.42,
              "convertedCurrency": "USD",
              "otherCoinage": [
                {}
              ]
            }
          }
        }
      }
    ],
    "bookingContact": {
      "emailAddress": "mail@mail.com",
      "phoneNumber": {
        "countryCode": 91,
        "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
        "extension": "222",
        "isoCountryCode": "IN",
        "italianLeadingZero": true,
        "nationalNumber": 8150,
        "numberOfLeadingZeros": 1,
        "preferredDomesticCarrierCode": "7",
        "rawInput": "77777",
        "type": "MOBILE"
      }
    },
    "useExistingBooking": true
  }'

Responses

OK

Bodyapplication/json
initiateBookingResponseIdstring

Initiated booking's reference id

Example: "CuwDQ2hCa09HVTJZemsyWVRFNFlUUm"
paymentSourcePrePaymentInformationArray of objects(PaymentSourcePrePaymentInformation)
Response
application/json
{ "initiateBookingResponseId": "CuwDQ2hCa09HVTJZemsyWVRFNFlUUm", "paymentSourcePrePaymentInformation": [ {} ] }

Validate air itinerary

Request

Validates the air itinerary for availability and pricing

Bodyapplication/jsonrequired
workflowIdsobject(WorkflowIds)

The set of unique response ids associated with the booking workflow.

tripIdobject(TripId)

Id of trip.

travelersArray of objects(AirBookTravelerInfo)
bookingChargesArray of objects(BookingCharge)
promotionCodeobject(PromotionCode)

Promotion code

curl -i -X POST \
  https://developer.spotnana.com/_mock/openapi/airapi/v2/air/revalidate-itinerary \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "workflowIds": {
      "checkoutResponseId": "string",
      "seatMapResponseId": "string",
      "paymentSetupResponseId": "string",
      "initiateBookingId": "string"
    },
    "tripId": {
      "id": "2783425534"
    },
    "travelers": [
      {
        "travelerDetails": {
          "travelerId": {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          },
          "travelerInfo": {
            "userId": {
              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
            }
          },
          "travelerType": "ADULT",
          "title": "MR",
          "name": {
            "family1": "Gandas",
            "family2": "FamilyTwo",
            "given": "Vichitr",
            "middle": "Kumar",
            "suffix": "SR",
            "preferred": "Don"
          },
          "gender": "FEMALE",
          "dob": {
            "iso8601": "2017-07-21"
          },
          "phoneNumber": {
            "countryCode": 91,
            "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
            "extension": "222",
            "isoCountryCode": "IN",
            "italianLeadingZero": true,
            "nationalNumber": 8150,
            "numberOfLeadingZeros": 1,
            "preferredDomesticCarrierCode": "7",
            "rawInput": "77777",
            "type": "MOBILE"
          },
          "email": "example@email.com",
          "identityDocs": [
            {
              "passport": {
                "docId": "PassportID",
                "expiryDate": {},
                "issueCountry": "IN",
                "issuedDate": {},
                "nationalityCountry": "IN",
                "type": "REGULAR"
              }
            }
          ],
          "address": {
            "addressLines": [
              "Golden Gate Bridge"
            ],
            "administrativeArea": "CA",
            "administrativeAreaName": "California",
            "description": "San Francisco Home",
            "isDefault": true,
            "languageCode": "en",
            "locality": "San Francisco",
            "locationCode": "LAX",
            "organization": "Spotnana",
            "postalCode": "94130",
            "continentCode": "AF",
            "recipients": [
              "string"
            ],
            "regionCode": "US",
            "regionName": "America",
            "revision": 1,
            "sortingCode": "Jamaica",
            "sublocality": "string",
            "timezone": "America/Los_Angeles",
            "coordinates": {
              "latitude": 77.1025,
              "longitude": 28.7041
            }
          },
          "emergencyContactInfo": {
            "address": {
              "addressLines": [
                "Golden Gate Bridge"
              ],
              "administrativeArea": "CA",
              "administrativeAreaName": "California",
              "description": "San Francisco Home",
              "isDefault": true,
              "languageCode": "en",
              "locality": "San Francisco",
              "locationCode": "LAX",
              "organization": "Spotnana",
              "postalCode": "94130",
              "continentCode": "AF",
              "recipients": [
                "string"
              ],
              "regionCode": "US",
              "regionName": "America",
              "revision": 1,
              "sortingCode": "Jamaica",
              "sublocality": "string",
              "timezone": "America/Los_Angeles",
              "coordinates": {
                "latitude": 77.1025,
                "longitude": 28.7041
              }
            },
            "designation": "MANAGER",
            "email": "emergency-contact@email.com",
            "name": {
              "family1": "Gandas",
              "family2": "FamilyTwo",
              "given": "Vichitr",
              "middle": "Kumar",
              "suffix": "SR",
              "preferred": "Don"
            },
            "phoneNumber": {
              "countryCode": 91,
              "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
              "extension": "222",
              "isoCountryCode": "IN",
              "italianLeadingZero": true,
              "nationalNumber": 8150,
              "numberOfLeadingZeros": 1,
              "preferredDomesticCarrierCode": "7",
              "rawInput": "77777",
              "type": "MOBILE"
            },
            "userOrgId": {
              "organizationAgencyId": {
                "id": "string"
              },
              "organizationId": {
                "id": "string"
              },
              "userId": {
                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
              },
              "tmcInfo": {
                "id": {},
                "primaryServiceProviderTmc": {},
                "secondaryServiceProviderTmcs": [
                  null
                ],
                "partnerTmcId": {}
              },
              "tmcBasicInfo": {
                "contractingTmc": {},
                "bookingTmc": {}
              }
            }
          },
          "loyaltyInfos": [
            {
              "appliedTo": [
                "TAJ"
              ],
              "id": "firstId",
              "issuedBy": "firstIssuedBy",
              "type": "AIR"
            }
          ],
          "emergencyContact": {
            "name": "John Smith",
            "email": "emergency-contact@email.com",
            "designation": "MANAGER",
            "relation": "SPOUSE",
            "phoneNumbers": [
              {
                "countryCode": 91,
                "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
                "extension": "222",
                "isoCountryCode": "IN",
                "italianLeadingZero": true,
                "nationalNumber": 8150,
                "numberOfLeadingZeros": 1,
                "preferredDomesticCarrierCode": "7",
                "rawInput": "77777",
                "type": "MOBILE"
              }
            ],
            "preferredLanguage": "en-US"
          }
        },
        "seats": [
          {
            "flightId": "string",
            "seatNumbers": [
              "string"
            ]
          }
        ],
        "baggages": [
          {
            "legId": "string",
            "baggageIds": [
              "string"
            ]
          }
        ],
        "ancillaries": [
          {
            "ancillaryId": "ancillary_0"
          }
        ],
        "shareContactInfo": false
      }
    ],
    "bookingCharges": [
      {
        "amount": {
          "base": {
            "amount": 510,
            "currencyCode": "GBP",
            "convertedAmount": 715.42,
            "convertedCurrency": "USD",
            "otherCoinage": [
              {
                "coinageCode": "BREX_POINTS",
                "amount": 1000,
                "conversionRate": 0.01,
                "preferredCurrencyConversionRate": 0.01
              }
            ]
          },
          "tax": {
            "amount": 510,
            "currencyCode": "GBP",
            "convertedAmount": 715.42,
            "convertedCurrency": "USD",
            "otherCoinage": [
              {
                "coinageCode": "BREX_POINTS",
                "amount": 1000,
                "conversionRate": 0.01,
                "preferredCurrencyConversionRate": 0.01
              }
            ]
          }
        },
        "paymentMethod": {
          "selectedPaymentSource": {
            "paymentSourceId": "f49d00fe-1eda-4304-ba79-a980f565281d",
            "rawPaymentSource": {
              "type": "string",
              "cardDetails": {
                "company": "VISA",
                "token": "4111111111111111",
                "expiry": {}
              }
            },
            "postPaymentRedirectionUrl": "https://mycompany.com/checkout?paymentSourceId=f49d00fe-1eda-4304-ba79-a980f565281d",
            "cvv": "string",
            "amount": {
              "amount": 510,
              "currencyCode": "GBP",
              "convertedAmount": 715.42,
              "convertedCurrency": "USD",
              "otherCoinage": [
                {}
              ]
            }
          }
        }
      }
    ],
    "promotionCode": {
      "code": "NEWUSER"
    }
  }'

Responses

OK

Bodyapplication/json
bookingIdstring

The booking ID for the booking.

Example: "bookingid"
fareBreakDownobject(BookingFareBreakdown)
legPricesArray of objects(LegPrice)
perTravelerPricesArray of objects(PerTravelerPrice)
policyDetailsobject(PnrPolicyInfo)

Policy Info applicable for the associated itinerary

Response
application/json
{ "bookingId": "bookingid", "fareBreakDown": { "totalFare": {}, "merchantFee": {}, "airlineFee": {} }, "legPrices": [ {} ], "perTravelerPrices": [ {} ], "policyDetails": { "policies": [], "ruleResultInfos": [] } }

Validate air itinerary (interim)

Request

Validates an itinerary at any interim stage of air booking workflow and allows you to keep track of fare details before proceeding to checkout. Using this endpoint is optional. It requires a searchId and the itineraryId to obtain the latest fare details of the selected itinerary. The travelerType field in this endpoint response currently only accepts ADULT, CHILD and INFANT.

Bodyapplication/jsonrequired
searchIdstringrequired

The unique searchId corresponding to the selected itinerary.

itineraryIdstringrequired

The selected itineraryId which you would like to validate.

curl -i -X POST \
  https://developer.spotnana.com/_mock/openapi/airapi/v2/air/intermediate-revalidate-itinerary \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "searchId": "string",
    "itineraryId": "string"
  }'

Responses

OK

Bodyapplication/json
bookingIdstring

The booking ID for the booking.

Example: "bookingid"
fareBreakDownobject(BookingFareBreakdown)
legPricesArray of objects(LegPrice)
perTravelerPricesArray of objects(PerTravelerPrice)
policyDetailsobject(PnrPolicyInfo)

Policy Info applicable for the associated itinerary

Response
application/json
{ "bookingId": "bookingid", "fareBreakDown": { "totalFare": {}, "merchantFee": {}, "airlineFee": {} }, "legPrices": [ {} ], "perTravelerPrices": [ {} ], "policyDetails": { "policies": [], "ruleResultInfos": [] } }

Create air pnr

Request

Creates a new air booking with the given itinerary

Bodyapplication/jsonrequired
bookingIdstring

The booking ID for which the PNR is being created. This is returned in the revalidate itinerary API response.

Example: "booking-id"
initiateBookingIdstring

Initiate booking id is returned in response to air-initiate-booking API call. This id is required if in case the booking id is not available due to third-party redirection.

Example: "eCfghty567jkHG56DFgh"
preBookAnswersobject(PreBookAnswers)
preSearchAnswersobject(PreSearchAnswers)
postPaymentVerificationInfoPostPaymentVerificationInfo (object) or PostPaymentVerificationInfo (object) or PostPaymentVerificationInfo (object) or PostPaymentVerificationInfo (object) or PostPaymentVerificationInfo (object)(PostPaymentVerificationInfo)
One of:

Wrapper for post stripe verification info object.

isPreAuthApprovalRequiredboolean

Flag to check if the pre-authorization approval is enabled.

Example: false
curl -i -X POST \
  https://developer.spotnana.com/_mock/openapi/airapi/v2/air/create-pnr \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "bookingId": "booking-id",
    "initiateBookingId": "eCfghty567jkHG56DFgh",
    "preBookAnswers": {
      "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": {
                "companyConfig": {}
              },
              "totalNumOptions": 0,
              "options": [
                {}
              ]
            },
            "isRequired": true,
            "isDisabled": true,
            "includeInItinerary": true,
            "customFieldLocations": [
              "POLICY_APPROVAL_EMAIL"
            ],
            "matchConditions": {
              "travelerConditions": {
                "workerTypes": [
                  null
                ],
                "countries": [
                  null
                ],
                "legalEntities": [
                  null
                ],
                "departments": [
                  null
                ],
                "costCenters": [
                  null
                ],
                "offices": [
                  null
                ]
              },
              "travelTypes": [
                "AIR"
              ],
              "travelRegionTypes": [
                "DOMESTIC"
              ],
              "tripUsageTypes": [
                "STANDARD"
              ]
            },
            "questionType": {
              "preSearchQuestionType": "PURPOSE_OF_TRIP",
              "preCheckoutQuestionType": "OOP_REASON_CODE"
            }
          }
        }
      ],
      "preBookQuestionResponseId": "string"
    },
    "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": {
                "companyConfig": {}
              },
              "totalNumOptions": 0,
              "options": [
                {}
              ]
            },
            "isRequired": true,
            "isDisabled": true,
            "includeInItinerary": true,
            "customFieldLocations": [
              "POLICY_APPROVAL_EMAIL"
            ],
            "matchConditions": {
              "travelerConditions": {
                "workerTypes": [
                  null
                ],
                "countries": [
                  null
                ],
                "legalEntities": [
                  null
                ],
                "departments": [
                  null
                ],
                "costCenters": [
                  null
                ],
                "offices": [
                  null
                ]
              },
              "travelTypes": [
                "AIR"
              ],
              "travelRegionTypes": [
                "DOMESTIC"
              ],
              "tripUsageTypes": [
                "STANDARD"
              ]
            },
            "questionType": {
              "preSearchQuestionType": "PURPOSE_OF_TRIP",
              "preCheckoutQuestionType": "OOP_REASON_CODE"
            }
          }
        }
      ],
      "userEntitiesResponseId": "string"
    },
    "postPaymentVerificationInfo": {
      "paymentKey": "string",
      "postStripeVerificationInfo": {
        "paymentMethodId": "pm_1HzKDPI3bT9GUjvoUkRQooN3"
      }
    },
    "isPreAuthApprovalRequired": false
  }'

Responses

OK

Bodyapplication/json
pnrIdstring

Spotnana PNR ID.

sourcePnrIdstring

Source PNR ID

pnrStatusstring

PNR status (for example success, approval pending)

Enum"SUCCESS""APPROVAL_PENDING""CC_VERIFICATION_REQUIRED""PAYMENT_PENDING""CONFIRMATION_PENDING""ERROR"
createPnrApplicationInfoobject

Create PNR application info, will return warning or error if present

Response
application/json
{ "pnrId": "string", "sourcePnrId": "string", "pnrStatus": "SUCCESS", "createPnrApplicationInfo": { "applicationWarning": [] } }

Cancel Air Pnr

Request

Cancel the air pnr and issues applicable refunds

Bodyapplication/jsonrequired
pnrIdstringrequired

The spotnana assigned unique PNR id of the booking.

Example: "1234567819"
optionIdstringrequired

Cancellation option id chosen by the traveler prior to cancelling the booking. The trip->cancellation-details API returns a bunch of options like whether the traveler wants to keep the ticket as unused or get the refunds with applicable penalties.

Example: "OPTION123"
cancellationOverrideobject(CancellationOverride)

Cancellation info override details, like cancellation penalty, waiver code, etc.

curl -i -X POST \
  https://developer.spotnana.com/_mock/openapi/airapi/v2/air/cancel-pnr \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "pnrId": "1234567819",
    "optionId": "OPTION123",
    "cancellationOverride": {
      "waiverCode": "WAV123",
      "tourCode": "TRAC345",
      "newCancellationPenalty": {
        "amount": 510,
        "currencyCode": "GBP",
        "convertedAmount": 715.42,
        "convertedCurrency": "USD",
        "otherCoinage": [
          {
            "coinageCode": "BREX_POINTS",
            "amount": 1000,
            "conversionRate": 0.01,
            "preferredCurrencyConversionRate": 0.01
          }
        ]
      }
    }
  }'

Responses

OK

Bodyapplication/json
sourcePnrIdstring

Source pnr id of the cancellation.

Example: "ABCDEF"
statusstring(CancellationStatus)
  • CANCELLED: PNR is cancelled.
  • AGENT_TASK_CREATED: Agent task is created for the cancellation.
Enum"CANCELLED""AGENT_TASK_CREATED"
Response
application/json
{ "sourcePnrId": "ABCDEF", "status": "CANCELLED" }

Get PNR exchange details

Request

This endpoint gets exchange details of all the tickets present in the given PNR ID of the given trip ID.

Path
pnrIdstringrequired

Spotnana PNR ID.

Example: 6926658168
curl -i -X GET \
  'https://developer.spotnana.com/_mock/openapi/airapi/v2/air/pnrs/{pnrId}/exchange-details' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
pnrIdstringrequired

PNR ID for the booking.

Example: "1234567890"
ticketToExchangeInfosArray of objects(TicketToExchangeInfo)

List of tickets and their exchange info.

Response
application/json
{ "pnrId": "1234567890", "ticketToExchangeInfos": [ {} ] }

Modify Search

Request

Get Air Itineraries available for exchange/modification/deletion against current pnr.

Bodyapplication/jsonrequired
pnrIdstringrequired

The unique spotnana pnr id which needs to be exchanged.

Example: "1213124111"
legsArray of NewLeg (object) or ExistingLeg (object)(Leg)required

The list of all legs (to keep as same, to remove and to be added). In the example shared, if there is a trip from SFO to ANC with one Leg containing a direct flight from mentioned source to destination, and traveller needs to add a visit to Seattle in between changing his trip to now contain two legs SFO->SEA and SEA->ANC, then we would remove the first existing leg(indexed 0) SFO->ANC and add two new legs SFO->SEA and SEA->ANC.

Example: [{"index":0,"remove":true},{"origin":"SFO","destination":"SEA","date":"2022-01-21T17:00"},{"origin":"SEA","destination":"ANC","date":"2022-01-22T17:00"}]
One of:

New leg to be added in the pnr.

legs[].​originstring^[A-Z]{3}$

3 letter IATA airport code for origin

Example: "SFO"
legs[].​destinationstring^[A-Z]{3}$

3 letter IATA airport code for origin

Example: "SEA"
legs[].​dateobject(DateTimeLocal)

Local date and time represented in the ISO 8601 standard.

Example: "2022-01-21T17:00"
filtersArray of objects(Filter)
sortOptionsArray of objects(SortOption)
legSearchParamsobject(LegSearchParams)
preModifySearchAnswersArray of objects(optional Q and A for business management and audit)
curl -i -X POST \
  https://developer.spotnana.com/_mock/openapi/airapi/v2/air/modify-search \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "pnrId": "1213124111",
    "legs": [
      {
        "index": 0,
        "remove": true
      },
      {
        "origin": "SFO",
        "destination": "SEA",
        "date": "2022-01-21T17:00"
      },
      {
        "origin": "SEA",
        "destination": "ANC",
        "date": "2022-01-22T17:00"
      }
    ]
  }'

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

Describes the detailed itinerary information provided in the search response.

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)

Pagination parameters for response.

metadataobject(AirMetadata)

Metadata associated with the air search response.

Response
application/json
{ "searchId": "ChBjZDg3ZjRjZmRmMTFmMWFiEhBjZDg3Z", "itineraryDetails": { "itineraries": [], "flightData": [] }, "paginationParams": { "numResults": 0, "numPages": 0 }, "metadata": { "airlineInfo": [], "applicableAlliances": [], "legBylegPricing": true, "enableFareCategories": [] } }

Modify Book

Request

Book[cancel] new[existing] legs into an existing pnr using the selected rate option from airModifySearch operation.

Bodyapplication/jsonrequired
bookingIdstringrequired

Booking id returned in successful response of air-revalidate-itin api call in the booking flow.

Example: "ChBlMTFmOTVkZTcwZmZjMmI2EhAwZjVkNDhhNGJjNWExZTMw"
tripDataobject(TripData)required

Trip data to book a PNR.

Example: {"tripId":{"id":"9527251668"}}
tripData.​approverEmailstring

Email address of the approver who should receives approval email for the current booking.

tripData.​approverNamestring

Name of the approver.

tripData.​hardApprovalRequiredboolean

Whether the current booking requires hard approval or soft approval. This flag should be used only if valid approver is present.

tripData.​outOfPolicyboolean

If the given booking is out of policy.

tripData.​policyIdstring

Policy Id for which violation is done.

tripData.​policyVersioninteger(int32)

Version of policy.

tripData.​tripIdobject(TripId)required

Id of trip.

Example: {"id":"9527251668"}
tripData.​tripId.​idstringrequired

Id.

Example: "9527251668"
skipTicketingboolean

If this is true, the PNR is not set up for ticketing.

Example: true
postPaymentVerificationInfoPostPaymentVerificationInfo (object) or PostPaymentVerificationInfo (object) or PostPaymentVerificationInfo (object) or PostPaymentVerificationInfo (object) or PostPaymentVerificationInfo (object)(PostPaymentVerificationInfo)
One of:

Wrapper for post stripe verification info object.

curl -i -X POST \
  https://developer.spotnana.com/_mock/openapi/airapi/v2/air/modify-book \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "bookingId": "ChBlMTFmOTVkZTcwZmZjMmI2EhAwZjVkNDhhNGJjNWExZTMw",
    "tripData": {
      "tripId": {
        "id": "9527251668"
      }
    }
  }'

Responses

OK

Bodyapplication/json
pnrNumberstring(Source PNR ID)
Example: "AXKJDF"
pnrStatusstring(PnrStatus)

Status of PNR

Enum"UNKNOWN""INITIATED""CANCELLED""CONFIRMED""GROUP_BOOKING_ON_REQUEST""WAITLISTED""PENDING""AIRLINE_UPGRADE""WAITLIST_CONFIRMED""BOOKING_DENIED_CONTACT_SUPPORT"
Example: "CONFIRMED"
pnrIdstring

Spotnana PNR ID

Example: "1213124111"
paymentVerificationInfoPaymentVerificationInfo (object) or PaymentVerificationInfo (object) or PaymentVerificationInfo (object) or PaymentVerificationInfo (object)(PaymentVerificationInfo)
One of:

Wrapper for stripe verification Info.

Response
application/json
{ "pnrNumber": "AXKJDF", "pnrStatus": "CONFIRMED", "pnrId": "1213124111" }

Edit PNR

Request

Edit specific traveler information in an existing PNR. This API allows you to edit and modify Special Service Requests (SSR), seat selection, loyalty number, ancillaries, redress number, Known Traveler Number (KTN), check-in preferences, and Other Service Information (OSI).

Path
pnrIdstringrequired

PNR ID created by Spotnana for the booking.

Example: 1213124111
Bodyapplication/jsonrequired
pnrRemarksArray of objects(PnrNoteRemark)

Note remarks to be added for pnr at time of pnr update

pnrIdstringrequired

PNR ID created by Spotnana for the booking.

Example: "1234567890"
travelerInfoArray of objects(TravelerUpdateInfo)required

Traveler information.

Example: [{"traveler":{"travelerId":"1","travelerInfo":{"userOrgId":{"userId":{"id":"8ec7ef81-e314-4b2a-ad62-9157262aeb11"},"organizationId":{"id":"5ec7ef81-e314-4b2a-ad62-9157262aeb11"},"organizationAgencyId":{"id":"2ec7ef81-e314-4b2a-ad62-9157262aeb11"},"tmcInfo":{"id":{"id":"2ec7ef81-e314-4b2a-ad62-9157262aeb11"},"primaryServiceProviderTmc":{"tmcId":{"id":"2ec7ef81-e314-4b2a-ad62-9157262aeb11"}},"secondaryServiceProviderTmcs":[]},"tmcBasicInfo":{"contractingTmc":{"id":{"id":"2ec7ef81-e314-4b2a-ad62-9157262aeb11"}},"bookingTmc":{"id":{"id":"2ec7ef81-e314-4b2a-ad62-9157262aeb11"}}}}}},"seats":[{"flightIndex":1,"seatNumber":"10A"}],"specialServiceRequests":[{"flightIndex":1,"code":"SPML","info":"Special meal without egg."}],"updateTypes":["SPECIAL_SERVICE_REQUEST","SEAT"]}]
travelerInfo[].​travelerobject(AirTravelerInfo)required

Traveler details

travelerInfo[].​traveler.​travelerIdstring

Unique ID for traveler

Example: "1"
travelerInfo[].​traveler.​adhocTravelerInfoTravelerInfoResponse (object) or TravelerInfoResponse (object)(TravelerInfoResponse)
One of:

Wrapper over UserId object to be used as an identifier in a oneOf case

travelerInfo[].​traveler.​travelerInfoobject(Traveler)Deprecated

Traveler details.

travelerInfo[].​seatsArray of objects(SeatDetail)
travelerInfo[].​otherAncillariesArray of objects(OtherAncillaryDetail)
travelerInfo[].​specialServiceRequestsArray of objects(SpecialServiceRequestInfo)

List of all Special Service Requests (SSR) for the traveler.

travelerInfo[].​updateTypesArray of stringsuniquerequired
Items Enum"LOYALTY_INFO""REDRESS_NUMBER""KNOWN_TRAVELER_NUMBER""SEAT""SPECIAL_SERVICE_REQUEST""OTHER_ANCILLARY""UNDO_CHECK_IN""CHECK_IN"
seatMapResponseIdstring

The seatMapResponseId generated using the Get flight seat map API. This field is only required if the seat selection is being changed for the traveler.

Example: "8bc4ec0e1839aabc"
preSearchAnswersobject

Contains a list of custom fields or pre search answers.

pnrUpdateTypesArray of strings
Items Value"OTHER_SERVICE_INFO"
Example: ["OTHER_SERVICE_INFO"]
otherServiceInformationItemsArray of objects(OtherServiceInformation)

The list of all Other Service Information (OSI) to be included in the PNR.

bookingPaymentDetailsobject(BookingPaymentDetails)

Payment details used for booking.

postPaymentVerificationInfoPostPaymentVerificationInfo (object) or PostPaymentVerificationInfo (object) or PostPaymentVerificationInfo (object) or PostPaymentVerificationInfo (object) or PostPaymentVerificationInfo (object)(PostPaymentVerificationInfo)
One of:

Wrapper for post stripe verification info object.

curl -i -X POST \
  'https://developer.spotnana.com/_mock/openapi/airapi/v2/air/pnrs/{pnrId}/update' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "pnrId": "1234567890",
    "seatMapResponseId": "8bc4ec0e1839aabc",
    "pnrUpdateTypes": [
      "OTHER_SERVICE_INFO"
    ],
    "travelerInfo": [
      {
        "traveler": {
          "travelerId": "1",
          "travelerInfo": {
            "userOrgId": {
              "userId": {
                "id": "8ec7ef81-e314-4b2a-ad62-9157262aeb11"
              },
              "organizationId": {
                "id": "5ec7ef81-e314-4b2a-ad62-9157262aeb11"
              },
              "organizationAgencyId": {
                "id": "2ec7ef81-e314-4b2a-ad62-9157262aeb11"
              },
              "tmcInfo": {
                "id": {
                  "id": "2ec7ef81-e314-4b2a-ad62-9157262aeb11"
                },
                "primaryServiceProviderTmc": {
                  "tmcId": {
                    "id": "2ec7ef81-e314-4b2a-ad62-9157262aeb11"
                  }
                },
                "secondaryServiceProviderTmcs": []
              },
              "tmcBasicInfo": {
                "contractingTmc": {
                  "id": {
                    "id": "2ec7ef81-e314-4b2a-ad62-9157262aeb11"
                  }
                },
                "bookingTmc": {
                  "id": {
                    "id": "2ec7ef81-e314-4b2a-ad62-9157262aeb11"
                  }
                }
              }
            }
          }
        },
        "seats": [
          {
            "flightIndex": 1,
            "seatNumber": "10A"
          }
        ],
        "specialServiceRequests": [
          {
            "flightIndex": 1,
            "code": "SPML",
            "info": "Special meal without egg."
          }
        ],
        "updateTypes": [
          "SPECIAL_SERVICE_REQUEST",
          "SEAT"
        ]
      }
    ]
  }'

Responses

Success

Bodyapplication/json
paymentVerificationInfoPaymentVerificationInfo (object) or PaymentVerificationInfo (object) or PaymentVerificationInfo (object) or PaymentVerificationInfo (object)(PaymentVerificationInfo)
One of:

Wrapper for stripe verification Info.

Response
application/json
{ "paymentVerificationInfo": { "gatewayIdentifier": {}, "paymentKey": "string", "stripeVerificationInfo": {} } }

Get Special Service Requests (SSR)

Request

Returns the list of all Special Service Requests (SSR) supported by Spotnana. This API doesn't require a request payload or a query parameter. You can use this endpoint anytime during the air booking or exchange workflow to view the list of SSRs currently supported by Spotnana.

curl -i -X GET \
  https://developer.spotnana.com/_mock/openapi/airapi/v2/air/special-service-requests \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
specialServiceRequestsArray of objects(SpecialServiceRequest)
Response
application/json
{ "specialServiceRequests": [ {} ] }

Get Special Service Requests (SSR) for a Category

Request

Returns the list of Special Service Requests (SSR) for a selected category. Every category type can contain multiple service requests. For example, the category: MEAL includes service requests such as a vegetarian meal, baby/infant meal, gluten free meal, and so on. These service requests are displayed as subCategory fields within the category: MEAL. To learn more about a selected category such as its subCategory values, category code, and other relevant information, run this API using the category type as the query parameter.

Query
categorystringrequired

The category type of a Special Service Request (SSR).

Enum"BASSINET""SPECIAL_ASSISTANCE_WHEELCHAIR""BAGGAGE""UNACCOMPANIED_MINOR""PETS""MEET_AND_ASSIST""OTHERS""MEAL""SPECIAL_ASSISTANCE_DISABILITY"
Example: category=SPECIAL_ASSISTANCE_WHEELCHAIR
curl -i -X GET \
  'https://developer.spotnana.com/_mock/openapi/airapi/v2/air/special-service-requests/categories?category=SPECIAL_ASSISTANCE_WHEELCHAIR' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
specialServiceRequestsArray of objects(SpecialServiceRequest)
Response
application/json
{ "specialServiceRequests": [ {} ] }

Returns the Air Raw Fare Rules for a Segment or Pnr

Request

Bodyapplication/jsonrequired
searchIdstring

The unique ID (identifying the current workflow) returned by the backend in the air search results response (AirSearchResponse.searchId) of the previous leg. If set, the rateOptionId and userId must also be specified.

rateOptionIdstring

The unique ID identifying the selected flights in the previous leg's response.

pnrIdstring

The unique Spotnana PNR ID against which flights are booked.

Example: "1213124111"
userIdstring(uuid)

Unique ID of the user.

Example: "4974a66b-7493-4f41-908c-58ba81093947"
curl -i -X POST \
  https://developer.spotnana.com/_mock/openapi/airapi/v2/air/fare-rules/fetch \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "searchId": "string",
    "rateOptionId": "string",
    "pnrId": "1213124111",
    "userId": "4974a66b-7493-4f41-908c-58ba81093947"
  }'

Responses

OK

Bodyapplication/json
legRuleInfosArray of objects(LegRuleInfo)
Response
application/json
{ "legRuleInfos": [ {} ] }

Get unused credits for a traveler

Request

Returns a list of unused credits associated with a traveler along with details such as the PNR ID, trip ID, airline details, credit expiry date, and the source of booking (e.g., NDC). Travelers can redeem unused credit for future bookings with the same airline where the credit was earned.

Bodyapplication/jsonrequired
travelerInfoAirRequestTravelerInfo (object) or AirRequestTravelerInfo (object)(AirRequestTravelerInfo)required
One of:

Wrapper over UserId object to be used as an identifier in a oneOf case

travelerInfo.​userIdobject(UserId)

User identifier

curl -i -X POST \
  https://developer.spotnana.com/_mock/openapi/airapi/v3/air/fetch-traveler-unused-credits \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "travelerInfo": {
      "userId": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
      }
    }
  }'

Responses

OK

Bodyapplication/json
unusedCreditInfoArray of objects(UnusedCreditInfo)
Response
application/json
{ "unusedCreditInfo": [ {} ] }

Loyalty Programs

Operations