Changes for page 1. SearchHotelPrices

Last modified by Giorgi Mdivnishvili on 2024/11/06 10:47

From version 9.1
edited by Giorgi Mdivnishvili
on 2023/12/26 15:35
Change comment: There is no comment for this version
To version 15.1
edited by Giorgi Mdivnishvili
on 2024/04/11 18:00
Change comment: There is no comment for this version

Summary

Details

Page properties
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-14T08:09:42.770Z",
42 - "checkInDateTo": "2023-12-14T08:09:42.770Z",
43 - "checkOutDate": "2023-12-14T08: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-15T08:00:00.000Z",
86 - "checkInDateTo": "2024-02-20T08:00:00.000Z",
109 + "checkInDate": "2024-02-15",
110 + "checkInDateTo": "2024-02-20",
87 87  
88 88   "stayDays": 4,
89 89   "stayDaysTo": 6,
... ... @@ -378,7 +378,57 @@
378 378  {{/code}}
379 379  
380 380  
405 +**Overview:** The Paging and Caching mechanism is designed to efficiently manage data retrieval in a paginated format. This mechanism is essential for handling large datasets by dividing the data into manageable pages, thereby optimizing the performance and scalability of data retrieval operations.
381 381  
407 +**Initial Request:**
408 +
409 +* **Purpose**: The first request initiates the paging process and is designed to fetch the initial set of data without utilizing a pagingId.
410 +* **Parameters**:
411 +** pagingId: Should be set to an empty string ("") to indicate that this is the initial request.
412 +** pageNumber: Indicates the specific page of data to retrieve, starting with 1.
413 +** pageRowCount: Specifies the number of results to be included on each page.
414 +
415 +**Example - First Request**:
416 +
417 +{{{{
418 + "pagingId": "",
419 +  "pageNumber": 1,
420 +  "pageRowCount": 10
421 +}
422 +}}}
423 +
424 +
425 +**Subsequent Requests with Caching:**
426 +
427 +* **Purpose**: Following the initial data retrieval, subsequent requests utilize the pagingId obtained from the previous response. This pagingId serves as a cache identifier, enabling the system to quickly access the relevant dataset and efficiently paginate through the data.
428 +* **Cache Utilization**:
429 +** Upon receiving a response, a pagingId value is provided. This pagingId should be used in subsequent requests to reference the cached data.
430 +** To navigate through the dataset, adjust the pageNumber while keeping the pagingId constant.
431 +** To refresh the dataset and clear the cache, initiate a new request without a pagingId.
432 +
433 +
434 +**Example - Request with Caching**:
435 +
436 +{{{ {
437 + "pagingId": "80",
438 + "pageNumber": 2, // Adjusted to fetch the next page
439 + "pageRowCount": 10
440 + }
441 +}}}
442 +
443 +
444 +**Cache Management:**
445 +
446 +* Clearing the cache and fetching a fresh set of data requires sending a new request with the pagingId parameter omitted or set to an empty string. This action resets the pagination and caching context.
447 +
448 +**Implementation Notes**:
449 +
450 +* The paging and caching mechanism significantly enhances data retrieval efficiency by minimizing server load and optimizing response times.
451 +* Developers should ensure that the pagingId is correctly managed between requests to maintain session continuity and data consistency.
452 +
453 +This documentation outlines the procedural framework for implementing a robust paging and caching strategy within data retrieval systems, detailing parameter usage and operational best practices for both initial and subsequent data fetch operations.
454 +
455 +
382 382  == Important ==
383 383  
384 384  {{error}}