Changes for page 1. SearchHotelPrices

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

From version 17.1
edited by Giorgi Mdivnishvili
on 2024/11/06 10:46
Change comment: There is no comment for this version
To version 14.1
edited by Giorgi Mdivnishvili
on 2024/04/11 17:55
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -378,7 +378,7 @@
378 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 379  
380 380  
381 -first request
381 +==== first request ====
382 382  
383 383  {{code language="Json"}}
384 384   {
... ... @@ -402,89 +402,22 @@
402 402  {{/code}}
403 403  
404 404  
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.
406 406  
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 -**Example - Request with Caching**:
434 -
435 -{{{ {
436 - "pagingId": "80",
437 - "pageNumber": 2, // Adjusted to fetch the next page
438 - "pageRowCount": 10
439 - }
440 -}}}
441 -
442 -
443 -**Cache Management:**
444 -
445 -* 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.
446 -
447 -**Implementation Notes**:
448 -
449 -* The paging and caching mechanism significantly enhances data retrieval efficiency by minimizing server load and optimizing response times.
450 -* Developers should ensure that the pagingId is correctly managed between requests to maintain session continuity and data consistency.
451 -
452 -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.
453 -
454 -
455 -
456 -== Update ==
457 -
458 -
459 -~1. To identify whether the returned result is from a dynamic or static channel, a field 'isDynamic' has been added to the response. This field can have a value of TRUE or FALSE. Accordingly, if the hotel is from a dynamic channel, the response will show TRUE.
460 -
461 -
462 -{{code language="Json"}}
463 - {
464 - "isDynamic": false
465 - }
466 -
467 - {
468 - "isDynamic": True
469 - }
470 -{{/code}}
471 -
472 -
473 473  == Important ==
474 474  
475 475  {{error}}
476 -=== Implementing Authorization in Subsequent Requests ===
409 +It's Important to in every other request header, put Auth token
477 477  
478 -For every API request after the initial authentication, it's crucial to include the authorization token in the request header. This ensures your requests are authorized and can access the necessary resources. Here's how to properly include your token:
411 +**Key **- Authorization
479 479  
480 -* **Header Key:** Authorization
481 -* **Header Value:** Bearer [Your Token Here] - Use the bearer token provided in the initial authentication response. The authorization type should be specified as Bearer Token.
413 +**Value **- Bearer Token what is given in this response.
482 482  
483 -Additionally, to ensure your requests are properly formatted and recognized, include the following headers:
484 484  
485 -* **Content-Type:** Specify this header as application/json to indicate the format of the request body.
486 -* **Header Key:** X-nugios-timezone
487 -* **Header Value:** 240 - Adjust this value to match your local timezone offset in minutes.
416 +**also note in headers that:**
488 488  
489 -Incorporating these headers with their respective values is essential for the successful processing of your API requests.
418 +Content-Type - application/json
419 +
420 +**Key - **X-nugios-timezone
421 +
422 +**Value **- 240
490 490  {{/error}}