POST /upsell-offers v2

POST /upsell-offers v2

The UpsellOffers endpoint provides the upsell offers for a selected flight product. 

HOW TO USE?

Use case flow can be followed by the consumer by requesting the GET method supplied as HATEOAS link in the response body of AvailableOffers.

                                    (Or)

The POST method should be used to get upsell offers for the given selected flight.

HEADERS TO USE FOR REQUESTS

Parameter

Value

Authorization 

Bearer {{token}}

Content-Type 

application/json

Accept 

application/hal+json;charset=utf8

Accept-Language 

{{language}}-{{country}}

AFKL-TRAVEL-Host 

KL or AF

AFKL-TRAVEL-Country 

Country (overrides Accept-Language country)

POST

POST https://api.klm.com/opendata/flight-products/upsell-offers

POST PARAMETERS

Name

Type

Multiplicity

Description

cabinClass

String

1

Code for requested cabin class.

ECONOMY or BUSINESS

fallbackMode

Enumeration

0-1

Fallback mode to find matching flights:

- NONE (default): No fallback applied

- FAREFAMILY: If fareFamilyCode supplied does not give any results, result with different FareFamily will be returned.

- ANY: If fareBasis/sellingClasses supplied does not give any results, result with different fareBasis/sellingClasses will be returned. If that does not give any results, result with different FareFamily will be returned.

shortest

Boolean

0-1

Indicates whether shortest route should be found. Otherwise lowest fare is found. When shortest=true, includeCarriers cannot be supplied.

currency

String

0-1

Indicates the currency to be used for prices in response.

Three letter currency code according to ISO 4217.

This can be used to override the setting for the default currency of the country of the origin airport (also known as Point of Sale).

includeCarriers

Array of Strings

0-n

List of marketing carriers to include in the request. When shortest=true, includeCarriers cannot be supplied

discountCode

String

0-1

code for IDC discount.

displayPriceContent

Enumeration

0-1

Content of displayPrice in response.

- If empty : displayPrice is the price for 1adt regarding point of sell

- ALL_PAX_ROUNDED : displayPrice is the price for all pax regarding point of sell rounded up

minimumAccuracy

Integer

0-1

Threshold for required accuracy. Overrides default threshold. When accuracy is below supplied threshold, backend will switch to more accurate source.

NB Currently TripPlanner GetDayData is fast, less accurate source and Amadeus FlexPricerUpsell is more accurate source.

passengerCount

Object

1

The specification of the passengers for which the offer is requested.

..ADULT

Integer

0-1

Number of adults. 16 years and older.

..CHILD

Integer

0-1

Number of children. 2-11 years.

..INFANT

Integer 

0-1

Number of infants. Under 2 years.

..YOUNG_ADULT

Integer

0-1

Number of young adults. 12-15 years.

focusedConnection

Integer

0-1

The index to the connection to retrieve (starting from 0)

requestedConnections

Array of Objects

1-6

A chronologically ordered list of connections for which the available offers is requested.

..departureDate

String

0-1

String representing the departure date requested for the Connection

..fareBasis

String

0-1

The fare basis of the connection.

Conditional: Must not be supplied when origin & destination are supplied. Can be supplied when segments are supplied. In case it is supplied, the selling class must also be supplied in segments.

..fareFamilyCode

String

0-1

The fare family of the connection.

Conditional: Must not be supplied when origin & destination are supplied. Can be supplied when segments are supplied. In case it is supplied, the fare basis must also be supplied.

..segments

Array of Objects

1-6

A chronologically ordered list of segments that describe the Connection requested.

Conditional: Either origin & destination are supplied or segments are supplied.

….origin

Object

0-1

The origin airport of the connection.

…...code

String

1

IATA location code of the airport.

….destination

Object

0-1

The destination airport of the connection.

…...code

String

1

IATA location code of the airport.

….departureDateTime

DateTime

1

DateTime of departure of the segment flight. It is specified as local time at origin of the segment.

….marketingFlightNumber

String

1

The marketing flight number for the segment.

Max of four digits, when less than 3 then prefix with zeroes up till 3 digits. For example: 006, 022, 1001.

….marketingCarrier

Object

1

IATA airline code for the marketing carrier of the flight.

….sellingClass

Object

0-1

Selling Class of the selected flight

ERROR CODES

HTTP status

Type

500

INTERNAL_SERVER_ERROR

400

FOA/DISCOUNT_CODE_INELIGIBLE

Docs Navigation