Wiki source code of 3. GetDepartureCities
Last modified by Giorgi Mdivnishvili on 2024/04/10 03: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 | This method returns data about departure cities. | ||
10 | To call the method, the country code must be passed as a parameter in the header and then a list of departure cities of the chosen country will be returned with all the necessary data. | ||
11 | |||
12 | |||
13 | == Endpoint URL - [GET] == | ||
14 | |||
15 | {{info}} | ||
16 | [[https:~~/~~/integration.kazunion.com/api/Catalogue/GetDepartureCities>>http://integration.kazunion.com/api/Catalogue/GetDepartureCities]] | ||
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/GetDepartureCities?CountryCode=KZ>>http://integration.kazunion.com/api/Catalogue/GetDepartureCities?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 | "cityUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6", | ||
46 | "cityName": "string", | ||
47 | "state": "string", | ||
48 | "note": "string", | ||
49 | "countryCode": "string", | ||
50 | "iataCode": "string", | ||
51 | "timeZoneOffset": 0 | ||
52 | } | ||
53 | ] | ||
54 | {{/code}} | ||
55 | |||
56 | |||
57 | === example === | ||
58 | |||
59 | {{code language="Json"}} | ||
60 | { | ||
61 | "cityUID": "8aa860fd-1899-4253-ad52-0700c5339d70", | ||
62 | "cityName": "Aktau", | ||
63 | "state": "", | ||
64 | "countryCode": "KZ", | ||
65 | "timeZoneOffset": 5 | ||
66 | }, | ||
67 | { | ||
68 | "cityUID": "f0ba6324-f337-405c-8cc7-23d62cf664e8", | ||
69 | "cityName": "Almaty", | ||
70 | "state": "", | ||
71 | "countryCode": "KZ", | ||
72 | "timeZoneOffset": 6 | ||
73 | }, | ||
74 | { | ||
75 | "cityUID": "5efe9cfb-a9a0-4f99-93f5-42716e4ccbb7", | ||
76 | "cityName": "Astana", | ||
77 | "state": "", | ||
78 | "note": "Added from RustarOnline", | ||
79 | "countryCode": "KZ", | ||
80 | "timeZoneOffset": 6 | ||
81 | }, | ||
82 | { | ||
83 | "cityUID": "3bd6976b-b9dd-4086-96aa-5a4581560d19", | ||
84 | "cityName": "Atyrau", | ||
85 | "state": "", | ||
86 | "countryCode": "KZ", | ||
87 | "timeZoneOffset": 5 | ||
88 | }, | ||
89 | {{/code}} | ||
90 | |||
91 | |||
92 | === Schema === | ||
93 | |||
94 | {{success}} | ||
95 | [City{ | ||
96 | |||
97 | |cityUID|string($uuid) | ||
98 | |cityName|string | ||
99 | nullable: true | ||
100 | |state|string | ||
101 | nullable: true | ||
102 | |note|string | ||
103 | nullable: true | ||
104 | |countryCode|string | ||
105 | nullable: true | ||
106 | |iataCode|string | ||
107 | nullable: true | ||
108 | |timeZoneOffset|integer($int32) | ||
109 | nullable: true | ||
110 | |||
111 | }] | ||
112 | {{/success}} | ||
113 | |||
114 | |||
115 | == (% id="cke_bm_3082S" style="display:none" %) (%%)Definitions == | ||
116 | |||
117 | {{warning}} | ||
118 | - `**cityUID**`: (string) The unique identifier for the city. | ||
119 | - `**cityName**`: (string) The name of the city. | ||
120 | - `**state**`: (string) The state where the city is located. This field can be empty. | ||
121 | - `**countryCode**`: (string) The ISO 3166-1 alpha-2 country code. For example, "KZ" for Kazakhstan. | ||
122 | - `**timeZoneOffset**`: (integer) The time zone offset for the city. This is the difference in hours from Coordinated Universal Time (UTC). | ||
123 | {{/warning}} | ||
124 | |||
125 |