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
Change comment: There is no comment for this version
To version 4.1
edited by Giorgi Mdivnishvili
on 2023/12/14 12:18
Change comment: There is no comment for this version

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -1. SearchHotelPrices
1 +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:**
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 36  == Endpoint URL - [POST] ==
37 37  
38 38  {{info}}
39 -[[https:~~/~~/integration.kazunion.com/api/OnlyHotelPackages/SearchHotelPrices>>https://integration.kazunion.com/api/OnlyHotelPackages/SearchHotelPrices]]
15 +[[https:~~/~~/online-api.kazunion.com/api/OnlyHotelPackages/SearchHotelPrices>>https://online-api.kazunion.com/api/OnlyHotelPackages/SearchHotelPrices]]
40 40  {{/info}}
41 41  
42 42  
... ... @@ -62,9 +62,9 @@
62 62   "tag": "string"
63 63   }
64 64   ],
65 - "checkInDate": "2023-12-14",
66 - "checkInDateTo": "2023-12-14",
67 - "checkOutDate": "2023-12-14",
41 + "checkInDate": "2023-12-14T08:09:42.770Z",
42 + "checkInDateTo": "2023-12-14T08:09:42.770Z",
43 + "checkOutDate": "2023-12-14T08:09:42.770Z",
68 68   "stayDays": 0,
69 69   "stayDaysTo": 0,
70 70   "adults": 0,
... ... @@ -106,8 +106,8 @@
106 106  {{code language="Json"}}
107 107  {
108 108   "countryCode": "AE",
109 - "checkInDate": "2024-02-15",
110 - "checkInDateTo": "2024-02-20",
85 + "checkInDate": "2024-02-15T08:00:00.000Z",
86 + "checkInDateTo": "2024-02-20T08:00:00.000Z",
111 111  
112 112   "stayDays": 4,
113 113   "stayDaysTo": 6,
... ... @@ -235,189 +235,127 @@
235 235  
236 236  === Schema ===
237 237  
238 -{{success}}
214 +{{code language="none"}}
239 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 -
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
321 321  }]
322 -)))
323 -
324 324  }
325 -)))
326 -
327 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 -nullabletrue
345 -|displayName|string
346 -nullabletrue
347 -|restrictionInfo|string
348 -nullabletrue
349 -|additionalInfo|string
350 -nullable: true
351 -|price|number($double)
352 -|extraPrice|number($double)
353 -|currency|string
354 -nullabletrue
355 -
301 +extraServices [
302 +nullable: true
303 +HotelExtraServiceBase{
304 +extraServiceCode string
305 +nullable: true
306 +extraServiceTypeCode string
307 +nullable: true
308 +isMandatory integer($int32)
309 +extraServiceName string
310 +nullable: true
311 +minimalServiceAmount number($double)
312 +includedPriceCode string
313 +nullable: true
314 +prices [
315 +nullable: true
316 +HotelExtraServicePriceBase{
317 +extraServicePriceCode string
318 +nullable: true
319 +displayName string
320 +nullable: true
321 +restrictionInfo string
322 +nullable: true
323 +additionalInfo string
324 +nullable: true
325 +price number($double)
326 +extraPrice number($double)
327 +currency string
328 +nullable: true
356 356  }]
357 -)))
358 -
359 359  }]
360 -)))
361 -
362 362  }]
363 -)))
364 -|pagingId|string
365 -nullable: true
366 -|pageNumber|integer($int64)
367 -|pageCount|integer($int64)
368 -
332 +pagingId string
333 +nullable: true
334 +pageNumber integer($int64)
335 +pageCount integer($int64)
369 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}}