Wiki source code of 6. GetAirportTree
Last modified by Giorgi Mdivnishvili on 2024/04/11 13:24
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | {{box cssClass="floatinginfobox" title="**Contents**"}} | ||
2 | |||
3 | |||
4 | {{toc/}} | ||
5 | {{/box}} | ||
6 | |||
7 | = Method Description = | ||
8 | |||
9 | GetAirportTree method is used to retrieve Airport data by countries and cities. | ||
10 | |||
11 | There is hierarchy like Country>City>airport. Parent for the City is COuntryCOde, parent for the aiport is cityUID. | ||
12 | |||
13 | |||
14 | |||
15 | == EndpointURL - [GET] == | ||
16 | |||
17 | {{info}} | ||
18 | [[https:~~/~~/integration.kazunion.com/api/Catalogue/GetAirportTree>>http://integration.kazunion.com/api/Catalogue/GetAirportTree]] | ||
19 | {{/info}} | ||
20 | |||
21 | |||
22 | == Request Parameters == | ||
23 | |||
24 | (% class="box infomessage" %) | ||
25 | ((( | ||
26 | None | ||
27 | ))) | ||
28 | |||
29 | == Request Body == | ||
30 | |||
31 | {{code language="Json"}} | ||
32 | none | ||
33 | {{/code}} | ||
34 | |||
35 | |||
36 | == Response Body == | ||
37 | |||
38 | {{code language="json"}} | ||
39 | [ | ||
40 | { | ||
41 | "type": "string", | ||
42 | "parent": "string", | ||
43 | "label": "string", | ||
44 | "subLabel": "string", | ||
45 | "value": "string", | ||
46 | "tag": "string" | ||
47 | } | ||
48 | ] | ||
49 | {{/code}} | ||
50 | |||
51 | |||
52 | === example === | ||
53 | |||
54 | {{code language="Json"}} | ||
55 | { | ||
56 | "type": "country", | ||
57 | "label": "United Arab Emirates", | ||
58 | "value": "AE", | ||
59 | "tag": "United Arab Emirates" | ||
60 | }, | ||
61 | { | ||
62 | "type": "city", | ||
63 | "parent": "AE", | ||
64 | "label": "Abu Dhabi", | ||
65 | "value": "28c794fe-3c7e-4da2-ba93-f24bd3d4730d", | ||
66 | "tag": "Abu Dhabi United Arab Emirates" | ||
67 | }, | ||
68 | { | ||
69 | "type": "airport", | ||
70 | "parent": "28c794fe-3c7e-4da2-ba93-f24bd3d4730d", | ||
71 | "label": "Abu Dhabi Intl Airport", | ||
72 | "subLabel": "Abu Dhabi, United Arab Emirates", | ||
73 | "value": "AUH", | ||
74 | "tag": "AUH Abu Dhabi Intl Airport Abu Dhabi, United Arab Emirates Abu Dhabi United Arab Emirates" | ||
75 | }, | ||
76 | { | ||
77 | "type": "city", | ||
78 | "parent": "AE", | ||
79 | "label": "Dubai", | ||
80 | "value": "f5185fa3-3f56-44ed-bf6b-80386a33caa2", | ||
81 | "tag": "Dubai United Arab Emirates" | ||
82 | }, | ||
83 | { | ||
84 | "type": "airport", | ||
85 | "parent": "f5185fa3-3f56-44ed-bf6b-80386a33caa2", | ||
86 | "label": "Dubai Al Maktoum Intl Airport", | ||
87 | "subLabel": "Dubai, United Arab Emirates", | ||
88 | "value": "DWC", | ||
89 | "tag": "DWC Dubai Al Maktoum Intl Airport Dubai, United Arab Emirates Dubai United Arab Emirates" | ||
90 | }, | ||
91 | { | ||
92 | "type": "airport", | ||
93 | "parent": "f5185fa3-3f56-44ed-bf6b-80386a33caa2", | ||
94 | "label": "Dubai Intl Airport", | ||
95 | "subLabel": "Dubai, United Arab Emirates", | ||
96 | "value": "DXB", | ||
97 | "tag": "DXB Dubai Intl Airport Dubai, United Arab Emirates Dubai United Arab Emirates" | ||
98 | }, | ||
99 | {{/code}} | ||
100 | |||
101 | |||
102 | === Schema === | ||
103 | |||
104 | {{success}} | ||
105 | [TreeNode{ | ||
106 | |||
107 | |type|string | ||
108 | nullable: true | ||
109 | |parent|string | ||
110 | nullable: true | ||
111 | |label|string | ||
112 | nullable: true | ||
113 | |subLabel|string | ||
114 | nullable: true | ||
115 | |value|string | ||
116 | nullable: true | ||
117 | |tag|string | ||
118 | nullable: true | ||
119 | |||
120 | }] | ||
121 | {{/success}} | ||
122 | |||
123 | |||
124 | |||
125 | == Definitions == | ||
126 | |||
127 | {{code language="none"}} | ||
128 | type: Country or City or Airport | ||
129 | parent: Value for the city is the parent for the airport | ||
130 | label: Name of the Country/City/Airport | ||
131 | subLabel: in type of Airport - given data in format "City, Country" | ||
132 | value: Value for the Airport is the code of airport, in case of city is CityUID | ||
133 | tag: Full naming of the airport | ||
134 | {{/code}} | ||
135 | |||
136 | |||
137 | |||
138 | |||
139 | ==== Country Object ==== | ||
140 | |||
141 | This object represents a country. | ||
142 | |||
143 | (% class="table-bordered" %) | ||
144 | |=Field|=Type|=Description | ||
145 | |type|string|The type of the object. In this case, it's always "country". | ||
146 | |label|string|The name of the country. | ||
147 | |value|string|The ISO code of the country. | ||
148 | |tag|string|The name of the country. | ||
149 | |||
150 | ==== City Object ==== | ||
151 | |||
152 | This object represents a city. | ||
153 | |||
154 | (% class="table-bordered" %) | ||
155 | |=Field|=Type|=Description | ||
156 | |type|string|The type of the object. In this case, it's always "city". | ||
157 | |parent|string|The ISO code of the parent country. | ||
158 | |label|string|The name of the city. | ||
159 | |value|string|The UUID of the city. | ||
160 | |tag|string|A string containing the city name and country name, separated by a space. | ||
161 | |||
162 | ==== Airport Object ==== | ||
163 | |||
164 | This object represents an airport. | ||
165 | |||
166 | (% class="table-bordered" %) | ||
167 | |=Field|=Type|=Description | ||
168 | |type|string|The type of the object. In this case, it's always "airport". | ||
169 | |parent|string|The UUID of the parent city. | ||
170 | |label|string|The name of the airport. | ||
171 | |subLabel|string|The location of the airport, usually in the format "City, Country". | ||
172 | |value|string|The IATA code of the airport. | ||
173 | |tag|string|A string containing the IATA code, airport name, city, and country, separated by spaces. | ||
174 | |||
175 |