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

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": [] } }

Modify Book

Request

Book[cancel] new[existing] legs into an existing pnr using the selected rate option from airModifySearch operation.

Bodyapplication/jsonrequired
bookingIdstringrequired

Booking id returned in successful response of air-revalidate-itin api call in the booking flow.

Example: "ChBlMTFmOTVkZTcwZmZjMmI2EhAwZjVkNDhhNGJjNWExZTMw"
tripDataobject(TripData)required

Trip data to book a PNR.

Example: {"tripId":{"id":"9527251668"}}
tripData.​approverEmailstring

Email address of the approver who should receives approval email for the current booking.

tripData.​approverNamestring

Name of the approver.

tripData.​hardApprovalRequiredboolean

Whether the current booking requires hard approval or soft approval. This flag should be used only if valid approver is present.

tripData.​outOfPolicyboolean

If the given booking is out of policy.

tripData.​policyIdstring

Policy Id for which violation is done.

tripData.​policyVersioninteger(int32)

Version of policy.

tripData.​tripIdobject(TripId)required

Id of the trip.

Example: {"id":"9527251668"}
tripData.​tripId.​idstringrequired

Id.

Example: "9527251668"
skipTicketingboolean

If this is true, the PNR is not set up for ticketing.

Example: true
postPaymentVerificationInfoPostPaymentVerificationInfo (object) or PostPaymentVerificationInfo (object) or PostPaymentVerificationInfo (object) or PostPaymentVerificationInfo (object) or PostPaymentVerificationInfo (object)(PostPaymentVerificationInfo)
One of:

Wrapper for post stripe verification info object.

customFieldV3ResponsesArray of objects(CustomFieldV3Response)

Custom field responses for the booking.

curl -i -X POST \
  https://apis.spotnana.com/v2/air/modify-book \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "bookingId": "ChBlMTFmOTVkZTcwZmZjMmI2EhAwZjVkNDhhNGJjNWExZTMw",
    "tripData": {
      "tripId": {
        "id": "9527251668"
      }
    }
  }'

Responses

OK

Bodyapplication/json
pnrNumberstring(Source PNR ID)
Example: "AXKJDF"
pnrStatusstring(PnrStatus)

Status of PNR

Enum"UNKNOWN""INITIATED""CANCELLED""CONFIRMED""GROUP_BOOKING_ON_REQUEST""WAITLISTED""PENDING""AIRLINE_UPGRADE""WAITLIST_CONFIRMED""BOOKING_DENIED_CONTACT_SUPPORT"
Example: "CONFIRMED"
pnrIdstring

Spotnana PNR ID

Example: "1213124111"
paymentVerificationInfoPaymentVerificationInfo (object) or PaymentVerificationInfo (object) or PaymentVerificationInfo (object) or PaymentVerificationInfo (object)(PaymentVerificationInfo)
One of:

Wrapper for stripe verification Info.

Response
application/json
{ "pnrNumber": "AXKJDF", "pnrStatus": "CONFIRMED", "pnrId": "1213124111" }

Loyalty Programs

Operations