- Previous: POST /flights-availability v1
- Up: Offers API
- Next: POST/ bestOffers/feed
POST /best-fare-offers v1
POST /best-offers v1
The bestOffers endpoint provides the best available fare offers in a specific date interval.
The best fare offer could be the lowest available fare, the lowest promotional fare or a dedicated promotional fare in the requested date interval.
HOW TO USE
The POST method should be used to find an offer and start a booking flow.
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.
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) |
POST
POST https://api.airfranceklm.com/travel/offers/v1/best-fare-offers
QUERY PARAMETERS
n/a
POST PARAMETERS
Level | Name | Type | Multiplicity | Description |
1 | bookingFlow | String | 1 |
Booking flow associated to the search . Possible values : REWARD, CORPORATE, LEISURE, STAFF |
1 | passengers | Object | 1 | The specification of the passengers for which the offer is requested. |
2 | id | Integer | 1 | Contains the Id of the passenger |
2 | type | String | 1 |
Passenger type Possible values : ADT, CHD, INF, C14, YTH, YCD... |
1 | commercialCabin | String | 1 | Code for requested commercial Cabin Possible values : ECONOMY, PREMIUM, BUSINESS, FIRST |
1 | currency | String | 0..1 |
Indicates the currency to be used for prices in response. |
1 | dateInterval | Object | 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 the best fares for the requestedConnections. The 2 dates of the interval need to be set on a chronological way. Default value : date of the day / date of the day + 360
|
1 | requestedConnections | Object | 1 | A chronologically ordered list of connections for which the best fare offers is requested. |
2 | origin | Object | 1 | The origin for the requested connection |
3 | code | String | 1 |
The code in 3-letters of the origin Ex: CDG |
3 | type | Enum | 1 | The type of the origin code : CITY, AIRPORT, BUS_STATION, HELIPORT, RAILWAY_STATION, FERRY_STATION. |
2 | destination | Object | 1 | The destination for the requested connection |
3 | code | String | 1 |
The code in 3-letters of the destination Ex: NCE |
3 | type | String | 1 | The type of the destination code : CITY, AIRPORT, BUS_STATION, HELIPORT, RAILWAY_STATION, FERRY_STATION. |
1 | Filters | Object | 0..1 | Filters to be applied on the offers |
2 | maximumNumberOfSegments | Integer | 0..1 | number of segments on each connection -> 1 = direct flight only |
2 | marketingCarriers | Array of String | 0..1 |
IATA airline code for the marketing carrier of the flight Ex : ["AF","KL"] |
RESPONSE PARAMETERS
Level | Name | Type | Multiplicity | Description |
1 | connections | Array of Object | 0..2 | A chronologically ordered list of connections the best fare offer applies to. |
2 | origin | Object | 1 | Origin of the connection |
3 | code | String | 1 |
The code in 3-letters of the origin Ex: CDG |
3 | type | String | 1 | The type of the origin code : CITY, AIRPORT, BUS_STATION, HELIPORT, RAILWAY_STATION, FERRY_STATION. |
2 | destination | Object | 1 | Destination of the connection |
3 | code | String | 1 |
The code in 3-letters of the destination Ex: CDG |
3 | type | String | 1 | The type of the destination code : CITY, AIRPORT, BUS_STATION, HELIPORT, RAILWAY_STATION, FERRY_STATION. |
2 | commercialCabin | String | 0-1 | The commercialCabin applicable for the fare for the connection (matching the request). |
2 | promoFare | boolean | 0-1 | Indicates whether a the fare returned is a promotion or not. |
1 | price | Object | 0-1 | Offer price |
2 | displayPrice | String | 1 | Price to be displayed. Applies to a single adult. Depending on the displayType it includes taxes and/or fees. |
2 | totalPrice | String | 1 | Total price. Price for all passengers including taxes and fees. |
2 | pricePerPassengers | Array of Objects | 0..9 | Price specification per passenger type. |
3 | id | String | 1 | Integer to uniquely identify a passenger within a product. |
3 | passengerType | String | 1 | Type of the passenger. ADT, C14, CHD, INF, YCD, YTH, B12, B13, B14, B15. |
3 | fare | String | 1 | The fare price as applicable for the Passenger Type. |
3 | taxes | String | 1 | The taxes price as applicable for the Passenger Type. |
3 | surcharges | Object | 0..1 | Surcharges applicable per passenger. Conditional: Surcharge applies either to passenger or to PNR. |
4 | code | String | 1 | Code of the surcharge. E.g. to indicate it is a booking fee. |
4 |
amount
|
String | 1 | Amount applicable to the Surcharge. |
2 | currency | String | 1 | The currency used for prices in response. Three letter currency code according to ISO 4217. |
2 | displayType | String | 1 | Indicates the rules used for the display price. TAX, FARE or FEE, FARE_MILES |
1 | _links | Object | 0-1 | Container for all HATEOAS links |
2 | lowestFareOffersByMonth |
String | 1 | Represents a HATEOAS link to request the available flight offers with the lowest fare based on a certain period Months. |
2 | ticketConditions | String | 1 | Represents a HATEOAS link to request the ticket conditions for the returned product. |
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 occured |
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 occured |
HTTP STATUS CODES
HTTP status |
Type |
200 | OK |
400 |
BAD REQUEST |
500 |
INTERNAL_SERVER_ERROR |
SAMPLE POST REQUEST
{ "commercialCabin": "ECONOMY", "bookingFlow": "LEISURE", "dateInterval": "2020-05-23/2021-04-30", "passengers": [ { "id": 0, "type": "ADT" } ], "requestedConnections": [ { "origin": { "code": "LYS", "type": "CITY" }, "destination": { "code": "BJS", "type": "CITY" } }, { "origin": { "code": "BJS", "type": "CITY" }, "destination": { "code": "LYS", "type": "CITY" } } ], "filterBy": { "maximumNumberOfSegments": 5, "marketingCarriers": [ "AF", "KL" ] }}
SAMPLE POST RESPONSE
{"bestOffers": [{"connections": [{"origin": {"code": "LYS","type": "AIRPORT"},"destination": {"code": "PEK","type": "AIRPORT"},"commercialCabin": "ECONOMY","promoFare": false},{"origin": {"code": "PEK","type": "AIRPORT"},"destination": {"code": "LYS","type": "AIRPORT"},"commercialCabin": "ECONOMY","promoFare": false}],"price": {"displayPrice": 741.84,"totalPrice": 741.84,"pricePerPassengers": [{"id": 0,"passengerType": "ADT","fare": 402.00,"taxes": 334.84,"surcharges": [{"code": "BookingFee","amount": 5.00}]}],"currency": "EUR","displayType": "FEE"},"_links": {"lowestFareOffersByMonth": {"href": "https://api.ute3.klm.com/travel/offers/v1/lowest-fare-offers?d=q0YpAWGOQ0lM1cDcYwCNDFDoA7VjlHXR8LCJxUiotUjlnWtoEHKaD3AMcnQzsHB0REo6YGfhSKrV0OxQDSmHfSKDYakEHHu1KIUbVJGTF7oiROqORSQ-iLXQAiEWGEyoVmGagsUqTPcQY1UsZskUCzUFkkiAxR5yEQdOM7UA&dateInterval=2020-05-23/2021-04-30{&commercialCabin,displayPriceContent}","templated": true},"ticketConditions": {"href": "https://api.ute3.klm.com/travel/offers/v1/flight-products/1ZhLS8NAEID_SplzK7N5d2_RWIWmRWxAxPQgrWCgKFQ9SMl_d2bTNe-2hErw2NnZ2d2ZL_PoDg6xD_JpB03pFmQmL9Q-Fu1iSNYxSBzGUPsaSR6DH0QxpCBhHtp4d7kQkKZDqMWx2T6rtn6K6q5ZyiDz2lUyfFzAEAq1pbjoz7LFSnEiFQMNHAkxMpxIWFKgRLxARNKutB4VXVvadq6blxJ-UDU1s2yl1mAaUmSgWGtIKCzhsLgh9fLWUtNUtjWE30ZDCWaD-_fv580g-PpcvQ78ZLtJ3l4-2HahW9FbW25R7JY4fuy4YpXnqEOpVpOWaz6wxb8nSLVnJJzRcbr88s9bRXwdCx35RizurqcnYOFK8zQs3AjHZ8QCvbHbPxb6Ft2w8Ma9YkFJOF0yGP87t2lOGyG-Cm4OQmyM0IlQSMM-DnGma0sLO0DsT5ogNj3RAWKyVYaYoB1Mttyy1rFVyi3ndsPW7TebhW3ZTMe6EQRdAQ-D4ElxMghjaZwNBNexsA8Q9LmdQDAN7BWEhcpfy-wKeuRVSWLvHuoX5wHhQrv0_AnSpXgxP0d1yHBp4uIX5EOUOidZK8fU3sLepj5amagMWmzl2LY8IPwvDCO_b5vTHw==/ticket-conditions"}}}]}
- Previous: POST /flights-availability v1
- Up: Offers API
- Next: POST/ bestOffers/feed
Docs Navigation
- Air France-KLM Documentation
- Open Data
- Baggage allowance API Process flow - Pre-booking (inspiration) context
- Introduction
- Data scope
- Quick peak
- How to use
- Services overview
- Header
- GET All Allowances without Loyalty
- V1- All Allowances without Loyalty- Request
- V1- All Allowances without Loyalty- Response
- GET Base Allowances
- V1- Base Allowance - Request
- V1- Base Allowance - Response
- GET Loyalty Allowances
- V1- Loyalty Allowance - Request
- V1- Loyalty Allowance - Response
- GET Paid Options with Loyalty
- V1- GET Paid Options with Loyalty - Request
- V1- GET Paid Options with Loyalty - Response
- GET Paid Options without Loyalty
- V1- GET Paid Options without Loyalty - Request
- V1- GET Paid Options without Loyalty - Response
- GET All Allowances with Loyalty
- V1- All Allowances with Loyalty- Request
- V1- All Allowances with Loyalty- Response
- Get Started
- Offers API
- GET /reference-data v1
- GET /reference-data/deals v1
- GET /search-context v1
- POST /lowest-fare-offers v1
- GET /lowest-fare-offers v1
- POST /available-offers v1
- GET /available-offers v1
- GET /flightDetails
- POST /upsell-offers v1
- GET /upsell-offers v1
- GET /priceDetails v1
- GET /tax-breakdown
- GET /ticket-conditions
- GET /ticket-conditions with Reservation ID
- GET /ticket-conditions with Trip Parameters
- POST /shopping-carts
- GET /related-products
- POST /related-products/shopping-carts
- POST /mail-my-search
- POST /flights-availability v1
- POST /best-fare-offers v1
- POST/ bestOffers/feed
- Errors Code
- POST /available-offers/all v1
- POST /best-fare-offers/all-deals v1
- Inspire API / Amenities
- Flight Status API
- Network and Schedule API
- Baggage allowance API Process flow - Pre-booking (inspiration) context
- Metasearch API
- Cargo API
- All Other APIS