APIs to perform search, checkout and book an air pnr
Information about each of the travelers in the search request. This information is required.
Type of passenger
The list of all legs for which search results need to be returned.
3 letter IATA airport or metropolitan code for the origin
The code of a city used to identify a set of airports associated with it. For example, NYC or LON.
The airport code identifying a specific airport. For example, JFK or EWR.
3 letter IATA airport or metropolitan code for the destination
The code of a city used to identify a set of airports associated with it. For example, NYC or LON.
The airport code identifying a specific airport. For example, JFK or EWR.
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" } } }'
{ "searchId": "ChBjZDg3ZjRjZmRmMTFmMWFiEhBjZDg3Z", "itineraryDetails": { "itineraries": [ … ], "flightData": [ … ] }, "paginationParams": { "numResults": 0, "numPages": 0 }, "metadata": { "airlineInfo": [ … ], "applicableAlliances": [ … ], "legBylegPricing": true, "enableFareCategories": [ … ] } }
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" }'
{ "searchId": "ChBjZDg3ZjRjZmRmMTFmMWFiEhBjZDg3Z", "itineraryDetails": { "itineraries": [ … ], "flightData": [ … ] }, "paginationParams": { "numResults": 0, "numPages": 0 }, "metadata": { "airlineInfo": [ … ], "applicableAlliances": [ … ], "legBylegPricing": true, "enableFareCategories": [ … ] } }
The searchId returned in the corresponding air search API response.
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" }'
OK
Describes an itinerary containing legs and flights.
Details of the list of flights present in the leg.
The unique ID for this flight in the itinerary.
Wrapper of flight reference to be used in oneOf.
Flight cabin
The airline's one-letter code for the associated fare
The availability of seats on this flight
The account code is used to get corporate negotiated price
CO2 emission details for the flight.
The amenities associated with the flight.
Details of passenger(s) information for this leg.
Unique identifier for the traveler in this response
Fare amount including base fare and tax.
Fare amount including base fare and tax.
Money object containing details such as the amount, the currency code, and the converted amount.
The numeric value for the amount of money.
The 3-letter currency code for the money amount (defined using ISO 4217 standard).
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).
The 3-letter currency code for the converted currency (defined using ISO 4217 standard).
Money object containing details such as the amount, the currency code, and the converted amount.
The numeric value for the amount of money.
The 3-letter currency code for the money amount (defined using ISO 4217 standard).
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).
The 3-letter currency code for the converted currency (defined using ISO 4217 standard).
Fare category of this leg. It describes the cabin class for this flight.
The brand code assigned by the airline corresponding brandName.
The airline code for the airline which is validating this booking and orchestrating the payment.
Type of booked fare
Unique identifier for the traveler in this response
Type of passenger
The detailed information about the fare (including tax and merchant fee details).
Fare amount including base fare and tax.
Money object containing details such as the amount, the currency code, and the converted amount.
Details about of the tax amount in totalFare field.
The detailed information about the fare (including tax and merchant fee details).
The ticket issuance type for a given itinerary, whether single or multiple
The payment method types applicable to the itinerary.
{ "itinerary": { "itineraryId": "kjdUjak8hX", "legs": [ … ], "travelers": [ … ], "fareInfo": { … }, "ticketType": "SINGLE", "policyInfos": { … }, "posInfo": [ … ], "publicFare": { … }, "allowedFopRules": [ … ], "fareAttributes": { … } } }
curl -i -X GET \ 'https://developer.spotnana.com/_mock/openapi/airapi/v2/air/airlines-info?includeInactive=true' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
Search id returned in the corresponding air search API response.
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" }'
{ "checkoutResponseId": "ChBjZDg3ZjRjZmRmMTFmMWFiEhBjZDg3Z", "baggageInfo": { "baggageSelectionGroups": [ … ] }, "ancillaries": [ { … } ], "mandatoryCheckoutParams": [ { … } ], "airlineCardFees": [ { … } ] }
Information about the travelers on the itinerary.
Type of passenger
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" } ] } ] } ] }'
{ "seatMapResponseId": "seat1234", "travelerSeatMaps": [ { … } ], "seatMaps": [ { … } ] }
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.
The set of unique response ids associated with initiate booking workflow.
Booking contact for the itinerary. Airlines send all update and change information to booking contact as well.
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 }'
{ "initiateBookingResponseId": "CuwDQ2hCa09HVTJZemsyWVRFNFlUUm", "paymentSourcePrePaymentInformation": [ { … } ] }
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" } }'
{ "bookingId": "bookingid", "fareBreakDown": { "totalFare": { … }, "merchantFee": { … }, "airlineFee": { … } }, "legPrices": [ { … } ], "perTravelerPrices": [ { … } ], "policyDetails": { "policies": [ … ], "ruleResultInfos": [ … ] } }
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
.
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" }'
{ "bookingId": "bookingid", "fareBreakDown": { "totalFare": { … }, "merchantFee": { … }, "airlineFee": { … } }, "legPrices": [ { … } ], "perTravelerPrices": [ { … } ], "policyDetails": { "policies": [ … ], "ruleResultInfos": [ … ] } }
The booking ID for which the PNR is being created. This is returned in the revalidate itinerary API response.
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.
Wrapper for post stripe verification info object.
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 }'
{ "pnrId": "string", "sourcePnrId": "string", "pnrStatus": "SUCCESS", "createPnrApplicationInfo": { "applicationWarning": [ … ] } }
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.
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 } ] } } }'
{ "sourcePnrId": "ABCDEF", "status": "CANCELLED" }
curl -i -X GET \ 'https://developer.spotnana.com/_mock/openapi/airapi/v2/air/pnrs/{pnrId}/exchange-details' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "pnrId": "1234567890", "ticketToExchangeInfos": [ { … } ] }
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.
New leg to be added in the pnr.
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" } ] }'
{ "searchId": "ChBjZDg3ZjRjZmRmMTFmMWFiEhBjZDg3Z", "itineraryDetails": { "itineraries": [ … ], "flightData": [ … ] }, "paginationParams": { "numResults": 0, "numPages": 0 }, "metadata": { "airlineInfo": [ … ], "applicableAlliances": [ … ], "legBylegPricing": true, "enableFareCategories": [ … ] } }
Booking id returned in successful response of air-revalidate-itin api call in the booking flow.
Trip data to book a PNR.
Email address of the approver who should receives approval email for the current booking.
Whether the current booking requires hard approval or soft approval. This flag should be used only if valid approver is present.
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" } } }'
{ "pnrNumber": "AXKJDF", "pnrStatus": "CONFIRMED", "pnrId": "1213124111" }
Traveler information.
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.
The list of all Other Service Information (OSI) to be included in the PNR.
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" ] } ] }'
{ "paymentVerificationInfo": { "gatewayIdentifier": { … }, "paymentKey": "string", "stripeVerificationInfo": { … } } }
curl -i -X GET \ https://developer.spotnana.com/_mock/openapi/airapi/v2/air/special-service-requests \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "specialServiceRequests": [ { … } ] }
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.
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>'
{ "specialServiceRequests": [ { … } ] }
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.
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" }'
{ "legRuleInfos": [ { … } ] }
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" } } }'
{ "unusedCreditInfo": [ { … } ] }