GET /available-offers v2

GET /available-offers v2

The AvailableOffers endpoint provides the available flights with the lowest price based on certain (set of) date(s). 

HOW TO USE

The POST method should be used to start a search for available offers.

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

The GET method returns the same response data structure as the POST method.

HEADERS TO USE FOR REQUESTS

Parameter

Value

Authorization 

Bearer {{token}}

Content-Type 

application/json

Accept 

application/hal+json;profile=com.afklm.flightoffers.available-offers.v2;charset=utf8

Accept-Language 

{{language}}-{{country}}

AFKL-TRAVEL-Host 

KL or AF

AFKL-TRAVEL-Country 

Country (overrides Accept-Language country)

GET

GET https://api.klm.com/opendata/flightoffers/available-offers{?d, displayPriceContent}

QUERY PARAMETERS

Name

Type

Multiplicity

Description

d

String

1

Encoded request body as a result of preceding POST request.

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

RESPONSE PARAMETERS

Name

Type

Multiplicity

Description

disclaimer

Object

1

The texts to be shown as legal disclaimers regarding fare, tax, fee, credit card surcharges etc.

..displayPriceText

String

1

The disclaimer text to be shown when display price is shown to the customer.

..totalPriceText

String

1

The disclaimer text to be shown when total price is shown to the customer.

itineraries

Array of Objects

0-n

List of itineraries matching the available offers request.

..locationSpecificRemarks

Array of Objects

0-n

List of location specific remarks that apply to the connection.

….remarkCode

String

1

Code of the location specific remark.

….remarkText

String

1

Text of the remark in the language as specified in ContentLanguage header.

..connections

Array of Objects

1-6

A chronologically ordered list of connections the available offer applies to.

….duration

Integer

0-1

Total duration of the Connection in minutes.

….segments

Array of Objects

0-6

A chronologically ordered list of segments that describe the Connection.

Conditional: Either matching the request or specified when expand-suggested-flights=true.

……departureDateTime

DateTime

1

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

……arrivalDateTime

DateTime

1

DateTime of arrival of the segment flight. It is specified as local time at destination of the segment.

……origin

Object

0-1

The origin airport of the connection.

….....code

String

1

IATA location code of the airport.

……..name

String

1

Name of the station in the language as specified in ContentLanguage header.

……..city

Object

0-1

The city the airport is located in.

….......code

String

1

IATA location code of the city.

……….name

String

1

Name of the station in the language as specified in ContentLanguage header.

……stopsAt

Object

0-1

Airport where the flight has a technical stop.

….....code

String

1

IATA location code of the airport.

……..name

String

1

Name of the station in the language as specified in ContentLanguage header.

……..city

Object

0-1

The city the airport is located in.

….......code

String

1

IATA location code of the city.

……….name

String

1

Name of the station in the language as specified in ContentLanguage header.

……destination

Object

0-1

The destination airport of the connection.

….....code

String

1

IATA location code of the airport.

……..name

String

1

Name of the station in the language as specified in ContentLanguage header.

……..city

Object

0-1

The city the airport is located in.

….......code

String

1

IATA location code of the city.

……….name

String

1

Name of the station in the language as specified in ContentLanguage header.

……marketingFlight

Object

1

Describes the marketing flight for the segment.

……..number

String

1

Flight number.

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

……..carrier

Object

1

Marketing carrier of the flight.

……….code

String

1

IATA airline code.

……….name

String

1

Name of the carrier in the language as specified in ContentLanguage header.

……..flightOnTimeStatistics

Object

0-1

Specifies the flight on time statistics for the marketing flight (only applicable for PoS BR).

……….percentageCanceled

Integer

1

Percentage of flights canceled

……….percentageDelayed30-60

Integer

1

Percentage of flights delayed 30-60 minutes

……….percentageDelayed60plus

Integer

1

Percentage of flights delayed more than 60 minutes

……….referenceDate

Date

1

Reference date for the statistics.

……..operatingFlight

Object

1

Describes the operating flight for the segment.

……….singleCabin

Boolean

1

Indicates whether or not a single cabin (Economy) is available on the flight.

……….number

String

1

Flight number.

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

……….carrier

Object

1

Operating carrier of the flight.

……….ACVcode

String

1

Three digits, field is present when data available only

…………code

String

1

IATA airline code.

…………name

String

1

Name of the carrier in the language as specified in ContentLanguage header.

……….cabin

Object

1

Cabin that the flight for the selected fare is operated in.

…………class

String

1

Class code for the cabin.

……….equipmentType

Object

1

Operating carrier of the flight.

…………code

String

1

Equipment type code.

…………name

String

1

Name of the equipment type in the language as specified in ContentLanguage header.

…………information

uri

0-1

Represents a URI to page where details about the equipment type can be found.

……….ratingStatistics

Object

1

Ratings statistics for the flight.

…………averageRating

String

1

Average rating of the flight.

…………numberOfRatings

String

1

Numbers of ratings available for the flight.

…………ratingCategory

Object

5

Category (1-5) for ratings

…………..level

Integer

1

Level (1-5) of the rating category.

…………..count

Integer

1

Number of ratings in the category.

..flightProducts

Object

1

Flight product for the itinerary.

…._links

Object

1

Container for all HATEOAS links

……ticketConditions

HATEOAS link

1

Represents a HATEOAS link to request the ticket conditions for the product.

Supports the use case where a consumer selects a flight product and gets conditions that apply.

……upsellOffers

HATEOAS link

1

Represents a HATEOAS link to request the upsell offers for the product.

Supports the use case where a consumer selects a flight product and gets upsell options that apply.

……taxBreakdown

HATEOAS link

1

Represents a HATEOAS link to request the tax breakdown for the product.

Supports the use case where a consumer selects a flight product and gets tax breakdown that apply.

……relatedProducts

HATEOAS link

1

Represents a HATEOAS link to request the related products (time to think) for the product.

Supports the use case where a consumer selects a flight product and gets related products that apply.

……shoppingCart

HATEOAS link

1

Represents a HATEOAS link to request to proceed to checkout for the selected flight product. A shopping cart is created with the selected flight product in it.

Supports the use case where a consumer selects a flight product and wants to order it.

….passengers

Array of Objects

1-n

List of passengers associated to the product (matching requested passenger count).

…...id

Integer

1

Integer to uniquely identify a passenger within a product.

…...type

String

1

Type of the passenger.

ADT, C14, CHD or INF

….price

Object

1

Price specification for the product.

..….displayPrice

Number

1

Price to be displayed. Applies to a single adult.

Depending on the displayType it includes taxes and/or fees.

..….totalPrice

Number

1

Total price. Price for all passengers including taxes and fees.

…...currency

String

1

The currency used for prices in response.

Three letter currency code according to ISO 4217.

..….displayType

String

0-1

Indicates the rules used for the display price.

TAX, FARE or FEE

…...dynamicWaiver

Boolean

0-1

Indicates whether a dynamic waiver applies to rebooking the ticket. Only applies to Rebooking a ticket.

…...flexibilityPenaltyWaiver

Boolean

0-1

Indicates whether a penalty waiver applies to rebooking the ticket (because the customer has bought flexibility). Only applies to Rebooking a ticket.

……surcharges

Object

0-n

Surcharges applicable per PNR.

Conditional: Surcharge applies either to passenger or to PNR.

…..…code

String

1

Code of the surcharge. E.g. to indicate it is a booking fee.

…..…amount

String

1

Amount applicable to the Surcharge.

…...pricePerPassengerTypes

Array of Objects

1-4

Price specification per passenger type.

…..…passengerType

String

1

Type of the passenger.

ADT, C14, CHD or INF

…..…fare

Number

1

The fare price as applicable for the Passenger Type.

…..…taxes

Number

1

The taxes price as applicable for the Passenger Type.

…..…penalty

Number

0-1

The penalty price as applicable for the Passenger Type. Only applies to Rebooking a ticket.

…..…surcharges

Object

0-n

Surcharges applicable per passenger.

Conditional: Surcharge applies either to passenger or to PNR.

…..…..code

String

1

Code of the surcharge. e.g. to indicate it is a booking fee.

……....amount

Number

1

Amount applicable to the Surcharge.

..connections

Array of Objects

1-6

A chronologically ordered list of connections the lowest fare offer applies to.

….numberOfSeatsAvailable

Integer

0-1

The number of seats available for the lowest fare for this connection.

….promotion

Object

0-1

Applicable promotion.

……id

Integer

1

Identification of the promotion.

……title

String

1

Title of the promotion in the language as specified in ContentLanguage header.

….fareBasis

Object

1

Fare basis applicable to the connection as selected.

…...code

String

1

Fare basis code for the connection.

….segments

Array of Objects

0-6

A chronologically ordered list of segments that describe the Connection.

Conditional: Either matching the request or specified when expand-suggested-flights=true.

……cabin

Object

1

Cabin for the segment

……..class

String

1

Cabin code.

Can be:

  • M == Economy
  • C == Business
  • W == Premium Economy
  • F == First (La Premiere)

……sellingClass

Object

1

Selling class for the segment

……..code

String

1

Selling class code

ERROR CODES

HTTP status

Type

500

INTERNAL_SERVER_ERROR

400

FOA/DISCOUNT_CODE_INELIGIBLE

500

FOA/INTERNAL_SERVER_ERROR/UNSUPPORTED_CAPABILITY

Docs Navigation