Wiki source code of 4. Hotel Search

Version 22.1 by Giorgi Mdivnishvili on 2024/02/29 11:19

Hide last authors
Giorgi Mdivnishvili 9.1 1 {{box cssClass="floatinginfobox" title="**Contents**"}}
Giorgi Mdivnishvili 1.1 2
3
Giorgi Mdivnishvili 9.1 4 {{toc/}}
5 {{/box}}
6
Giorgi Mdivnishvili 8.1 7 = Method Description =
8
9
Giorgi Mdivnishvili 1.1 10 With the parameters provided in GetHotels and GetCities reponse, it’s avaible to search hotels with the desired parameters in Hotels Search.
11
12
Giorgi Mdivnishvili 4.1 13 endpoint : [[https:~~/~~/testapi.rustaronline.com/api/Hotels/Search>>url:https://testapi.rustaronline.com/api/Hotels/Search]]
Giorgi Mdivnishvili 1.1 14
Giorgi Mdivnishvili 4.1 15 Method POST
Giorgi Mdivnishvili 3.1 16
Giorgi Mdivnishvili 7.1 17
Giorgi Mdivnishvili 8.1 18 == **Request example:** ==
Giorgi Mdivnishvili 4.1 19
Giorgi Mdivnishvili 3.1 20 {{code language="Json"}}
21 {
Giorgi Mdivnishvili 7.1 22 "MaxResultCount":2,
23 "MaxHotelCount":2,
24 "contragentContactUID": "55a2fcfb-8378-4b73-ab1e-bc8e5c836f4e",
25 "countryMask": "TR",
26 "CheckInDate": "2024-05-06",
27 "CheckOutDate": "2024-05-07",
28 "Adults": 1,
29 "Children": 0,
30 "ChildrenAges": "",
31
Giorgi Mdivnishvili 2.1 32 "arrivalCities": [
Giorgi Mdivnishvili 1.1 33 {
Giorgi Mdivnishvili 7.1 34 "cityUID": "e1344ba0-5273-4fc1-b6c4-72446260f430"
Giorgi Mdivnishvili 2.1 35
Giorgi Mdivnishvili 1.1 36 }
37 ]
Giorgi Mdivnishvili 7.1 38 }
Giorgi Mdivnishvili 1.1 39
Giorgi Mdivnishvili 7.1 40 {{/code}}
41
42
Giorgi Mdivnishvili 22.1 43 == Definition of Request Parameters ==
44
Giorgi Mdivnishvili 11.1 45 (% class="table-bordered" %)
Giorgi Mdivnishvili 13.1 46 (% class="info" %)|**Parameter**|**Value**|**Description**
47 |** "MaxResultCount"**|2,|Maximum number of results to display
48 |** "MaxHotelCount"**|2,|Maximum number of hotels to display results
49 |** "contragentContactUID"**| "55a2fcfb-8378-4b73-ab1e-bc8e5c836f4e",|A unique code assigned to each application user
Giorgi Mdivnishvili 17.1 50 |** "countryMask"**| "TR",|Country code, which can be retrieved in [[Get Cities>>Get Cities]] method, in parameter [countrycode]
Giorgi Mdivnishvili 13.1 51 |** "CheckInDate"**| "2024-05-06",|Check in date "YY-MM-DD"
52 |** "CheckOutDate"**| "2024-05-07",|Check out date "YY-MM-DD"
53 |** "Adults"**| 1,|number of Adults
54 |** "Children"**| 0,|Number of children
55 |** "ChildrenAges"**| "",|children ages, the must be separated with ","
Giorgi Mdivnishvili 15.1 56 |** "cityUID"**| "e1344ba0-5273-4fc1-b6c4-72446260f430"|Code of the city, which is available in method [[Get Cities>>Get Cities]] in parameter [cityid]
Giorgi Mdivnishvili 10.1 57
Giorgi Mdivnishvili 16.1 58 == ==
59
60 (% class="wikigeneratedid" %)
61 In case there is need to display hotels in whole country, no mater cities, it's possible to remove "arrivalCities" parameter.
62
63
Giorgi Mdivnishvili 8.1 64 == Response Example ==
Giorgi Mdivnishvili 7.1 65
66 {{code language="json"}}
67 {
68 "result": [
69 {
70 "resultID": 1656436810005000001,
71 "hotelID": 871186,
72 "providerID": 5,
73 "roomCategoryCode": "ECO",
74 "roomCategoryName": "Economic Room",
75 "mealPlanName": "BB",
76 "placementType": 1,
77 "placementTypeName": "1 Adult",
78 "priceCode": "BASERATE BB ECO",
79 "priceCurrency": "EUR",
80 "priceCurrencySrc": "EUR",
81 "availability": 3,
82 "availableRoomsCount": 1,
83 "totalSellPriceSrc": 40.70,
84 "totalSellPrice": 40.70,
85 "totalPriceSurcharge": 0.00,
86 "cancellationPolicyDescription": "Cancellation Policy: Non refundable",
87 "cancellationPolicy": {
88 "noShowChargeValue": 100.00,
89 "noShowChargeValueType": "%",
90 "earlyDepartureChargeValue": 100.00,
91 "earlyDepartureChargeValueType": "%",
92 "conditions": [
93 {
94 "timeunits": 365,
95 "timeunitType": "Day",
96 "timeOffsetTypeName": "Before Arrival",
97 "chargeValue": 100.00,
98 "chargeValueType": "%"
99 }
100 ]
101 },
102 "searchId": 1656436810,
103 "hotelCode": "10b7bc34-2a03-495e-94bc-1092b07823f7",
104 "id": 1656436810005000001,
105 "hotel": {
106 "hotelCode": "10b7bc34-2a03-495e-94bc-1092b07823f7",
107 "hotelName": "Istanbul Holiday Hotel",
108 "hotelClass": "***",
109 "cityId": "e1344ba0-5273-4fc1-b6c4-72446260f430",
110 "cityName": "Istanbul",
111 "countryCode": "TR",
112 "districtId": "6ca0ed7e-7412-4e45-85b5-dd0d74cabc62",
113 "districtName": "Fatih",
114 "note": ""
115 },
116 "adults": 1,
117 "children": 0,
118 "childrenAges": "",
119 "childrenExeptInfants": 0,
120 "checkInDate": "2024-05-06T00:00:00",
121 "checkOutDate": "2024-05-07T00:00:00",
122 "includedExtrasAmount": 0,
123 "extraServices": []
124 },
125 {
126 "resultID": 1656436810005000003,
127 "hotelID": 871186,
128 "providerID": 5,
129 "roomCategoryCode": "STANDART-2",
130 "roomCategoryName": "Standart Double or Twin Room",
131 "mealPlanName": "BB",
132 "placementType": 1,
133 "placementTypeName": "1 Adult",
134 "priceCode": "BASERATE BB STANDART",
135 "priceCurrency": "EUR",
136 "priceCurrencySrc": "EUR",
137 "availability": 3,
138 "availableRoomsCount": 1,
139 "totalSellPriceSrc": 53.90,
140 "totalSellPrice": 53.90,
141 "totalPriceSurcharge": 0.00,
142 "cancellationPolicyDescription": "Cancellation Policy: Non refundable",
143 "cancellationPolicy": {
144 "noShowChargeValue": 100.00,
145 "noShowChargeValueType": "%",
146 "earlyDepartureChargeValue": 100.00,
147 "earlyDepartureChargeValueType": "%",
148 "conditions": [
149 {
150 "timeunits": 365,
151 "timeunitType": "Day",
152 "timeOffsetTypeName": "Before Arrival",
153 "chargeValue": 100.00,
154 "chargeValueType": "%"
155 }
156 ]
157 },
158 "searchId": 1656436810,
159 "hotelCode": "10b7bc34-2a03-495e-94bc-1092b07823f7",
160 "id": 1656436810005000003,
161 "hotel": {
162 "hotelCode": "10b7bc34-2a03-495e-94bc-1092b07823f7",
163 "hotelName": "Istanbul Holiday Hotel",
164 "hotelClass": "***",
165 "cityId": "e1344ba0-5273-4fc1-b6c4-72446260f430",
166 "cityName": "Istanbul",
167 "countryCode": "TR",
168 "districtId": "6ca0ed7e-7412-4e45-85b5-dd0d74cabc62",
169 "districtName": "Fatih",
170 "note": ""
171 },
172 "adults": 1,
173 "children": 0,
174 "childrenAges": "",
175 "childrenExeptInfants": 0,
176 "checkInDate": "2024-05-06T00:00:00",
177 "checkOutDate": "2024-05-07T00:00:00",
178 "includedExtrasAmount": 0,
179 "extraServices": []
180 }
181 ],
182 "error": false
Giorgi Mdivnishvili 2.1 183 }
184 {{/code}}
Giorgi Mdivnishvili 1.1 185
Giorgi Mdivnishvili 18.1 186
Giorgi Mdivnishvili 22.1 187 == Definition of Response Parameters ==
Giorgi Mdivnishvili 18.1 188
189 (% class="table-bordered" %)
190 (% class="info" %)|**Parameter**|**value**|**Description**
191 |**{**| |
Giorgi Mdivnishvili 19.1 192 |** "resultID"**| 1656436810005000001,|Unique ID of the Result
193 |** "hotelID"**| 871186,|Unique ID of the hotel
194 |** "providerID"**| 5,|provider id - (system internal)
195 |** "roomCategoryCode"**| "ECO",|Special code for Room Category type
196 |** "roomCategoryName"**| "Economic Room",|Name of the Room Category Type - definition of the ** "roomCategoryCode"**
197 |** "mealPlanName"**| "BB",|Meal Plan code
198 |** "placementType"**| 1,|Placement type code - in this case  1 means  single
199 |** "placementTypeName"**| "1 Adult",|Placement type name - definition of the ** "placementType"**
200 |** "priceCode"**| "BASERATE BB ECO",|price code for the current option
Giorgi Mdivnishvili 18.1 201 |** "priceCurrency"**| "EUR",|
202 |** "priceCurrencySrc"**| "EUR",|
Giorgi Mdivnishvili 19.1 203 |** "availability"**| 3,|Availability
204 |** "availableRoomsCount"**| 1,|Number of available rooms for the current type of options
Giorgi Mdivnishvili 18.1 205 |** "totalSellPriceSrc"**| 40.70,|
206 |** "totalSellPrice"**| 40.70,|
207 |** "totalPriceSurcharge"**| 0.00,|
Giorgi Mdivnishvili 19.1 208 |** "cancellationPolicyDescription"**| "Cancellation Policy  Non refundable",|TEXT DESCRIPTION OF THE CANCELLATION POLICY
Giorgi Mdivnishvili 18.1 209 |** "cancellationPolicy"**| {|
210 |** "noShowChargeValue"**| 100.00,|
211 |** "noShowChargeValueType"**| "%",|
212 |** "earlyDepartureChargeValue"**| 100.00,|
213 |** "earlyDepartureChargeValueType"**| "%",|
214 |** "conditions"**| [|
215 |** {**| |
216 |** "timeunits"**| 365,|
217 |** "timeunitType"**| "Day",|
218 |** "timeOffsetTypeName"**| "Before Arrival",|
219 |** "chargeValue"**| 100.00,|
220 |** "chargeValueType"**| "%"|
221 |** }**| |
222 |** ]**| |
223 |** },**| |
Giorgi Mdivnishvili 19.1 224 |** "searchId"**| 1656436810,|search id of the hotel
225 |** "hotelCode"**| "10b7bc34-2a03-495e-94bc-1092b07823f7",|Unique ID of the Hotel. Full List of the hotels is available in [[Get Hotels>>Get Hotels]] method
Giorgi Mdivnishvili 18.1 226 |** "id"**| 1656436810005000001,|
227 |** "hotel"**| {|
Giorgi Mdivnishvili 20.1 228 |** "hotelCode"**| "10b7bc34-2a03-495e-94bc-1092b07823f7",|Unique ID of the Hotel. Full List of the hotels is available in [[Get Hotels>>Get Hotels]] method
229 |** "hotelName"**| "Istanbul Holiday Hotel",|Full name of the Hotel
230 |** "hotelClass"**| "~*~**",|Hotel Class in Stars
231 |** "cityId"**| "e1344ba0-5273-4fc1-b6c4-72446260f430",|Code of the city where  hotel is located, which is available in method [[Get Cities>>Get Cities]] in parameter [cityid]
232 |** "cityName"**| "Istanbul",|Full Name of the City
233 |** "countryCode"**| "TR",|Country code, which can be retrieved in [[Get Cities>>Get Cities]] method, in parameter [countrycode]
234 |** "districtId"**| "6ca0ed7e-7412-4e45-85b5-dd0d74cabc62",|District unique code, where hotel is located.
235 |** "districtName"**| "Fatih",|Full name of the District
236 |** "note"**| ""|Hotel note - this is optional
Giorgi Mdivnishvili 18.1 237 |** },**| |
Giorgi Mdivnishvili 20.1 238 |** "adults"**| 1,|Number of the adults
239 |** "children"**| 0,|Number of the children
240 |** "childrenAges"**| "",|in case of children, here will be their ages
Giorgi Mdivnishvili 18.1 241 |** "childrenExeptInfants"**| 0,|
Giorgi Mdivnishvili 20.1 242 |** "checkInDate"**| "2024-05-06T00000",|date of the check in
243 |** "checkOutDate"**| "2024-05-07T00000",|date of the check out
Giorgi Mdivnishvili 18.1 244 |** "includedExtrasAmount"**| 0,|
245 |** "extraServices"**| []|
246 |** },**| |