GET /reference-data v3

GET / Reference-Data-v3

The ReferenceData endpoint provides the reference data a consumer needs to support a customer to search for flight offers.

How to use?      

The reference data is typically requested at the start of the use case to know which data can be used in request.

Headers to use for requests:

Parameter Value
Authorization Bearer {{token}}
Content-Type application/json
Accept application/hal+json;profile=com.afklm.flightoffers.reference.data.v3;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/v3/reference-data/country?bookingFlow=


 

QUERY PARAMETERS

Name Type Multiplicity   Description
bookingFlow  String 1 Indicates the flow LEISURE/CORPORATE/AWARD/SUBSCRIBER

 

Response Parameters

Name Type Multiplicity   Description
..market String 1 Code for the market given in input
….country Object 1 Settings applicable to the booking process for the specific market/country.
…..code String 1 Country code associated to the market
….label String 1 Country label in the language specified in ContentLanguage header
……maximumNumberOfSeats Integer 1 Maximum number of seats that can be in a single booking from the requested country. Note that e.g. infants do not have their own seat.
…...minimumNumberOfAdults   Integer 1 Minimum number of adults that must be in a single booking from the specific country.
……defaultAirport String 1 IATA code for the default airport for the specific country.
……origins Array of Strings  0-n List of origins that are allowed for the specific country. 
……destinations Array of Strings  0-n List of destinations that are allowed for the specific country. 
commercialCabins Array of Objects  1-n Cabin classes that can be used to search for flight offers.
..code String 1 Code identifying the transport cabin : ECONOMY / BUSINESS/PREMIUM/FIRST
.. label String 1 Cabin label in the language specified in ContentLanguage header.
passengerTypes Array of Objects  1-n Types of passenger that can be used to search for this context (market/bookingFlow)
..code String 1 Code identifying the passenger type : ADT/CHD/INF/YCD/YTH/C14
.. label String 1 Passenger type label
areas Array of Objects  1-n List of IATA area
..code String 1 Code identifying an area.
..label String 1 Area label in the language specified in ContentLanguage header.
..countries Array of Objects  1-n List available countries
….code String 1 Code identifying a country.
….label String 1 Country label in the language specified in ContentLanguage header.
….cities Array of Objects  0-n List of available cities in country.
……code String 1 Code identifying a city.
……label String 1 City label in the language specified in ContentLanguage header.
……stopover Array of Objects  1-n List of available stopovers in city.
……..code String 1 Code identifying a stopover.
……..label String 1 Stopover label in the language specified in ContentLanguage header.
……..type Boolean 1 Airport/train/bus/… see complete list below

A

AIRPORT

M

MILITARY/AIRFORCE BASE

R

RAILWAY STATION

S

SEAPLANE BASE

H

HELIPORT

O

OFF-LINE POINT

B

BUS STATION

P

PORT/HARBOUR

F

FERRY

C

COMMERCIAL SERVICE

L

LIMOUSINE

 

Error Codes

HTTP status

Type

500

INTERNAL_SERVER_ERROR

 

Sample  Response

 

{
    "market": "US",
    "countries": [
        {
            "code": "US",
            "label": "Verenigde Staten",
            "maximumNumberOfSeats": 9,
            "minimumNumberOfAdults": 1,
            "redirectionByMarket": false,
            "defaultAirport": "JFK",
            "origins": [
                "AUS",
                "BHM",
                "DIK",
                "CMH",
                "EWN",
                "UBS",
                "OAJ",
                "AMA",
                "PSP",
                "SIT",
                "VLD",
                
            ],
            "destinations": [
                "EWN",
                "SKB",
                "GTR",
                "UBS",
                "OAJ",
                "OER",
                "GYN",
                
"
            ],
            "commercialCabins": [
                {
                    "code": "ECONOMY",
                    "label": "Economy Class"
                },
                {
                    "code": "BUSINESS",
                    "label": "Business Class"
                }
            ],
            "passengerTypes": [
                {
                    "code": "ADT",
                    "label": "volwassene"
                },
                {
                    "code": "CHD",
                    "label": "kind"
                },
                {
                    "code": "INF",
                    "label": "baby"
                },
                {
                    "code": "C14",
                    "label": "Jongvolwassene"
                },
                {
                    "code": "YTH"
                },
                {
                    "code": "YCD"
                }
            ],
            "areas": [
                {
                    "code": "WORLD",
                    "label": "location.area.WORLD.long",
                    "countries": [
                        {
                            "code": "SD",
                            "label": "Soedan",
                            "cities": [
                                {
                                    "code": "KRT",
                                    "label": "Khartoum",
                                    "stopovers": [
                                        {
                                            "code": "KRT",
                                            "label": "Civil Airport",
                                            "type": "stopover"
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "code": "CZ",
                            "label": "Tsjechië",
                            "cities": [
                                {
                                    "code": "PRG",
                                    "label": "Praag",
                                    "stopovers": [
                                        {
                                            "code": "PRG",
                                            "label": "Václav Havel Airport",
                                            "type": "stopover"
                                        }
                                    ]
                                },
                                {
                                    "code": "OSR",
                                    "label": "Ostrava",
                                    "stopovers": [
                                        {
                                            "code": "OSR",
                                            "label": "Leos Janacek",
                                            "type": "stopover"
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "code": "PY",
                            "label": "Paraguay",
                            "cities": [
                                {
                                    "code": "ASU",
                                    "label": "Asunción",
                                    "stopovers": [
                                        {
                                            "code": "ASU",
                                            "label": "Asunción",
                                            "type": "stopover"
                                        }
                                    ]
                                }
                            ]
                        },
                        
……
}  

Docs Navigation