GET /search-context v1

GET /search-context V1

The SearchContext endpoint provides the possibility to initialize a search context linked to the masheryContext (authorization and login mode) and the input parameters. Only usefull for corporate flow for the moment.

How to use?

The GET method should be used before starting a search.
Use case flow can then be followed by the consumer by requesting POST methods on availableOffers/lowestOffers with adding the profiled in the service URL

Headers to use for requests:

Parameter Value
Authorization Bearer {{token}}
Content-Type application/json
Accept application/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/search-context

 

QUERY PARAMETERS

n/a 

RESPONSE PARAMETERS

Name Type Multiplicity   Description
corporateContracts List 1 List of corporate contracts
.. contractKey Integer 1 Key associated to the Contract 
.. companyName String 1 Company Name associated to the contract
.. restrictions List 1 Restriction associated to the contract
… maxNumberOfPaxPerBooking   Integer 1 Maximum number of passenger per booking with this contract
.. type  String 1 Type of contract :

STD = Standard

BB = BlueBiz

GCL = Local Key Account
MM = Multi market
profileId String 1 Id of the Profile stored in resource store. To be used in all our services to get FB details. To use in association with the contractKey to get the fare associated to the contract.
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.
..errorinInputPath String 1 Description of the input Path where the error occurred

HTTP STATUS CODE

HTTP status Type
200 OK
500 INTERNAL_SERVER_ERROR

 

SAMPLE RESPONSE

 

{
    "corporateContracts": [
        {
            "contractKey": 0,
            "companyName": "DANA INTERNATIONAL B.V.",
            "type": "BB",
            "restrictions": [
                {
                    "maxNumberOfPaxPerBooking": 9
                }
            ]
        },
        {
            "contractKey": 2,
            "companyName": "WENDEL",
            "type": "STD",
            "restrictions": [
                {
                    "maxNumberOfPaxPerBooking": 1
                }
            ]
        },
        {
            "contractKey": 1,
            "companyName": "ASSOCIATION FRANCAISE DE NORMALISATION",
            "type": "STD",
            "restrictions": [
                {
                    "maxNumberOfPaxPerBooking": 9
                }
            ]
        },
        {
            "contractKey": 3,
            "companyName": "SOUTH AFRICAN EXPRESS AIRWAYS SOC LTD",
            "type": "GCL",
            "restrictions": [
                {
                    "maxNumberOfPaxPerBooking": 9
                }
            ]
        },
        {
            "contractKey": 6,
            "companyName": "TEST MIGRATION BB FR PACKET",
            "type": "BB",
            "restrictions": [
                {
                    "maxNumberOfPaxPerBooking": 9
                }
            ]
        },
        {
            "contractKey": 4,
            "companyName": "SUNCOM",
            "type": "BB",
            "restrictions": [
                {
                    "maxNumberOfPaxPerBooking": 9
                }
            ]
        },
        {
            "contractKey": 5,
            "companyName": "HEUFT FRANCE",
            "type": "BB",
            "restrictions": [
                {
                    "maxNumberOfPaxPerBooking": 9
                }
            ]
        }
    ],
    "profileId": "5ae28597-7d85-4f04-acdb-4d976112dc3e"
}

 


Docs Navigation