6. GetAirportTree

Last modified by Giorgi Mdivnishvili on 2024/04/11 13:24

Method Description

GetAirportTree method is used to retrieve Airport data by countries and cities.

There is hierarchy like Country>City>airport.  Parent for the City is COuntryCOde, parent for the aiport is cityUID.

EndpointURL - [GET]

Request Parameters

None

Request Body

none

Response Body

[
  {
   "type": "string",
   "parent": "string",
   "label": "string",
   "subLabel": "string",
   "value": "string",
   "tag": "string"
  }
]

example

  {
       "type": "country",
       "label": "United Arab Emirates",
       "value": "AE",
       "tag": "United Arab Emirates"
    },
    {
       "type": "city",
       "parent": "AE",
       "label": "Abu Dhabi",
       "value": "28c794fe-3c7e-4da2-ba93-f24bd3d4730d",
       "tag": "Abu Dhabi United Arab Emirates"
    },
    {
       "type": "airport",
       "parent": "28c794fe-3c7e-4da2-ba93-f24bd3d4730d",
       "label": "Abu Dhabi Intl Airport",
       "subLabel": "Abu Dhabi, United Arab Emirates",
       "value": "AUH",
       "tag": "AUH Abu Dhabi Intl Airport Abu Dhabi, United Arab Emirates Abu Dhabi United Arab Emirates"
    },
    {
       "type": "city",
       "parent": "AE",
       "label": "Dubai",
       "value": "f5185fa3-3f56-44ed-bf6b-80386a33caa2",
       "tag": "Dubai United Arab Emirates"
    },
    {
       "type": "airport",
       "parent": "f5185fa3-3f56-44ed-bf6b-80386a33caa2",
       "label": "Dubai Al Maktoum Intl Airport",
       "subLabel": "Dubai, United Arab Emirates",
       "value": "DWC",
       "tag": "DWC Dubai Al Maktoum Intl Airport Dubai, United Arab Emirates Dubai United Arab Emirates"
    },
    {
       "type": "airport",
       "parent": "f5185fa3-3f56-44ed-bf6b-80386a33caa2",
       "label": "Dubai Intl Airport",
       "subLabel": "Dubai, United Arab Emirates",
       "value": "DXB",
       "tag": "DXB Dubai Intl Airport Dubai, United Arab Emirates Dubai United Arab Emirates"
    },

Schema

Success

[TreeNode{

typestring
nullable: true
parentstring
nullable: true
labelstring
nullable: true
subLabelstring
nullable: true
valuestring
nullable: true
tagstring
nullable: true

}]

Definitions

type: Country or City or Airport
parent: Value for the city is the parent for the airport
label: Name of the Country/City/Airport
subLabel: in type of Airport - given data in format "City, Country"
value: Value for the Airport is the code of airport, in case of city is CityUID
tag: Full naming of the airport 

Country Object

This object represents a country.

FieldTypeDescription
typestringThe type of the object. In this case, it's always "country".
labelstringThe name of the country.
valuestringThe ISO code of the country.
tagstringThe name of the country.

City Object

This object represents a city.

FieldTypeDescription
typestringThe type of the object. In this case, it's always "city".
parentstringThe ISO code of the parent country.
labelstringThe name of the city.
valuestringThe UUID of the city.
tagstringA string containing the city name and country name, separated by a space.

Airport Object

This object represents an airport.

FieldTypeDescription
typestringThe type of the object. In this case, it's always "airport".
parentstringThe UUID of the parent city.
labelstringThe name of the airport.
subLabelstringThe location of the airport, usually in the format "City, Country".
valuestringThe IATA code of the airport.
tagstringA string containing the IATA code, airport name, city, and country, separated by spaces.