Wiki source code of 4. GetArrivalDistricts
Last modified by Giorgi Mdivnishvili on 2024/04/10 03:34
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 | This method returns data about arrival districts. | ||
10 | To call the method, the country code must be passed as a parameter in the header and then a list of arrival cities and districts of the chosen country will be returned with all the necessary data. | ||
11 | |||
12 | |||
13 | == EndpointURL - [GET] == | ||
14 | |||
15 | {{info}} | ||
16 | [[https:~~/~~/integration.kazunion.com/api/Catalogue/GetArrivalDistricts>>http://integration.kazunion.com/api/Catalogue/GetArrivalDistricts]] | ||
17 | {{/info}} | ||
18 | |||
19 | |||
20 | == Request Parameters == | ||
21 | |||
22 | (% class="box infomessage" %) | ||
23 | ((( | ||
24 | |||
25 | |||
26 | |**Key**|**Value**|**Request URL** | ||
27 | |CountryCode|KZ|[[https:~~/~~/integration.kazunion.com/api/Catalogue/GetArrivalDistricts?countryCode=KZ>>http://integration.kazunion.com/api/Catalogue/GetArrivalDistricts?countryCode=KZ]] | ||
28 | |||
29 | |||
30 | ))) | ||
31 | |||
32 | |||
33 | == Request Body == | ||
34 | |||
35 | {{code language="Json"}} | ||
36 | none | ||
37 | {{/code}} | ||
38 | |||
39 | |||
40 | == Response Body == | ||
41 | |||
42 | {{code language="json"}} | ||
43 | [ | ||
44 | { | ||
45 | "type": "string", | ||
46 | "parent": "string", | ||
47 | "label": "string", | ||
48 | "value": "string", | ||
49 | "tag": "string" | ||
50 | } | ||
51 | ] | ||
52 | {{/code}} | ||
53 | |||
54 | |||
55 | === example === | ||
56 | |||
57 | {{code language="Json"}} | ||
58 | { | ||
59 | "type": "city", | ||
60 | "label": "Aktau", | ||
61 | "value": "8aa860fd-1899-4253-ad52-0700c5339d70", | ||
62 | "tag": "Aktau" | ||
63 | }, | ||
64 | { | ||
65 | "type": "district", | ||
66 | "parent": "8aa860fd-1899-4253-ad52-0700c5339d70", | ||
67 | "label": "Aktau Airport", | ||
68 | "value": "9e24902a-65ec-41b8-b736-a7e50631ee13", | ||
69 | "tag": "Aktau Airport Aktau" | ||
70 | }, | ||
71 | { | ||
72 | "type": "district", | ||
73 | "parent": "8aa860fd-1899-4253-ad52-0700c5339d70", | ||
74 | "label": "Mangghystau", | ||
75 | "value": "1644b5e1-7dea-4e3b-b2e6-854eb50f2c97", | ||
76 | "tag": "Mangghystau Aktau" | ||
77 | }, | ||
78 | { | ||
79 | "type": "district", | ||
80 | "parent": "8aa860fd-1899-4253-ad52-0700c5339d70", | ||
81 | "label": "Microdistrict 9", | ||
82 | "value": "dcedd4b5-1044-410e-b8ad-f8f9ba443593", | ||
83 | "tag": "Microdistrict 9 Aktau" | ||
84 | }, | ||
85 | { | ||
86 | "type": "city", | ||
87 | "label": "Aktobe", | ||
88 | "value": "2e460569-3f8c-48df-a287-03f3d5a94eb4", | ||
89 | "tag": "Aktobe" | ||
90 | }, | ||
91 | {{/code}} | ||
92 | |||
93 | |||
94 | === Schema === | ||
95 | |||
96 | {{success}} | ||
97 | [TreeNode{ | ||
98 | |||
99 | |type|string | ||
100 | nullable: true | ||
101 | |parent|string | ||
102 | nullable: true | ||
103 | |label|string | ||
104 | nullable: true | ||
105 | |subLabel|string | ||
106 | nullable: true | ||
107 | |value|string | ||
108 | nullable: true | ||
109 | |tag|string | ||
110 | nullable: true | ||
111 | |||
112 | }] | ||
113 | {{/success}} | ||
114 | |||
115 | |||
116 | == Definitions == | ||
117 | |||
118 | {{warning}} | ||
119 | Each object in the response represents a geographical entity and contains the following fields: | ||
120 | |||
121 | |||
122 | - `**type**`: (string) The type of the geographical entity. This can be "city" or "district". | ||
123 | |||
124 | - `**label**`: (string) The name of the geographical entity. | ||
125 | |||
126 | - `**value**`: (string) The unique identifier for the geographical entity. | ||
127 | |||
128 | - `**tag**`: (string) A tag for the geographical entity. This typically contains the name of the entity and, for districts, the name of the parent city. | ||
129 | |||
130 | |||
131 | For objects where `**type**` is "**district**", there is an additional field: | ||
132 | |||
133 | |||
134 | - `**parent**`: (string) The unique identifier for the parent city of the district. | ||
135 | |||
136 | |||
137 | {{/warning}} | ||
138 | |||
139 |