Air API (v2)

Download OpenAPI specification:Download

Air

APIs to perform search, checkout and book an air pnr

Get air itineraries

Get Air Itineraries available for the given search parameters

SecurityBearer
Request
Request Body schema: application/json
required
Array of objects (TravelerSearchInfo)

Information about each of the travelers in the search request. This information is required.

required
Array of objects (SearchLeg)

The list of all legs for which search results need to be returned.

Array of objects (Filter)

The list of filters to be applied in the search request.

Array of objects (SortOption)

The sort options to be used for ordering the itineraries.

object (LegSearchParams)
object (CorporateInfo)

Corporate data to be collected during the search request workflow.

Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

post/v2/air/search-flights
Request samples
application/json
{
  • "travelers": [
    ],
  • "legs": [
    ],
  • "filters": [
    ],
  • "sortOptions": [
    ],
  • "legSearchParams": {
    },
  • "corporateInfo": {
    }
}
Response samples
application/json
{
  • "searchId": "ChBjZDg3ZjRjZmRmMTFmMWFiEhBjZDg3Z",
  • "itineraryDetails": {
    },
  • "paginationParams": {
    },
  • "metadata": {
    }
}

Get flight attributes

Get Flight attributes, amenities and fare rules for the given search response id. Returns the full air search response along with attribute details.

SecurityBearer
Request
Request Body schema: application/json
searchId
required
string

The unique ID for the search response for which the attributes are being requested.

Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

post/v2/air/flight-attributes
Request samples
application/json
{
  • "searchId": "ChBjZDg3ZjRjZmRmMTFmMWFiEhBjZDg3Z"
}
Response samples
application/json
{
  • "searchId": "ChBjZDg3ZjRjZmRmMTFmMWFiEhBjZDg3Z",
  • "itineraryDetails": {
    },
  • "paginationParams": {
    },
  • "metadata": {
    }
}

Get selected itinerary

Get the selected itinerary for the traveler in the search and checkout flow.

SecurityBearer
Request
Request Body schema: application/json
searchId
required
string

The searchId returned in the corresponding air search API response.

itineraryId
required
string

The itineraryId of the itinerary selected by the user in the corresponding air search API response.

Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

post/v2/air/selected-itinerary
Request samples
application/json
{
  • "searchId": "ChBjZDg3ZjRjZmRmMTFm",
  • "itineraryId": "IthBjZDg3ZjRjZmRmMTFm"
}
Response samples
application/json
{
  • "itinerary": {
    }
}

Get flight checkout details

Get the flight checkout details associated with the selected itinerary.

SecurityBearer
Request
Request Body schema: application/json
searchId
required
string

Search id returned in the corresponding air search API response.

itineraryId
required
string

Value of the itineraryId for the itinerary selected by the user in the corresponding air search API response.

Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

post/v2/air/flight-checkout
Request samples
application/json
{
  • "searchId": "ChBjZDg3ZjRjZmRmMTFm",
  • "itineraryId": "IthBjZDg3ZjRjZmRmMTFm"
}
Response samples
application/json
{
  • "checkoutResponseId": "ChBjZDg3ZjRjZmRmMTFmMWFiEhBjZDg3Z",
  • "baggageInfo": {
    },
  • "ancillaries": [
    ],
  • "mandatoryCheckoutParams": [
    ],
  • "airlineCardFees": [
    ]
}

Get flight seat map

Get seat map for the flights in the given itinerary.

SecurityBearer
Request
Request Body schema: application/json
required
AirItineraryIdWrapper (object) or PnrItineraryWrapper (object) (SeatMapItinerary)
required
Array of objects (TravelerSeatInfo)

Information about the travelers on the itinerary.

Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

post/v2/air/seat-map
Request samples
application/json
{
  • "itinerary": {
    },
  • "travelerInfos": [
    ]
}
Response samples
application/json
{
  • "seatMapResponseId": "seat1234",
  • "travelerSeatMaps": [
    ],
  • "seatMaps": [
    ]
}

Initiate booking

Initiates a new air booking for the trip. The identityDocs field supports the following traveler identity documents: Passport, National ID, Known Traveler Number (KTN), redress number, and immigration documents. The traveler can choose one among the list of identity documents available and provide its information during checkout.

SecurityBearer
Request
Request Body schema: application/json
object (InitiateBookingWorkflowIds)

The set of unique response ids associated with initiate booking workflow.

Array of objects (AirBookTravelerInfo)
Array of objects (BookingCharge)
object (BookingContact)

Booking contact for the itinerary. Airlines send all update and change information to booking contact as well.

useExistingBooking
boolean

Use existing booking if it exists to initiate

Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

post/v2/air/initiate-booking
Request samples
application/json
{
  • "initiateBookingWorkflowIds": {
    },
  • "travelers": [
    ],
  • "bookingCharges": [
    ],
  • "bookingContact": {
    },
  • "useExistingBooking": true
}
Response samples
application/json
{
  • "initiateBookingResponseId": "CuwDQ2hCa09HVTJZemsyWVRFNFlUUm",
  • "paymentSourcePrePaymentInformation": [
    ]
}

Validate air itinerary

Validates the air itinerary for availability and pricing

SecurityBearer
Request
Request Body schema: application/json
object (WorkflowIds)

The set of unique response ids associated with the booking workflow.

object (TripId)

The trip ID with which this booking will be associated.

Array of objects (AirBookTravelerInfo)
Array of objects (BookingCharge)
object (PromotionCode)

Promo code applied to the order (optional)

Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

post/v2/air/revalidate-itinerary
Request samples
application/json
{
  • "workflowIds": {
    },
  • "tripId": {
    },
  • "travelers": [
    ],
  • "bookingCharges": [
    ],
  • "promotionCode": {
    }
}
Response samples
application/json
{
  • "bookingId": "bookingid",
  • "fareBreakDown": {
    },
  • "legPrices": [
    ],
  • "perTravelerPrices": [
    ],
  • "policyDetails": {
    }
}

Validate air itinerary (interim)

Validates an itinerary at any interim stage of air booking workflow and allows you to keep track of fare details before proceeding to checkout. Using this endpoint is optional. It requires a searchId and the itineraryId to obtain the latest fare details of the selected itinerary. The travelerType field in this endpoint response currently only accepts ADULT, CHILD and INFANT.

SecurityBearer
Request
Request Body schema: application/json
searchId
required
string

The unique searchId corresponding to the selected itinerary.

itineraryId
required
string

The selected itineraryId which you would like to validate.

Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

post/v2/air/intermediate-revalidate-itinerary
Request samples
application/json
{
  • "searchId": "string",
  • "itineraryId": "string"
}
Response samples
application/json
{
  • "bookingId": "bookingid",
  • "fareBreakDown": {
    },
  • "legPrices": [
    ],
  • "perTravelerPrices": [
    ],
  • "policyDetails": {
    }
}

Create air pnr

Creates a new air booking with the given itinerary

SecurityBearer
Request
Request Body schema: application/json
bookingId
string

The booking ID for which the PNR is being created. This is returned in the revalidate itinerary API response.

initiateBookingId
string

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.

object (PreBookAnswers)
object (PreSearchAnswers)
PostStripeVerificationInfoWrapper (object) or PostUrlBasedVerificationInfoWrapper (object) or AmadeusCheckoutVerificationInfoWrapper (object) or ThreeDSecure2PostVerificationInfoWrapper (object) (PostPaymentVerificationInfo)
Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

post/v2/air/create-pnr
Request samples
application/json
{
  • "bookingId": "booking-id",
  • "initiateBookingId": "eCfghty567jkHG56DFgh",
  • "preBookAnswers": {
    },
  • "preSearchAnswers": {
    },
  • "postPaymentVerificationInfo": {
    }
}
Response samples
application/json
{
  • "pnrId": "string",
  • "sourcePnrId": "string",
  • "pnrStatus": "SUCCESS"
}

Cancel Air Pnr

Cancel the air pnr and issues applicable refunds

SecurityBearer
Request
Request Body schema: application/json
pnrId
required
string

The spotnana assigned unique PNR id of the booking.

optionId
required
string

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.

object (CancellationOverride)

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

Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

post/v2/air/cancel-pnr
Request samples
application/json
{
  • "pnrId": "1234567819",
  • "optionId": "OPTION123",
  • "cancellationOverride": {
    }
}
Response samples
application/json
{
  • "sourcePnrId": "ABCDEF",
  • "status": "CANCELLED"
}

Get PNR exchange details

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

SecurityBearer
Request
path Parameters
pnrId
required
string

Spotnana PNR ID.

Example: 6926658168
Responses
200

OK

401

Unauthorized

404

The specified resource was not found.

get/v2/air/pnrs/{pnrId}/exchange-details
Request samples
Response samples
application/json
{
  • "pnrId": "1234567890",
  • "ticketToExchangeInfos": [
    ]
}

Modify Search

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

SecurityBearer
Request
Request Body schema: application/json
pnrId
required
string

The unique spotnana pnr id which needs to be exchanged.

required
Array of NewLeg (object) or ExistingLeg (object) (Leg)

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.

Array of objects (Filter)
Array of objects (SortOption)
object (LegSearchParams)
Array of objects (optional Q and A for business management and audit)
Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

post/v2/air/modify-search
Request samples
application/json
{
  • "pnrId": "1213124111",
  • "legs": [
    ]
}
Response samples
application/json
{
  • "searchId": "ChBjZDg3ZjRjZmRmMTFmMWFiEhBjZDg3Z",
  • "itineraryDetails": {
    },
  • "paginationParams": {
    },
  • "metadata": {
    }
}

Modify Book

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

SecurityBearer
Request
Request Body schema: application/json
bookingId
required
string

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

required
object (TripData)

Trip data to book a PNR.

skipTicketing
boolean

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

PostStripeVerificationInfoWrapper (object) or PostUrlBasedVerificationInfoWrapper (object) or AmadeusCheckoutVerificationInfoWrapper (object) or ThreeDSecure2PostVerificationInfoWrapper (object) (PostPaymentVerificationInfo)
Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

post/v2/air/modify-book
Request samples
application/json
{
  • "bookingId": "ChBlMTFmOTVkZTcwZmZjMmI2EhAwZjVkNDhhNGJjNWExZTMw",
  • "tripData": {
    }
}
Response samples
application/json
{
  • "pnrNumber": "AXKJDF",
  • "pnrStatus": "CONFIRMED",
  • "pnrId": "1213124111"
}

Edit PNR

Edit specific traveler information in an existing PNR. This API allows you to edit and modify Special Service Requests (SSR), seat selection, loyalty number, ancillaries, redress number, Known Traveler Number (KTN), check-in preferences, and Other Service Information (OSI).

SecurityBearer
Request
path Parameters
pnrId
required
string

PNR ID created by Spotnana for the booking.

Example: 1213124111
Request Body schema: application/json
Array of objects (PnrNoteRemark)

Note remarks to be added for pnr at time of pnr update

pnrId
required
string

PNR ID created by Spotnana for the booking.

required
Array of objects (TravelerUpdateInfo)

Traveler information.

seatMapResponseId
string

The seatMapResponseId generated using the Get flight seat map API. This field is only required if the seat selection is being changed for the traveler.

object

Contains a list of custom fields or pre search answers.

pnrUpdateTypes
Array of strings
Items Value: "OTHER_SERVICE_INFO"
Array of objects (OtherServiceInformation)

The list of all Other Service Information (OSI) to be included in the PNR.

object (BookingPaymentDetails)

Payment details used for booking.

PostStripeVerificationInfoWrapper (object) or PostUrlBasedVerificationInfoWrapper (object) or AmadeusCheckoutVerificationInfoWrapper (object) or ThreeDSecure2PostVerificationInfoWrapper (object) (PostPaymentVerificationInfo)
Responses
200

Success

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

post/v2/air/pnrs/{pnrId}/update
Request samples
application/json
{
  • "pnrId": "1234567890",
  • "seatMapResponseId": "8bc4ec0e1839aabc",
  • "pnrUpdateTypes": [
    ],
  • "travelerInfo": [
    ]
}
Response samples
application/json
{
  • "paymentVerificationInfo": {
    }
}

Get Special Service Requests (SSR)

Returns the list of all Special Service Requests (SSR) supported by Spotnana. This API doesn't require a request payload or a query parameter. You can use this endpoint anytime during the air booking or exchange workflow to view the list of SSRs currently supported by Spotnana.

SecurityBearer
Responses
200

OK

401

Unauthorized

403

Forbidden

get/v2/air/special-service-requests
Request samples
Response samples
application/json
{
  • "specialServiceRequests": [
    ]
}

Get Special Service Requests (SSR) for a Category

Returns the list of Special Service Requests (SSR) for a selected category. Every category type can contain multiple service requests. For example, the category: MEAL includes service requests such as a vegetarian meal, baby/infant meal, gluten free meal, and so on. These service requests are displayed as subCategory fields within the category: MEAL. To learn more about a selected category such as its subCategory values, category code, and other relevant information, run this API using the category type as the query parameter.

SecurityBearer
Request
query Parameters
category
required
string

The category type of a Special Service Request (SSR).

Enum: "BASSINET" "SPECIAL_ASSISTANCE_WHEELCHAIR" "BAGGAGE" "UNACCOMPANIED_MINOR" "PETS" "MEET_AND_ASSIST" "OTHERS" "MEAL"
Example: category=SPECIAL_ASSISTANCE_WHEELCHAIR
Responses
200

OK

401

Unauthorized

403

Forbidden

get/v2/air/special-service-requests/categories
Request samples
Response samples
application/json
{
  • "specialServiceRequests": [
    ]
}

Loyalty Programs

Get Loyalty Programs (Air)

Returns all the active loyalty programs for the requested marketing and/or operating airlines.

SecurityBearer
Request
query Parameters
marketingAirline
string

IATA code of the marketing airline for which the loyalty programs need to be fetched.

Example: marketingAirline=AA
operatingAirline
string

IATA code of the operating airline for which the loyalty programs need to be fetched.

Example: operatingAirline=BA
travelerId
string

User ID of the traveler.

Example: travelerId=4974a66b-7493-4f41-908c-58ba81093947
travelArrangerId
string

User ID of the travel arranger.

Example: travelArrangerId=4974a66b-7493-4f41-908c-58ba81093947
Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

get/v2/air/loyalty-programs
Request samples
Response samples
application/json
{
  • "loyaltyPrograms": [
    ],
  • "applicableLoyalties": [
    ]
}
Copyright © 2020-2024 Spotnana Technology, Inc.