APIs to perform search, checkout and book an air pnr
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"
]
}
]
}
]
}'
{ "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.
Cancellation info override details, like cancellation penalty, waiver code, etc.
curl -i -X POST \
https://apis.spotnana.com/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
}
]
}
},
"customFieldV3Responses": [
{
"fieldId": "84922011-b03d-4966-bc95-c5b49bc2e342",
"fieldName": "string",
"armId": "0fd508db-63ff-4444-bfb1-b89c43061433",
"selectedOptions": [
{
"name": "string",
"description": "string",
"additionalUserInput": "string",
"additionalInfos": [
"string"
]
}
]
}
]
}'
{ "sourcePnrId": "ABCDEF", "status": "CANCELLED" }
curl -i -X GET \
https://apis.spotnana.com/v2/air/pnrs/6926658168/exchange-details \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "pnrId": "1234567890", "ticketToExchangeInfos": [ { … } ] }