Changes for page 1. SearchHotelPrices
Last modified by Giorgi Mdivnishvili on 2024/11/06 10:47
From version 4.1
edited by Giorgi Mdivnishvili
on 2023/12/14 12:18
on 2023/12/14 12:18
Change comment:
There is no comment for this version
To 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
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 -SearchHotelPrices 1 +1. SearchHotelPrices - Content
-
... ... @@ -6,13 +6,37 @@ 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. 10 10 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:** 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 + 12 12 == Endpoint URL - [POST] == 13 13 14 14 {{info}} 15 -[[https:~~/~~/ online-api.kazunion.com/api/OnlyHotelPackages/SearchHotelPrices>>https://online-api.kazunion.com/api/OnlyHotelPackages/SearchHotelPrices]]39 +[[https:~~/~~/integration.kazunion.com/api/OnlyHotelPackages/SearchHotelPrices>>https://integration.kazunion.com/api/OnlyHotelPackages/SearchHotelPrices]] 16 16 {{/info}} 17 17 18 18 ... ... @@ -38,9 +38,9 @@ 38 38 "tag": "string" 39 39 } 40 40 ], 41 - "checkInDate": "2023-12-14 T08:09:42.770Z",42 - "checkInDateTo": "2023-12-14 T08:09:42.770Z",43 - "checkOutDate": "2023-12-14 T08:09:42.770Z",65 + "checkInDate": "2023-12-14", 66 + "checkInDateTo": "2023-12-14", 67 + "checkOutDate": "2023-12-14", 44 44 "stayDays": 0, 45 45 "stayDaysTo": 0, 46 46 "adults": 0, ... ... @@ -82,8 +82,8 @@ 82 82 {{code language="Json"}} 83 83 { 84 84 "countryCode": "AE", 85 - "checkInDate": "2024-02-15 T08:00:00.000Z",86 - "checkInDateTo": "2024-02-20 T08:00:00.000Z",109 + "checkInDate": "2024-02-15", 110 + "checkInDateTo": "2024-02-20", 87 87 88 88 "stayDays": 4, 89 89 "stayDaysTo": 6, ... ... @@ -211,127 +211,189 @@ 211 211 212 212 === Schema === 213 213 214 -{{c odelanguage="none"}}238 +{{success}} 215 215 SearchOnlyHotelPackagesResponse{ 216 -packages [ 217 -nullable: true 218 -OnlyHotelPackage{ 219 -id string 220 -nullable: true 221 -priceCurrency string 222 -nullable: true 223 -totalPrice number($double) 224 -agentCommissionPercent number($double) 225 -agentCommissionAmount number($double) 226 -hotel PackageHotel{ 227 -hotelPriceId string 228 -nullable: true 229 -providerId integer($int32) 230 -hotelName string 231 -nullable: true 232 -hotelCode string 233 -nullable: true 234 -nigths integer($int32) 235 -mealPlan string 236 -nullable: true 237 -hotelClass string 238 -nullable: true 239 -availabilityType RoomAvailabilityTypeEnumstring 240 -Enum: 241 -[ OnRequest, FreeSale, StopSale ] 242 -availableRoomsCount integer($int32) 243 -fewRooms boolean 244 -roomCategoryCode string 245 -nullable: true 246 -roomCategoryName string 247 -nullable: true 248 -placementTypeName string 249 -nullable: true 250 -placementDescription string 251 -nullable: true 252 -checkInDate string($date-time) 253 -checkOutDate string($date-time) 254 -adults integer($int32) 255 -children integer($int32) 256 -districtUID string($uuid) 257 -nullable: true 258 -districtName string 259 -nullable: true 260 -cityUID string($uuid) 261 -nullable: true 262 -cityName string 263 -nullable: true 264 -countryCode string 265 -nullable: true 266 -countryName string 267 -nullable: true 268 -hasAlcohol boolean 269 -hasFreeWifi boolean 270 -hasMetro boolean 271 -hasPool boolean 272 -hasMall boolean 273 -cancellationPolicyDescription string 274 -nullable: true 275 -cancellationPolicy CancellationPolicyExchange{ 276 -cancellationPolicyCode string 277 -nullable: true 278 -noShowChargeValue number($double) 279 -nullable: true 280 -noShowChargeValueType string 281 -nullable: true 282 -earlyDepartureChargeValue number($double) 283 -nullable: true 284 -earlyDepartureChargeValueType string 285 -nullable: true 286 -conditions [ 287 -nullable: true 288 -CancellationPolicyConditionExchange{ 289 -timeunits integer($int32) 290 -timeunitType string 291 -nullable: true 292 -timeOffsetTypeName string 293 -nullable: true 294 -chargeValue number($double) 295 -nullable: true 296 -chargeValueType string 297 -nullable: true 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 + 298 298 }] 322 +))) 323 + 299 299 } 325 +))) 326 + 300 300 } 301 - extraServices [302 - nullable:true303 -HotelExtraServiceBase{ 304 -extraServiceCode 305 -nullable: 306 -extraServiceTypeCode 307 -nullable: 308 -isMandatory 309 -extraServiceName 310 -nullable: 311 -minimalServiceAmount 312 -includedPriceCode 313 -nullable: 314 -prices 315 -nullable: 316 - HotelExtraServicePriceBase{317 - extraServicePriceCode string318 - nullable:true319 - displayNamestring320 - nullable:true321 - restrictionInfo string322 -n ullable:true323 - additionalInfo string324 -nu llable: true325 - price326 - extraPriceumber($double)327 - currency string328 - nullable: true328 +))) 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 + 329 329 }] 357 +))) 358 + 330 330 }] 360 +))) 361 + 331 331 }] 332 -pagingId string 333 -nullable: true 334 -pageNumber integer($int64) 335 -pageCount integer($int64) 363 +))) 364 +|pagingId|string 365 +nullable: true 366 +|pageNumber|integer($int64) 367 +|pageCount|integer($int64) 368 + 336 336 } 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 + } 337 337 {{/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}}