Wiki source code of 1. Hotels

Version 9.1 by Giorgi Mdivnishvili on 2024/02/26 17:36

Show last authors
1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2
3
4 {{toc/}}
5 {{/box}}
6
7 = Method Description =
8
9 **GetDestinationCountries **method is used to get all destination countries list, which is provided by Nugios.
10
11
12 == Endpoint URL - [GET] ==
13
14 {{info}}
15 [[https:~~/~~/integration.kazunion.com/api/Catalogue/GetDestinationCountries>>http://integration.kazunion.com/api/Catalogue/GetDestinationCountries]]
16 {{/info}}
17
18
19 == Request Parameters ==
20
21 (% class="box infomessage" %)
22 (((
23
24
25 |**Key**|**Value**|**Request URL**
26 |onlyHotels|True|[[https:~~/~~/integration.kazunion.com/api/Catalogue/GetDestinationCountries?onlyHotels=true>>http://integration.kazunion.com/api/Catalogue/GetDestinationCountries?onlyHotels=true]]
27 |onlyHotels|False|[[https:~~/~~/integration.kazunion.com/api/Catalogue/GetDestinationCountries?onlyHotels=false>>http://integration.kazunion.com/api/Catalogue/GetDestinationCountries?onlyHotels=false]]
28
29
30 )))
31
32
33 {{{In the system, Destination countries are two types:
34 1) Destinations where packages are available with flights,
35 2) Destination Countries with only hotels.
36 So using parameter false, or true there is option given, to determine type of destination country.}}}
37
38
39 == Request Body ==
40
41 {{code language="Json"}}
42 none
43 {{/code}}
44
45
46 == Response Body ==
47
48 {{code language="json"}}
49 {
50 "error": true,
51 "errorCode": "string",
52 "errorDescription": "string",
53 "userErrorDescription": "string",
54 "countries": [
55 {
56 "countryCode": "string",
57 "countryName": "string",
58 "note": "string",
59 "phoneCode": "string",
60 "isO2": "string",
61 "isO3": "string",
62 "status": 0,
63 "sortingOrder": 0,
64 "sellCurrency": "string"
65 }
66 ]
67 }
68 {{/code}}
69
70
71 === example ===
72
73 {{code language="Json"}}
74 {
75 "countryCode": "MV",
76 "countryName": "Maldives",
77 "phoneCode": "960",
78 "isO2": "MV",
79 "isO3": "MDV",
80 "status": 1,
81 "sortingOrder": 800,
82 "sellCurrency": "USD"
83 },
84 {
85 "countryCode": "GE",
86 "countryName": "Georgia",
87 "phoneCode": "995",
88 "isO2": "GE",
89 "isO3": "GEO",
90 "status": 1,
91 "sortingOrder": 900,
92 "sellCurrency": "USD"
93 }
94 {{/code}}
95
96
97 === Schema ===
98
99 (% data-xwiki-non-generated-content="java.util.List" %)
100 (((
101 {{success}}
102 GetCountriesResponse{
103
104 |error|boolean
105 |errorCode|string
106 nullable: true
107 |errorDescription|string
108 nullable: true
109 |userErrorDescription|string
110 nullable: true
111 |countries|[
112 nullable: trueCountry{(((
113 |countryCode|string
114 nullable: true
115 readOnly: true
116 |countryName|string
117 nullable: true
118 |note|string
119 nullable: true
120 |phoneCode|string
121 nullable: true
122 |isO2|string
123 nullable: true
124 |isO3|string
125 nullable: true
126 |status|integer($int32)
127 |sortingOrder|integer($int32)
128 |sellCurrency|string
129 nullable: true
130
131 }]
132 )))
133
134 }
135 {{/success}}
136
137
138 )))
139
140 == Definitions ==
141
142 {{code language="none"}}
143 countrycode: string. ISO2 Country code
144 countryName : Name of the country
145 isO2 : country name in iso2 standard
146 isO3 : country name in iso3 standard
147 sellCurrency : Sell Currency in given country
148 {{/code}}
149
150
151 == Important ==
152
153 {{error}}
154 It's Important to in every other request header, put Auth token
155
156 **Key **- Authorization
157
158 **Value **- Bearer Token what is given in this response. (Authorization type Bearer Token)
159
160
161 **also note in headers that:**
162
163 Content-Type - application/json
164
165 **Key - **X-nugios-timezone
166
167 **Value **- 240
168 {{/error}}