APIs to perform search, checkout and book an air pnr
- Cancel Air Pnr
Air API (v2)
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.
Payment information sent after the verification of payment method.
Flag to check if the pre-authorization approval is enabled.
Custom field responses for the booking.
- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v2/air/create-pnr
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/airapi/v2/air/create-pnr
- curl
- JavaScript
- Node.js
- Python
curl -i -X POST \
https://api-ext-sboxmeta.partners.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",
"includeLocations": [
"APPROVAL_EMAILS"
],
"selectedOptions": [
{
"name": "string",
"description": "string",
"additionalUserInput": "string",
"additionalInfos": [
"string"
],
"additionalInfoConfigs": [
{
"type": "VARIABLE",
"name": "LLF"
}
]
}
]
}
]
}'{ "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.
- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v2/air/cancel-pnr
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/airapi/v2/air/cancel-pnr
- curl
- JavaScript
- Node.js
- Python
curl -i -X POST \
https://api-ext-sboxmeta.partners.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",
"includeLocations": [
"APPROVAL_EMAILS"
],
"selectedOptions": [
{
"name": "string",
"description": "string",
"additionalUserInput": "string",
"additionalInfos": [
"string"
],
"additionalInfoConfigs": [
{
"type": "VARIABLE",
"name": "LLF"
}
]
}
]
}
]
}'{ "sourcePnrId": "ABCDEF", "status": "CANCELLED", "automaticCancellationInfo": { "segmentsCancelled": true, "automaticRefundSuccessful": true, "refundedTicketNumbers": [ … ], "automaticProcessingMessage": "Refunded tickets: 1234567890123" } }
- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v2/air/pnrs/{pnrId}/exchange-details
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/airapi/v2/air/pnrs/{pnrId}/exchange-details
- curl
- JavaScript
- Node.js
- Python
curl -i -X GET \
https://api-ext-sboxmeta.partners.spotnana.com/v2/air/pnrs/6926658168/exchange-details \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'{ "pnrId": "1234567890", "ticketToExchangeInfos": [ { … } ] }