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/flightoffers/v3/flight-products/{id}/related-products

QUERY PARAMETERS

n/a (use HATEOAS link)

RESPONSE PARAMETERS

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

ERROR CODES

HTTP status

Type

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.klm.com/travel/flightoffers/flight-products/l_N8r2BHuPGj0j1CXP4yD21UMQ6DMAz8y82mcijq4A0xMZQiyoL6lIi_46QqJK5ny-fz2XcR9VaQCMc2kE_E9xxQKuMyv5ZV-ucbhOLTtTaM6ybTNuRCYREttRweDXcNh0zjhKtaSiw7x4cLnDaC-Yq0yJUXkDvhyghISyjcAQkEoziEd4J34azRmT7K5Cc_wc0SFU_5Wd9qX3UZwp8ZU6NycHNC6d0SQcf6Fnk_AA==/related-products",
      "templated": false
    }
  }
}

Docs Navigation