Air API (v2)

Download OpenAPI description
Languages
Servers
Staging URL
https://apis.spotnana.com/
Spotnana mock server
https://developer.spotnana.com/_mock/openapi/airapi/

Air

APIs to perform search, checkout and book an air pnr

Operations

Cancel Air Pnr

Request

Cancel the air pnr and issues applicable refunds

Bodyapplication/jsonrequired
pnrIdstringrequired

The spotnana assigned unique PNR id of the booking.

Example: "1234567819"
optionIdstringrequired

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.

Example: "OPTION123"
cancellationOverrideobject(CancellationOverride)

Cancellation info override details, like cancellation penalty, waiver code, etc.

customFieldV3ResponsesArray of objects(CustomFieldV3Response)

Custom field responses for the booking.

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"
            ]
          }
        ]
      }
    ]
  }'

Responses

OK

Bodyapplication/json
sourcePnrIdstring

Source pnr id of the cancellation.

Example: "ABCDEF"
statusstring(CancellationStatus)
  • CANCELLED: PNR is cancelled.
  • AGENT_TASK_CREATED: Agent task is created for the cancellation.
Enum"CANCELLED""AGENT_TASK_CREATED"
Response
application/json
{ "sourcePnrId": "ABCDEF", "status": "CANCELLED" }

Get PNR exchange details

Request

This endpoint gets exchange details of all the tickets present in the given PNR ID of the given trip ID.

Path
pnrIdstringrequired

Spotnana PNR ID.

Example: 6926658168
curl -i -X GET \
  https://apis.spotnana.com/v2/air/pnrs/6926658168/exchange-details \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
pnrIdstringrequired

PNR ID for the booking.

Example: "1234567890"
ticketToExchangeInfosArray of objects(TicketToExchangeInfo)

List of tickets and their exchange info.

Response
application/json
{ "pnrId": "1234567890", "ticketToExchangeInfos": [ {} ] }

Modify Search

Request

Get Air Itineraries available for exchange/modification/deletion against current pnr.

Bodyapplication/jsonrequired
pnrIdstringrequired

The unique spotnana pnr id which needs to be exchanged.

Example: "1213124111"
legsArray of NewLeg (object) or ExistingLeg (object)(Leg)required

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.

Example: [{"index":0,"remove":true},{"origin":"SFO","destination":"SEA","date":"2022-01-21T17:00"},{"origin":"SEA","destination":"ANC","date":"2022-01-22T17:00"}]
One of:

New leg to be added in the pnr.

legs[].​originstring^[A-Z]{3}$

3 letter IATA airport code for origin

Example: "SFO"
legs[].​destinationstring^[A-Z]{3}$

3 letter IATA airport code for origin

Example: "SEA"
legs[].​dateobject(DateTimeLocal)

Local date and time in ISO 8601 format.

Example: "2022-01-21T17:00"
filtersArray of objects(Filter)
sortOptionsArray of objects(SortOption)
legSearchParamsobject(LegSearchParams)
preModifySearchAnswersArray of objects(optional Q and A for business management and audit)
curl -i -X POST \
  https://apis.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"
      }
    ]
  }'

Responses

OK

Bodyapplication/json
searchIdstringrequired

The unique ID for this search response. This value must be passed on in the subsequent booking API calls.

Example: "ChBjZDg3ZjRjZmRmMTFmMWFiEhBjZDg3Z"
itineraryDetailsobject(ItineraryInfo)required

The list of itineraries in the search response.

itineraryDetails.​itinerariesArray of objects(AirItin)
itineraryDetails.​flightDataArray of objects(FlightCommon)

The set of flights and their details that are contained in this response.

paginationParamsobject(PaginationResponseParams)

Pagination parameters for response.

metadataobject(AirMetadata)

Metadata associated with the air search response.

Response
application/json
{ "searchId": "ChBjZDg3ZjRjZmRmMTFmMWFiEhBjZDg3Z", "itineraryDetails": { "itineraries": [], "flightData": [] }, "paginationParams": { "numResults": 0, "numPages": 0 }, "metadata": { "airlineInfo": [], "applicableAlliances": [], "legBylegPricing": true, "enableFareCategories": [] } }

Loyalty Programs

Operations