GET /lowest-fare-offers v1

GET /Lowest-Fare-Offers v1

The LowestFareOffers endpoint provides the available flight offers with the lowest fare based on a certain period (Overall, Months or Days). 

HOW TO USE?

The POST method should be used to start a search for lowest fare offers.
Use case flow can then be followed by the consumer by requesting the GET methods (for LowestFareOffers & AvailableOffers) supplied as HATEOAS link in the POST response body.

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

HEADERS TO USE FOR REQUEST

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)


GET

GET https://api.klm.com/opendata/offers/v1/lowest-fare-offers{?d,dateInterval ,displayPriceContent }

QUERY PARAMETERS

Name

Type

Multiplicity

Description

d

String

1

Encoded request body as a result of preceding POST request.

dateInterval

String

0-1

String representing a date interval. Format is: "YYYY-MM-DD/YYYY-MM-DD".

Date interval describes the range of dates that should be used to find lowest fares for the other Connection.

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 lowest fare offers request.
..connections Array of Objects  1-6 A chronologically ordered list of connections the lowest fare offer applies to.
….dateInterval String 0-1 String representing a date interval. Format is: "YYYY-MM-DD/YYYY-MM-DD".

Date interval describes the range of dates for the Connection that the lowest fare applies to.
Conditional: Must be supplied for at least 1 connection.
..departureDate String 0-1 String representing a departure date. Format is: "YYYY-MM-DD ".

Possible departure date where the fare can applied.
….origin Object 0-1 The origin station of the connection (matching the request).
......city Object 0-1 The city of origin (matching the request).
….....code String 1 IATA location code of the city.
……..name String 1 Name of the station in the language as specified in ContentLanguage header.
......airport Object 0-1 The airport of origin (matching the request).
….....code String 1 IATA location code of the airport.
……..name String 1 Name of the station in the language as specified in ContentLanguage header.
….destination Object 0-1 The destination station of the connection (matching the request).
......city Object 0-1 The city of destination (matching the request).
….....code String 1 IATA location code of the city.
……..name String 1 Name of the station in the language as specified in ContentLanguage header.
......airport Object 0-1 The airport of destination (matching the request).
….....code String 1 IATA location code of the airport.
……..name String 1 Name of the station in the language as specified in ContentLanguage header.
….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.
……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   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   1 IATA airline code.
……….name String 1 Name of the carrier in the language as specified in ContentLanguage header.
..flightProducts Object 1 Flight product for the itinerary.
….type String 1 Indicates the type of response (matching requested type).
OVERALL, MONTH or DAY.
….calculationTimestamp DateTime 0-1 Timestamp of fare calculation. Only specified when fare comes from static cache of TripPlanner.
….passengers Array of Objects 1-n List of passengers associated to the product (matching requested passenger count).
…...id String 1 Integer to uniquely identify a passenger within a product.
…...type String 1 Type of the passenger.
ADT, C14, CHD, INF, YCD or YTH
….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.
…...accuracy Integer 1 The accuracy of the prices supplied. Accuracy is a percentage of the fares for a specific O&D delivered through TripPlanner (GetData or GetBudgetSearch) that match (within a certain range) the fares delivered through FlexPricer (Upsell).
..….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, INF, YCD or YTH
…..…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. Can be linked to discountCode in input or to promotion configured in PromoTool. All segments must match the promo fare basis.
……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 segment as selected.
…...code String 1 Fare basis code for the segment.
....negotiatedFare Boolean 0-1 It is set to TRUE only if the fare is a Negotiated one.
..commercialCabin String 1 CommercialCabin applicable for the fare for the connection
ECONOMY or PREMIUM or BUSINESS or FIRST
….price Object 1 Price per connection
..….displayPrice Number 1 Price to be displayed. Applies to a single adult.

Depending on the displayType it includes taxes and/or fees.
Depending of displayPriceContent it is for one adult or for all pax rounded
..….totalPrice Number 1 Total price per connection. 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.
…...accuracy Integer 1 The accuracy of the prices supplied. Accuracy is a percentage of the fares for a specific O&D delivered through TripPlanner (GetData or GetBudgetSearch) that match (within a certain range) the fares delivered through FlexPricer (Upsell).
..….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. The amount of the surcharge is applied only for the Inbound. No surcharge is applied on the outbound.
…..…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 and per connection
…..…passengerType String 1 Type of the passenger.
ADT, C14, CHD, INF, YCD or YTH
…..…fare Number   The fare price as applicable for the Passenger Type.
…..…taxes Number 1 The taxes price as applicable for the Passenger Type.
…..…penalty Number 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.
….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
warning Object 0-99 Warning details
.code Number
1 Functional warning codes (1000-1999)
.name String 1 Name of the warning. Ex: OFA/FUNCTIONAL/INVALID_VALUE
- logger/Typology/name
.description String 1 Description of the warning
..errorinInputPath String 1 Description of the input Path where the warning occurred
errors Object 0-1 Error details
.code Number
1

Functional error codes (1000-1999)
Technical error codes (2000-2999)
Internal error codes (3000-3999)

.name String 1

Name of the error . Ex :OFA/TECHNICAL/INVALID_VALUE - logger/Typology/name

.description String 1

Description of the error

..errorinInputhPath String

1

Description of the input Path where the error occurred

HTTP STATUS CODE

HTTP status

Type

200 OK

400

FOA/DISCOUNT_CODE_INELIGIBLE

500

FOA/INTERNAL_SERVER_ERROR/UNSUPPORTED_CAPABILITY

500

INTERNAL_SERVER_ERROR

SAMPLE RESPONSE

{
    "itineraries": [
        {
            "connections": [
                {
                    "departureDate": "2018-12-03",
                    "destination": {
                        "airport": {
                            "name": "Cote D'Azur Airport",
                            "city": {
                                "name": "Nice",
                                "code": "NCE"
                            },
                            "code": "NCE"
                        }
                    },
                    "origin": {
                        "airport": {
                            "name": "Schiphol",
                            "city": {
                                "name": "Amsterdam",
                                "code": "AMS"
                            },
                            "code": "AMS"
                        }
                    }
                },
                {
                    "departureDate": "2018-12-18",
                    "destination": {
                        "airport": {
                            "name": "Schiphol",
                            "city": {
                                "name": "Amsterdam",
                                "code": "AMS"
                            },
                            "code": "AMS"
                        }
                    },
                    "origin": {
                        "airport": {
                            "name": "Cote D'Azur Airport",
                            "city": {
                                "name": "Nice",
                                "code": "NCE"
                            },
                            "code": "NCE"
                        }
                    }
                }
            ],
            "flightProducts": [
                {
                    "passengers": [
                        {
                            "id": 1,
                            "type": "ADT"
                        },
                        {
                            "id": 2,
                            "type": "ADT"
                        },
                        {
                            "id": 3,
                            "type": "CHD"
                        },
                        {
                            "id": 4,
                            "type": "INF"
                        }
                    ],
                    "price": {
                        "displayPrice": 98.02,
                        "totalPrice": 310.06,
                        "surcharges": [
                            {
                                "code": "BookingFee",
                                "amount": 10
                            }
                        ],
                        "accuracy": 66.73,
                        "pricePerPassengerTypes": [
                            {
                                "passengerType": "ADT",
                                "fare": 53,
                                "taxes": 45.02
                            },
                            {
                                "passengerType": "CHD",
                                "fare": 53,
                                "taxes": 45.02
                            },
                            {
                                "passengerType": "INF",
                                "fare": 6,
                                "taxes": 0
                            }
                        ],
                        "flexibilityWaiver": false,
                        "currency": "EUR",
                        "displayType": "TAX"
                    },
                    "connections": [
                        {
                            "numberOfSeatsAvailable": 0,
                            "fareBasis": {
                                "code": "GSRNL"
                            },
                            "price": {
                                "displayPrice": 49.01,
                                "totalPrice": 150.03,
                                "accuracy": 66.73,
                                "pricePerPassengerTypes": [
                                    {
                                        "passengerType": "ADT",
                                        "fare": 26.5,
                                        "taxes": 22.51
                                    },
                                    {
                                        "passengerType": "CHD",
                                        "fare": 26.5,
                                        "taxes": 22.51
                                    },
                                    {
                                        "passengerType": "INF",
                                        "fare": 3,
                                        "taxes": 0
                                    }
                                ],
                                "flexibilityWaiver": false,
                                "currency": "EUR",
                                "displayType": "TAX"
                            },
                            "segments": [
                                {
                                    "cabin": {
                                        "class": "M"
                                    },
                                    "sellingClass": {
                                        "code": "G"
                                    }
                                }
                            ]
                        },
                        {
                            "numberOfSeatsAvailable": 0,
                            "fareBasis": {
                                "code": "GSRNL"
                            },
                            "price": {
                                "displayPrice": 49.01,
                                "totalPrice": 160.03,
                                "surcharges": [
                                    {
                                        "code": "BookingFee",
                                        "amount": 10
                                    }
                                ],
                                "accuracy": 66.73,
                                "pricePerPassengerTypes": [
                                    {
                                        "passengerType": "ADT",
                                        "fare": 26.5,
                                        "taxes": 22.51
                                    },
                                    {
                                        "passengerType": "CHD",
                                        "fare": 26.5,
                                        "taxes": 22.51
                                    },
                                    {
                                        "passengerType": "INF",
                                        "fare": 3,
                                        "taxes": 0
                                    }
                                ],
                                "flexibilityWaiver": false,
                                "currency": "EUR",
                                "displayType": "TAX"
                            },
                            "segments": [
                                {
                                    "cabin": {
                                        "class": "M"
                                    },
                                    "sellingClass": {
                                        "code": "G"
                                    }
                                }
                            ]
                        }
                    ],
                    "type": "OVERALL"
                }
            ]
        }
    ],
    "disclaimer": {
        "displayPriceText": "Lowest available fares, incl. taxes and surcharges, excl. EUR 10 booking fee (credit card surcharge may apply). Prices shown may vary depending on fare availability. You will see the exact total price when selecting your payment method.",
        "totalPriceText": "Taxes, surcharges and booking fee of EUR 10 included (credit card surcharge may apply). Prices shown may vary depending on fare availability. You will see the exact total price when selecting your payment method."
    }
}

Docs Navigation