GET /related-products

GET /related-products

The RelatedProducts endpoint provides the related products (currently only Time to Think) for a selected flight product. 

HOW TO USE?

Use case flow can be followed by the consumer by requesting the GET method supplied as HATEOAS link in the response body of AvailableOffers & UpsellOffers.

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)

GET

GET https://api.klm.com/opendata/offers/v1/flight-products/{id}/related-products{?device}

Query Parameters

Name Type Multiplicity Description
device  String 0.1

Describe the device of the Request.

It can only be set to Mobile. 

Default value if not set : desktop

RESPONSE PARAMETERS

Level Name Type Multiplicity  Description
1 relatedProducts Array of Objects  0-n List of flight products matching the lowest fare offers request.
2 timeToThinkProduct Object 1 Specified a Time to Think product
3 endDateDatime DateTime 1 The datetime the validity of the time to think product will end.
3 price Object
Price specification for the time to think product.
4 totalPrice Number 1 The total price for the product applicable to all passengers.
4 currency String 1 The currency used for the fee.
Three letter currency code according to ISO 4217.
3 pricePerPassengerTypes  Array of Objects   1-4 Price specification per passenger type.
4 passengerType String 1 Type of the passenger.
ADT, C14, CHD, INF, YTH, YCD
4 price Number 1 The price for the product for the specified passenger type
3 _links Object 1 Container for all HATEOAS links
4 shoppingCart HATEOAS link  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.
2 _links Object  1 Container for all HATEOAS links
3 self HATEOAS link  1 Represents a HATEOAS link to the same related products service.
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

- logger/Typology/name

2 .description String 1

Description of the warning

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

2 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

{
  "relatedProducts": [
    {
      "timeToThinkProduct": {
        "price": {
          "totalPrice": 75,
          "pricePerPassengerTypes": [
            {
              "passengerType": "ADT",
              "price": 15
            },
            {
              "passengerType": "CHD",
              "price": 15
            },
            {
              "passengerType": "INF",
              "price": 15
            }
          ],
          "currency": "EUR"
        },
        "endDateTime": "2016-02-11T16:57:13"
      }
    }
  ],
  "_links": {
    "self": {
      "href": "https://api.ute1.klm.com/travel/offers/flight-products/l_N8r2BHuPGj0j1CXP4yD21UMQ6DMAz8y82mcijq4A0xMZQiyoL6lIi_46QqJK5ny-fz2XcR9VaQCMc2kE_E9xxQKuMyv5ZV-ucbhOLTtTaM6ybTNuRCYREttRweDXcNh0zjhKtaSiw7x4cLnDaC-Yq0yJUXkDvhyghISyjcAQkEoziEd4J34azRmT7K5Cc_wc0SFU_5Wd9qX3UZwp8ZU6NycHNC6d0SQcf6Fnk_AA==/related-products",
      "templated": false
    }
  }
}

Docs Navigation