Changes for page 1. SearchHotelPrices
Last modified by Giorgi Mdivnishvili on 2024/11/06 10:47
From version 14.1
edited by Giorgi Mdivnishvili
on 2024/04/11 17:55
on 2024/04/11 17:55
Change comment:
There is no comment for this version
To version 2.1
edited by Giorgi Mdivnishvili
on 2023/12/14 12:07
on 2023/12/14 12:07
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 - 1.SearchHotelPrices1 +SearchHotelPrices - Content
-
... ... @@ -6,37 +6,13 @@ 6 6 7 7 = Method Description = 8 8 9 +The initial method of the integration process is authorization. You will be provided with a test user username and password to generate the access token that you will need to pass in all the following methods. 9 9 10 -This method is specifically designed for the retrieval of hotel pricing information. It supports queries for both current date prices and for prices over a specified date range. 11 11 12 - **Parameters:**12 +== Endpoint URL - [GET] == 13 13 14 -* stayDays (integer): Indicates the starting point of the stay duration in days. A default value of 0 signifies immediate date pricing retrieval. 15 -* stayDaysTo (integer): Specifies the endpoint of the stay duration in days. The initial value is set to 0, indicating the system will fetch prices for the immediate date by default. 16 - 17 -**Constraints:** 18 - 19 -* The difference between stayDays and stayDaysTo must not exceed 7 days. This limitation is imposed to optimize the query performance and ensure the relevance of the returned data. 20 - 21 -**Implementation:** 22 - 23 -1. **Query Initialization**: Begin by defining the stayDays and stayDaysTo parameters to frame your search criteria. These parameters enable the system to understand the desired duration for which the hotel pricing information is required. 24 -1. **Data Retrieval**: Execute the method with the provided parameters. The system processes the input and queries the database for hotel prices that match the specified duration, taking into account the constraint on the maximum duration difference. 25 -1. **Result Processing**: Upon successful retrieval, the system presents the hotel pricing data. This data is either for the current date (when both parameters are set to 0) or for the defined date range, adhering to the specified duration constraints. 26 - 27 -**Example Usage:** (Examples of API calls or function usage would typically be provided here, demonstrating how to correctly implement the method to retrieve hotel prices based on immediate dates or a specified date range.) 28 - 29 -**Notes:** 30 - 31 -* This method ensures efficient access to hotel pricing information, catering to both immediate and short-term planning needs by leveraging a simple, parameter-driven query mechanism. 32 - 33 -This documentation provides a detailed guide for developers on utilizing the hotel pricing retrieval method, emphasizing parameter usage, operational constraints, and the process flow for executing queries and handling results. 34 - 35 - 36 -== Endpoint URL - [POST] == 37 - 38 38 {{info}} 39 -[[http s:~~/~~/integration.kazunion.com/api/OnlyHotelPackages/SearchHotelPrices>>https://integration.kazunion.com/api/OnlyHotelPackages/SearchHotelPrices]]15 +[[http:~~/~~/online-api.kazunion.com/api/Catalogue/GetHotels>>http://online-api.kazunion.com/api/Catalogue/GetHotels]] 40 40 {{/info}} 41 41 42 42 ... ... @@ -44,106 +44,22 @@ 44 44 45 45 (% class="box infomessage" %) 46 46 ((( 47 -None 48 -))) 23 + 49 49 50 -== Request Body == 25 +|**Key**|**Value**|**Request URL** 26 +|CountryCode|AE|[[http:~~/~~/online-api.kazunion.com/api/Catalogue/GetHotels?countryCode=AE>>http://online-api.kazunion.com/api/Catalogue/GetHotels?countryCode=AE]] 51 51 52 -{{code language="Json"}} 53 -{ 54 - "countryCode": "string", 55 - "locations": [ 56 - { 57 - "type": "string", 58 - "parent": "string", 59 - "label": "string", 60 - "subLabel": "string", 61 - "value": "string", 62 - "tag": "string" 63 - } 64 - ], 65 - "checkInDate": "2023-12-14", 66 - "checkInDateTo": "2023-12-14", 67 - "checkOutDate": "2023-12-14", 68 - "stayDays": 0, 69 - "stayDaysTo": 0, 70 - "adults": 0, 71 - "children": 0, 72 - "childrenAges": [ 73 - 0 74 - ], 75 - "extendedSearch": true, 76 - "totalPriceFrom": 0, 77 - "totalPriceTo": 0, 78 - "recommended": true, 79 - "popular": true, 80 - "freeSale": true, 81 - "groupByHotel": true, 82 - "hotelCodes": [ 83 - "string" 84 - ], 85 - "mealPlans": [ 86 - "string" 87 - ], 88 - "hotelClasses": [ 89 - "string" 90 - ], 91 - "hotelTypes": [ 92 - "CityHotel" 93 - ], 94 - "hotelServices": [ 95 - "HasAlcohol" 96 - ], 97 - "pagingId": "string", 98 - "pageNumber": 0, 99 - "pageRowCount": 0 100 -} 101 -{{/code}} 28 + 29 +))) 102 102 103 -== Request Body example == 104 104 32 +== Request Body == 105 105 106 106 {{code language="Json"}} 107 -{ 108 - "countryCode": "AE", 109 - "checkInDate": "2024-02-15", 110 - "checkInDateTo": "2024-02-20", 111 - 112 - "stayDays": 4, 113 - "stayDaysTo": 6, 114 - "adults": 1, 115 - "children": 1, 116 - "childrenAges": [ 117 - 1 118 - ], 119 - "extendedSearch": false, 120 - "totalPriceFrom": 10, 121 - "totalPriceTo": 10000, 122 - "recommended": false, 123 - "popular": true, 124 - "freeSale": true, 125 - "groupByHotel": true, 126 - "hotelCodes": [ 127 - 128 - ], 129 - "mealPlans": [ 130 - 131 - ], 132 - "hotelClasses": [ 133 - 134 - ], 135 - "hotelTypes": [ 136 - 137 - ], 138 - "hotelServices": [ 139 - 140 - ], 141 - "pagingId": "", 142 - "pageNumber": 3, 143 - "pageRowCount": 10 144 -} 35 +none 145 145 {{/code}} 146 146 38 + 147 147 == Response Body == 148 148 149 149 {{code language="json"}} ... ... @@ -171,253 +171,81 @@ 171 171 {{/code}} 172 172 173 173 174 -=== Response Body example ===66 +=== example === 175 175 176 176 {{code language="Json"}} 177 177 { 178 - "packages": [ 179 - { 180 - "id": "onlyhotel:c4e23e7e-3d54-4efa-a3db-88508230ce91:504f63ca-6dd5-4d84-8245-cf7e77ccff73", 181 - "priceCurrency": "USD", 182 - "totalPrice": 381.7, 183 - "agentCommissionPercent": 0.0, 184 - "agentCommissionAmount": 0.0, 185 - "hotel": { 186 - "hotelPriceId": "504f63ca-6dd5-4d84-8245-cf7e77ccff73", 187 - "providerId": 13, 188 - "hotelName": "Golden Tulip Al Barsha Hotel", 189 - "hotelCode": "ed0820c5-29b0-4e1b-8bcf-9f3c181e7961", 190 - "nigths": 4, 191 - "mealPlan": "RO", 192 - "hotelClass": "4", 193 - "availabilityType": "FreeSale", 194 - "availableRoomsCount": 0, 195 - "fewRooms": true, 196 - "roomCategoryCode": "e63ea5ac-4883-4059-bb0a-795a534bbbfb", 197 - "roomCategoryName": "Superior Twin", 198 - "placementTypeName": "SNGL + CHILD(6-11.99)sharing", 199 - "checkInDate": "2024-02-17T08:00:00.000Z", 200 - "checkOutDate": "2024-02-21T08:00:00.000Z", 201 - "adults": 1, 202 - "children": 1, 203 - "districtUID": "4c65f6ed-902b-4fd8-9419-af7884c22c5e", 204 - "districtName": "Al Barsha", 205 - "cityUID": "f5185fa3-3f56-44ed-bf6b-80386a33caa2", 206 - "cityName": "Dubai", 207 - "countryCode": "AE", 208 - "countryName": "United Arab Emirates", 209 - "hasAlcohol": true, 210 - "hasFreeWifi": true, 211 - "hasMetro": false, 212 - "hasPool": true, 213 - "hasMall": false, 214 - "cancellationPolicyDescription": "Cancellation Policy: 15 Day Before Arrival: 100.00 %, Early Departure: 100.00 %, NoShow: 100.00 %", 215 - "cancellationPolicy": { 216 - "noShowChargeValue": 100.0, 217 - "noShowChargeValueType": "%", 218 - "earlyDepartureChargeValue": 100.0, 219 - "earlyDepartureChargeValueType": "%", 220 - "conditions": [ 221 - { 222 - "timeunits": 15, 223 - "timeunitType": "Day", 224 - "timeOffsetTypeName": "Before Arrival", 225 - "chargeValue": 100.0, 226 - "chargeValueType": "%" 227 - } 228 - ] 229 - } 230 - }, 231 - "extraServices": [] 232 - }, 70 + "hotelCode": "cfbca5b5-4090-4bcd-805a-463d83423b86", 71 + "hotelName": "Ramada Abu Dhabi Corniche", 72 + "hotelClass": "4", 73 + "cityUID": "28c794fe-3c7e-4da2-ba93-f24bd3d4730d", 74 + "countryCode": "AE", 75 + "districtUID": "ee402984-6d1d-4fcf-915d-f31b14fa8b0f", 76 + "cityName": "Abu Dhabi", 77 + "districtName": "Abu Dhabi", 78 + "hotelType": "CityHotel", 79 + "latitude": "24.503759", 80 + "longitude": "54.374577", 81 + "hasAlcohol": false, 82 + "hasFreeWifi": true, 83 + "hasMetro": false, 84 + "hasPool": true, 85 + "hasMall": false 86 + }, 87 + { 88 + "hotelCode": "c64b6082-2337-4519-8c33-4bcdef76b16b", 89 + "hotelName": "Emirates Palace Mandarin Oriental, Abu Dhabi", 90 + "hotelClass": "5", 91 + "cityUID": "28c794fe-3c7e-4da2-ba93-f24bd3d4730d", 92 + "countryCode": "AE", 93 + "districtUID": "ee402984-6d1d-4fcf-915d-f31b14fa8b0f", 94 + "cityName": "Abu Dhabi", 95 + "districtName": "Abu Dhabi", 96 + "hotelType": "BeachHotel", 97 + "latitude": "24.461556", 98 + "longitude": "54.317404", 99 + "hasAlcohol": false, 100 + "hasFreeWifi": true, 101 + "hasMetro": false, 102 + "hasPool": true, 103 + "hasMall": false 104 + }, 233 233 {{/code}} 234 234 235 235 236 236 === Schema === 237 237 238 -{{success}} 239 -SearchOnlyHotelPackagesResponse{ 240 - 241 -|packages|[ 242 -nullable: trueOnlyHotelPackage{((( 243 -|id|string 244 -nullable: true 245 -|priceCurrency|string 246 -nullable: true 247 -|totalPrice|number($double) 248 -|agentCommissionPercent|number($double) 249 -|agentCommissionAmount|number($double) 250 -|hotel|PackageHotel{((( 251 -|hotelPriceId|string 252 -nullable: true 253 -|providerId|integer($int32) 254 -|hotelName|string 255 -nullable: true 256 -|hotelCode|string 257 -nullable: true 258 -|nigths|integer($int32) 259 -|mealPlan|string 260 -nullable: true 261 -|hotelClass|string 262 -nullable: true 263 -|availabilityType|RoomAvailabilityTypeEnumstringEnum: 264 -[ OnRequest, FreeSale, StopSale ] 265 -|availableRoomsCount|integer($int32) 266 -|fewRooms|boolean 267 -|roomCategoryCode|string 268 -nullable: true 269 -|roomCategoryName|string 270 -nullable: true 271 -|placementTypeName|string 272 -nullable: true 273 -|placementDescription|string 274 -nullable: true 275 -|checkInDate|string($date-time) 276 -|checkOutDate|string($date-time) 277 -|adults|integer($int32) 278 -|children|integer($int32) 279 -|districtUID|string($uuid) 280 -nullable: true 281 -|districtName|string 282 -nullable: true 283 -|cityUID|string($uuid) 284 -nullable: true 285 -|cityName|string 286 -nullable: true 287 -|countryCode|string 288 -nullable: true 289 -|countryName|string 290 -nullable: true 291 -|hasAlcohol|boolean 292 -|hasFreeWifi|boolean 293 -|hasMetro|boolean 294 -|hasPool|boolean 295 -|hasMall|boolean 296 -|cancellationPolicyDescription|string 297 -nullable: true 298 -|cancellationPolicy|CancellationPolicyExchange{((( 299 -|cancellationPolicyCode|string 300 -nullable: true 301 -|noShowChargeValue|number($double) 302 -nullable: true 303 -|noShowChargeValueType|string 304 -nullable: true 305 -|earlyDepartureChargeValue|number($double) 306 -nullable: true 307 -|earlyDepartureChargeValueType|string 308 -nullable: true 309 -|conditions|[ 310 -nullable: trueCancellationPolicyConditionExchange{((( 311 -|timeunits|integer($int32) 312 -|timeunitType|string 313 -nullable: true 314 -|timeOffsetTypeName|string 315 -nullable: true 316 -|chargeValue|number($double) 317 -nullable: true 318 -|chargeValueType|string 319 -nullable: true 320 - 110 +{{code language="none"}} 111 +[Hotel{ 112 +hotelCode string 113 +nullable: true 114 +hotelName string 115 +nullable: true 116 +hotelClass string 117 +nullable: true 118 +cityUID string($uuid) 119 +nullable: true 120 +countryCode string 121 +nullable: true 122 +countryName string 123 +nullable: true 124 +districtUID string($uuid) 125 +nullable: true 126 +cityName string 127 +nullable: true 128 +districtName string 129 +nullable: true 130 +hotelType HotelTypeEnumstring 131 +Enum: 132 +[ CityHotel, BeachHotel, SecondLineBeach ] 133 +latitude string 134 +nullable: true 135 +longitude string 136 +nullable: true 137 +hasAlcohol boolean 138 +hasFreeWifi boolean 139 +hasMetro boolean 140 +hasPool boolean 141 +hasMall boolean 321 321 }] 322 -))) 323 - 324 -} 325 -))) 326 - 327 -} 328 -))) 329 -|extraServices|[ 330 -nullable: trueHotelExtraServiceBase{((( 331 -|extraServiceCode|string 332 -nullable: true 333 -|extraServiceTypeCode|string 334 -nullable: true 335 -|isMandatory|integer($int32) 336 -|extraServiceName|string 337 -nullable: true 338 -|minimalServiceAmount|number($double) 339 -|includedPriceCode|string 340 -nullable: true 341 -|prices|[ 342 -nullable: trueHotelExtraServicePriceBase{((( 343 -|extraServicePriceCode|string 344 -nullable: true 345 -|displayName|string 346 -nullable: true 347 -|restrictionInfo|string 348 -nullable: true 349 -|additionalInfo|string 350 -nullable: true 351 -|price|number($double) 352 -|extraPrice|number($double) 353 -|currency|string 354 -nullable: true 355 - 356 -}] 357 -))) 358 - 359 -}] 360 -))) 361 - 362 -}] 363 -))) 364 -|pagingId|string 365 -nullable: true 366 -|pageNumber|integer($int64) 367 -|pageCount|integer($int64) 368 - 369 -} 370 -{{/success}} 371 - 372 - 373 -== Definitions == 374 - 375 - 376 -=== Paging and Caching === 377 - 378 -During the first request, Paging id must be empty like this ( "pagingId": "",) pagenumber is the number of the page, pagerowcount means number of the given result in one page. So in the first request we can search like this: 379 - 380 - 381 -==== first request ==== 382 - 383 -{{code language="Json"}} 384 - { 385 - "pagingId": "", 386 - "pageNumber": 1, 387 - "pageRowCount":10 388 - } 389 389 {{/code}} 390 - 391 - 392 -==== Request with caching ==== 393 - 394 -as we receive response, in the end we can see pagingId- number, chich we can use for caching, and then just switch pagenumbers. for cleaning cache, it's important to make new request without pagingID 395 - 396 -{{code language="Json"}} 397 - { 398 - "pagingId": "80", 399 - "pageNumber": 1, 400 - "pageRowCount":10 401 - } 402 -{{/code}} 403 - 404 - 405 - 406 -== Important == 407 - 408 -{{error}} 409 -It's Important to in every other request header, put Auth token 410 - 411 -**Key **- Authorization 412 - 413 -**Value **- Bearer Token what is given in this response. 414 - 415 - 416 -**also note in headers that:** 417 - 418 -Content-Type - application/json 419 - 420 -**Key - **X-nugios-timezone 421 - 422 -**Value **- 240 423 -{{/error}}