GET /amenities v2

GET AMENITIES V2

This page describes the version 2 of GET /amenities endpoint.

Service description

This service enables any consumer to get a list of available amenities (e.g. wifi, meals, seats, entertainment..etc) for one or multiple ACV and/or for one or multiple flights.

The service returns the number and the list of amenities (label, pictogram, category) for one or multiple ACV and/or for one or multiple flights. If you target one cabin class the response will contain amenities for this cabin class; otherwise the response will contain amenities for all cabin classes and amenities detailed per cabin class. You can limit the number of amenities returned by the service to have a shorter response. 

This service enables any consumer to get a list of available amenities (wifi, meals, seats, entertainment..etc) for one or multiple flight numbers.

The service returns the number and the list of amenities (label, pictogram, category) for one or multiple flights. If you target one cabin class, the response will contain amenities for this cabin class; otherwise the response will contain amenities for all cabin classes and amenities detailed per cabin class. You can limit the number of amenities returned by the service to have a shorter response. In any case, the returned amenities will be already ordered by weight based on their business value compared to the competition. 

Our current scope is AF, KL, JN and A5. All services can be used for a specific market, travel host and language (e.g. NL market - KL host - en language).

 

Service URL

The service is reachable at the relative URL /amenities

Release version

 This service/version is part of the INSPIRE API

Technical Information

Data
Value
Class name AmenitiesController
Method name getAmenities
Following value needs to be set in the header:
Header
Value
Accept application/hal+json;charset=UTF-8;profile=com.afklm.inspire.amenities.v2

Request data

The service takes the following input data :

Parameters

Condition

Default

Example

Description
flight M (or "acv")   AF_7021_2018-05-18

Flight airline, number and date (yyyy-MM-dd), separated by an underscore.

Can provide mutiple flights with comma separated values

cabinClass

O

 

ECONOMY

Cabin class, string (ECONOMY,PREMIUM,BUSINESS,FIRST)
limit O   10 Limit (>= 0)

Example request

/inspire/amenities?flight=AF_0006_2018-05-18&cabinClass=ECONOMY&limit=10

Response data

The service sends the following data as output :

Level

Parameter

Type

Condition

Examples

Comments/Description
1 flights List M (or "acv" if no "flight" in the request)   List of flights
2 code String M   Flight number and date
2 aircraft Node M   All the amenities in this aircraft
3 amenitiesNb Integer M   Number of amenities in this aircraft
3 amenities List M   List of amenities in this aircraft ordererd by weight
2 cabinClasses List M   List of amenities in this cabin class ordererd by weight
3 amenitiesNb Integer M   Number of amenities in this cabin class (if a "limit" is given in the request, this number may be higher than the "amenities" list size)
3 amenities List M   List of amenities in this cabin class ordererd by weight
2 flightInfo Node M Information about the flight
3 segments List M List of segments
4 origin String M Origin of the segment
4 destination String M Destination of the segment
3 acv String M operating ACV code
3 operatingAirline String M operating airline code
1 amenities List M  

Properties of the amenities (data loaded from CRS)

2 code String M   The code of the amenity
2 label String M   The label of the amenity
2 imageUrl String M   The image URL of the amenity
2 description String M   The description of the amenity
2 category String M   The category of the amenity
1 categories List M   Label of the categories (data loaded from CRS)
2 code String M   Code of the category
2 label String M   Label of the category
1 errors List O   Errors on the request if any
2 code String M   Code of the error
2 name String M   Name of the error
2 technicalSupplement String M   Message of the error

Example Request

/inspire/amenities?flight=AF_006_2018-06-26&cabinClass=ECONOMY&limit=1

Example Response

{
  "flights" : [
    {
      "code": "AF_006_2018-06-26",
      "cabinClasses" : [
        {
          "code": "ECONOMY",
          "amenitiesNb" : 7,
          "amenities" : [
            "SEAT_STANDARD"
          ]
        }
      ],
      "flightInfo": {
  	  "segments": [
	     { 
		"origin": "CDG", 
		"destination": "JFK" 
	     } 
          ], 
          "acv": "38C",
          "operatingAirline": "AF" 
      }  
    }
  ],

  "amenities" : [
    {
      "code": "SEAT_STANDARD",
      "label": "Standard reclining seat",
      "imageUrl": "https://img.static-af.com/images/meta/IDname/picto-siege-standard/?w=30&h=30",
      "description": "Standard reclining seat",
      "category": "COMFORT"
    }
  ],

  "categories" : [
    {
      "code": "COMFORT",
      "label": "Confort"
    }
  ]
}



Service-specific error codes

  • ACV_404.001
  • FLIGHT_404.001
  • FLIGHT_404.002
  • CC_404.000
  • CC_404.000

Error codes page provides description of each error, and also information about errors not specific to this service.

 

Docs Navigation