APIs to perform search, checkout and book an air pnr
curl -i -X POST \
https://apis.spotnana.com/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,
"specialServiceRequests": [
{
"indexes": {
"legIndex": 1,
"flightIndex": 2
},
"flightIndex": 0,
"code": "WCHC",
"info": "Special meal without egg."
}
]
}
],
"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://apis.spotnana.com/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.
Flag to check if the pre-authorization approval is enabled.
Custom field responses for the booking.
curl -i -X POST \
https://apis.spotnana.com/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,
"customFieldV3Responses": [
{
"fieldId": "84922011-b03d-4966-bc95-c5b49bc2e342",
"fieldName": "string",
"armId": "0fd508db-63ff-4444-bfb1-b89c43061433",
"selectedOptions": [
{
"name": "string",
"description": "string",
"additionalUserInput": "string",
"additionalInfos": [
"string"
],
"additionalInfoConfigs": [
{
"type": "VARIABLE",
"name": "PUBLISHED_FARE"
}
]
}
]
}
]
}'
{ "pnrId": "string", "sourcePnrId": "string", "pnrStatus": "SUCCESS", "createPnrApplicationInfo": { "applicationWarning": [ … ] } }