APIs to perform search, checkout and book an air pnr
- Get PNR exchange details
Air API (v2)
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.
Custom field responses for the booking.
Payment information sent after the verification of payment method.
- 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,
"otherCoinageMetadata": {
"metadataType": "FlightPassPaymentMetadata",
"flightPassMetadata": {
"flightPassNumber": "FP123456789"
}
}
}
]
}
},
"customFieldV3Responses": [
{
"fieldId": "84922011-b03d-4966-bc95-c5b49bc2e342",
"fieldName": "string",
"armId": "0fd508db-63ff-4444-bfb1-b89c43061433",
"includeLocations": [
"APPROVAL_EMAILS"
],
"selectedOptions": [
{
"name": "string",
"translatedName": "string",
"description": "string",
"translatedDescription": "string",
"additionalUserInput": "string",
"additionalInfos": [
"string"
],
"additionalInfoConfigs": [
{
"type": "VARIABLE",
"name": "LLF"
}
]
}
]
}
],
"postPaymentVerificationInfo": {
"paymentKey": "string",
"postStripeVerificationInfo": {
"paymentMethodId": "pm_1HzKDPI3bT9GUjvoUkRQooN3"
}
},
"bookingPaymentDetails": {
"bookingTravelerPaymentDetails": [
{
"selectedFormOfPayments": [
{
"paymentItems": [
{
"fareComponent": []
}
],
"selectedPaymentSources": [
{}
]
}
]
}
]
}
}'OK
- CANCELLED: PNR is cancelled.
- AGENT_TASK_CREATED: Agent task is created for the cancellation.
Information about automatic processing that was performed during cancellation
Optional warning message if processing is taking longer than expected
{ "sourcePnrId": "ABCDEF", "status": "CANCELLED", "automaticCancellationInfo": { "segmentsCancelled": true, "automaticRefundSuccessful": true, "refundedTicketNumbers": [ … ], "automaticProcessingMessage": "Refunded tickets: 1234567890123" }, "processingWarning": "Cancellation is successful but update is taking longer than expected", "paymentVerificationInfo": { "gatewayIdentifier": { … }, "paymentKey": "string", "stripeVerificationInfo": { … } } }
- 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": [ { … } ] }
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.
- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v2/air/modify-search
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/airapi/v2/air/modify-search
- curl
- JavaScript
- Node.js
- Python
curl -i -X POST \
https://api-ext-sboxmeta.partners.spotnana.com/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": [ … ], "isExpressSearch": true, "availableConnectingAirports": [ … ] } }