POST /available-offers/all v1

POST /available-Offers/all v1

The availableOffers/all endpoint provides the available flights with the lowest price based on requested dates : outbound + inbound flights (in contrary of available-Offers where only outbound or inbound flights are returned)

HOW TO USE

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

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.airfranceklm.com/opendata/offers/v1/available-offers/all

QUERY PARAMETERS

n/a

POST PARAMETERS

Level Name Type Multiplicity Description
1 commercialCabins  List of string 1 Code for requested commercialCabins
Cannot be empty
Can contain : ALL
1 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).
1 displayPriceContent Enumeration 0-1

Content of displayPrice in response.

- If empty : displayPrice is the price for 1adt, not rounding, following display rules from Generic Admi Tool

Possible values: ALL_PAX_ROUNDED, ALL_PAX

- ALL_PAX_ROUNDED : displayPrice is the price for all pax, rounded to superior integer, following display rules from Generic Admi Tool

- ALL_PAX : displayPrice is the price for all pax, not rounded, following display rules from Generic Admi Tool

1 bookingFlow String 0.1 Can contain LEISURE, CORPORATE
1 fareOption String 0.1

Can contain CORSICA, FAMILY

Option in order to set particular fares

1 passengers Object 0-1

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

For passengers details, it is the one to be used.

2 id Integer 1 Contain the Id of the passenger
2 type String 1 Can contain one of the following passenger types : ADT,CHD, INF, C14,YTH, YCD, B12, B13, B14, B15.
2 birthDate Object 0-1 Contain the birthdate of the passenger type
2 minAge Integer 0-1 Contain the minimum age of the passenger type
2 maxAge Integer 0-1 Contain the maximum age of the passenger type
1 requestedConnections Array of Objects    1-6 A chronologically ordered list of connections for which the available offers are requested.
2 departureDate String 0-1 String representing the departure date requested for the Connection
2 commercialCabin String 0-1 Code for requested commercialCabin
ECONOMY or PREMIUM or BUSINESS or FIRST.
If the bound has already been selected for the current connection, then fill this parameter with the selected commercialCabin.
2 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

If the bound has already been selected for the current connection, then fill this parameter with the information of the selected outbound.

2 origin Object 0-1 The origin station of the connection.
Conditional: Either origin & destination are supplied or segments are supplied.
3 city Object 0-1 The city of origin.
Conditional: Either city or airport must be supplied.
4 code String 1 IATA location code of the city.
3 airport Object 0-1 The airport of origin.
Conditional: Either city or airport must be supplied.
4 code String 1 IATA location code of the airport.
2 destination Object 0-1 The destination station of the connection.
Conditional: Either origin & destination are supplied or segments are supplied.
3 city Object 0-1 The city of destination.
Conditional: Either city or airport must be supplied.
4 code String 1 IATA location code of the city.
3 airport Object 0-1 The airport of destination.
Conditional: Either city or airport must be supplied.
4 code String 1 IATA location code of the airport.
2 segments Array of Objects   0-6 A chronologically ordered list of segments that describe the Connection requested.
Conditional: 1. Either origin & destination are supplied or segments are supplied. 2. : If a bound has already been selected, then a segment must be provided (example: inbound query, the outbound has been selected)
3 origin Object 0-1 The origin airport of the connection.
4 code String 1 IATA location code of the airport.
3 destination Object 0-1 The destination airport of the connection. 
4 code String 1 IATA location code of the airport.
3 departureDateTime DateTime 0.1

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

Conditional: to be set only for Outbound, when you are searching for AVailable Inbound 

3 marketingFlightNumber     String 0.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.

Conditional: to be set only for Outbound, when you are searching for Available Inbound

3 marketingCarrier String 0.1

IATA airline code for the marketing carrier of the flight.

Conditional: to be set only for Outbound, when you are searching for Available Inbound

3 operatingCarrier String 0.1

IATA airline code for the operating carrier of the flight.

Conditional: to be set only for Outbound, when you are searching for Available Inbound

 

RESPONSE PARAMETERS

Level Name Type Multiplicity Description
1

disclaimer

Object

1

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

2

displayPriceText

String

0-1

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

2

totalPriceText

String

0-1

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

2 fareMilesText String 0-1 The disclaimer text to be shown when price in Miles is shown to the customer.
1

itineraries

Array of Objects

1-n

List of itineraries matching the available offers request.

2

locationSpecificRemarks

Array of Objects

0-n

List of location specific remarks that apply to the connection.

3

remarkCode

String

1

Code of the location specific remark.

3

remarkText

String

1

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

2

connections

Array of Objects

1-6

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

3

duration

Integer

0-1

Total duration of the Connection in minutes.

3

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.

4

departureDateTime

DateTime

1

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

4

arrivalDateTime

DateTime

1

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

4

highestPriority

Boolean

1

Flag to define if the considered segment has the highest priority over the other segment(s) of the connection. The segment with the highest priority is set to True, other is(are) set to False.
NB currently computed from Haul type.

4 transferTime Integer 0.1 The time transfer for t the stops. 
4 dateVariation Integer 1 The date Variation from a segment to another  
4 flightDuration Integer 1 The duration of the flight
4 overnightLabel String 0-1 Label concerning the Overnight information
4

origin

Object

0-1

The origin airport of the connection.

5

code

String

1

IATA location code of the airport.

5

name

String

1

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

5

city

Object

0-1

The city the airport is located in.

6

code

String

1

IATA location code of the city.

6

name

String

1

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

4

stopsAt

Object

0-1

Airport where the flight has a technical stop. 

5

code

String

1

IATA location code of the airport.

5

name

String

1

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

5

city

Object

0-1

The city the airport is located in.

6

code

String

1

IATA location code of the city.

6

name

String

1

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

4

destination

Object

0-1

The destination airport of the connection. 

5

code

String

1

IATA location code of the airport.

5

name

String

1

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

5

city

Object

0-1

The city the airport is located in.

6

code

String

1

IATA location code of the city.

6

name

String

1

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

4

marketingFlight

Object

1

Describes the marketing flight for the segment.

5

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.

5

carrier

Object

1

Marketing carrier of the flight.

6

code

String

1

IATA airline code.

6

name

String

1

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

5

flightOnTime

Object

0-1

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

6

cancellationPercentage

Integer

1

Percentage of flights canceled

6

halfHourDelayPercentage

Integer

1

Percentage of flights delayed 30-60 minutes

6

hourDelayPercentage

Integer

1

Percentage of flights delayed more than 60 minutes

6

referenceDate

Date

1

Reference date for the statistics.

5

operatingFlight

Object

1

Describes the operating flight for the segment.

6

carrier

Object

1

Operating carrier of the flight.

7

code

String

1

IATA airline code.

7

name

String

1

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

7

aircraftOwner

String

0-1

Name of the carrier returned by the data source.
NB this element is only present if the IATA airline code is missing in the data source response.

6

equipmentType

Object

1

Operating carrier of the flight.

7

code

String

1

Equipment type code.

7

name

String

1

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

7

acvCode

String

1

Three digits, field is present when data available only

7

_links

Object

1

Container for relevant links

8

information

Object

1

Container for links concerning information about the equipement

9

href

uri

1

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

5

ratingStatistics

Object

0-1

Ratings statistics for the flight.

6

averageRating

String

1

Average rating of the flight.

6

numberOfRatings

String

1

Numbers of ratings available for the flight.

6

ratingCategories

Object

5

Category (1-5) for ratings

7

level

Integer

1

Level (1-5) of the rating category.

7

count

Integer

1

Number of ratings in the category.

6 _links Object 1 Container for relevant links
7 starRatingDeeplink Object 1 Represents the deeplink in order to call the starRating service
2

flightProducts

Array of Objects

1-n

Flight product for the itinerary.

3

passengers

Array of Objects

1-n

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

4

id

Integer

1

Integer to uniquely identify a passenger within a product.

4

type

String

1

Type of the passenger.

ADT, C14, CHD, INF, YCD, YTH, B12, B13, B14, B15.

3

price

Object

0-1

Price specification for the product (in Cash).

4

displayPrice

Number

1

Price to be displayed.
Depending on the displayType it includes taxes and/or fees.
Depending of displayPriceContent it is for one adult or for all pax rounded

4

totalPrice

Number

1

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

4

currency

String

1

The currency used for prices in response. 
 Three letter currency code according to ISO 4217.

4

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).

4

displayType

String

0-1

Indicates the rules used for the display price. TAX, FARE or FEE 

4

surcharges

Object

0-n

Surcharges applicable per PNR. Surcharges applicable per PNR.
Conditional: Surcharge applies either to passenger or to PNR.

5

code

String

1

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

5

amount

String

1

Amount applicable to the Surcharge.

4

pricePerPassengerTypes

Array of Objects

 1-4

Price specification per passenger type.

5

passengerType

String

1

Type of the passenger. ADT, C14, CHD, INF, YCD, YTH, B12, B13, B14, B15.

5

fare

Number

1

The fare price as applicable for the Passenger Type.

5

taxes

Number

1

The taxes price as applicable for the Passenger Type.

5

penalty

Number

0-1

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

5

surcharges

Object

0-n

Surcharges applicable per passenger.

Conditional: Surcharge applies either to passenger or to PNR.

6

code

String

1

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

6

amount

Number

1

Amount applicable to the Surcharge.

4 displayPrice Number 1

Price to be displayed.

Depending of displayPriceContent it is for one adult or for all pax rounded

4 totalPrice Number 1 Total price in Miles. Price for all passengers.
4 currency String 1

The currency used for prices in response. 

For priceInMiles, it will be always set to MILES

4 displayType String 0-1

Indicates the rules used for the display price.

For priceInMiles, it will be always set to FARE_MILES

4 pricePerPassengerTypes Array of Objects 1-4 Price specification per passenger type.
5 passengerType String 1 Type of the passenger. ADT, C14, CHD, INF, YCD, YTH, B12, B13, B14, B15.
5 fare Number 1 The fare price as applicable for the Passenger Type.
3 taxDetails Object 0-1 Taxes price specification for the product
4 totalPrice Number 1 Total taxes price. Taxes price for all passengers.
4 currency String 1

The currency used for prices in response. 

Three letter currency code according to ISO 4217.

4 pricePerPassengerTypes Array of Objects 1-4 Price specification per passenger type.
5 passengerType String 1 Type of the passenger. ADT, C14, CHD, INF, YCD, YTH, B12, B13, B14, B15.
5 taxes Number 1 The taxes price as applicable for the Passenger Type.
5 surcharges Object 0-n

Surcharges applicable per passenger.

Conditional: Surcharge applies either to passenger or to PNR.

6 code String 1 Code of the surcharge. e.g. to indicate it is a booking fee.
6 amount Number 1 Amount applicable to the Surcharge.
3

connections

Array of Objects

 1-6

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

4

numberOfSeatsAvailable

Integer

0-1

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

4

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.

5

id

Integer

1

Identification of the promotion.

5

title

String

1

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

4

fareBasis

Object

1

Fare basis applicable to the connection as selected.

5

code

String

1

Fare basis code for the connection.

4

negotiatedFare

Boolean

0-1

It is set to TRUE only if the fare is a Negotiated one. 

4

fareFamily

Object

1

Fare family applicable to the connection.

5

code

String

1

Fare family code for the connection.

5

hierarchy

Integer

1

Fare family hierarchy.

4 commercialCabin String 1 CommercialCabin applicable for the fare for the connection
ECONOMY or PREMIUM or BUSINESS or FIRST
4

price

Object

0-1

Price per connection

5

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

5

totalPrice

Number

1

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

5

currency

String

1

The currency used for prices in response. 

Three letter currency code according to ISO 4217.

5

displayType

String

0-1

Indicates the rules used for the display price. 

TAX, FARE or FEE 

5

surcharges

Array of Objects

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.

6

code

String

1

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

6

amount

Number

1

Amount applicable to the Surcharge.

5

pricePerPassengerTypes

Array of Objects

1

Price specification per passenger type and per connection

6

passengerType

String

1

Type of the passenger.ADT, C14, CHD, INF, YCD, YTH, B12, B13, B14, B15.

6

fare

Number

1

The fare price as applicable for the Passenger Type.

6

taxes

Number

1

The taxes price as applicable for the Passenger Type.

6

penalty

Number

0-1

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

6

surcharges

Array of Objects

0-n

Surcharges applicable per passenger. Conditional: Surcharge applies either to passenger or to PNR.

7

code

String

1

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

7

amount

Number

1

Amount applicable to the Surcharge.

5 displayPrice Number 1

Price to be displayed.

Depending of displayPriceContent it is for one adult or for all pax rounded

5 totalPrice Number 1 Total price in Miles. Price for all passengers.
5 currency String 1

The currency used for prices in response.

For priceInMiles, it will be always set to MILES

5 displayType String 0-1

Indicates the rules used for the display price.

For priceInMiles, it will be always set to FARE_MILES

5 pricePerPassengerTypes Array of Objects 1-4 Price specification per passenger type.
6 passengerType String 1 Type of the passenger. ADT, C14, CHD, INF, YCD, YTH, B12, B13, B14, B15.
6 fare Number 1 The fare price as applicable for the Passenger Type.
4 taxDetails Object 0-1 Taxes price specification for the product
5 totalPrice Number 1 Total taxes price. Taxes price for all passengers.
5 currency String

The currency used for prices in response. 

Three letter currency code according to ISO 4217.

5 pricePerPassengerTypes Array of Objects 1-4 Price specification per passenger type.
6 passengerType String 1 Type of the passenger. ADT, C14, CHD, INF, YCD, YTH, B12, B13, B14, B15.
6 taxes Number 1 The taxes price as applicable for the Passenger Type.
6 surcharges Array of Objects 0-n Surcharges applicable per passenger. Conditional: Surcharge applies either to passenger or to PNR.
7 code String 1 Code of the surcharge. e.g. to indicate it is a booking fee
7 amount Number 1 Amount applicable to the Surcharge.
4

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.

5

cabin

Object

1

Cabin for the segment

6

class

String

1

Cabin code.
Can be:
• M == Economy
• C == Business
• W == Premium Economy
• F == First (La Premiere)

5

sellingClass

Object

1

Selling class for the segment

6

code

String

1

Selling class code

5 fareBasis Object 1 Farebasis for the segment
6 code String 1 Farebasis code
5 _links Object 1 Container for HATEOAS links
6 flightDetails HATEOAS link 0-1 Represents a HATEOAS link to request the fllight details for the connection.
3

_links

Object

1

Container for all HATEOAS links

4

ticketConditions

HATEOAS link

0-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.

4

taxBreakdown

HATEOAS link

0-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.

4

relatedProducts

HATEOAS link

0-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.

4

shoppingCart

HATEOAS link

0-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.

1 warning Object 0-99 Warning details
2 code Number 1 Functional warning codes (1000-1999)
2 name String 1

Name of the warning. Ex :OFA/FUNCTIONAL/INVALID_VALUE

 

2 description String 1 Description of the warning
3 errorInInputPath String 1 Description of the input Path where the warning occurred
1 errors Object 0-1 Error details
2 code Number 1 Functional error codes (1000-1999)
Technical error codes (2000-2999)
Internal error codes (3000-3999)
2 name String 1

Name of the error . Ex :OFA/TECHNICAL/INVALID_VALUE

- logger/Typology/name

2 description String 1 Description of the error.
3 errorInInputPath 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

INTERNAL_SERVER_ERROR

500

FOA/INTERNAL_SERVER_ERROR/UNSUPPORTED_CAPABILITY

SAMPLE POST REQUEST (outbound query)

 

 
}

Docs Navigation