Changes for page SearchTourPackages - Basic Version
Last modified by Giorgi Mdivnishvili on 2024/07/11 12:45
From version 10.1
edited by Giorgi Mdivnishvili
on 2024/04/11 11:32
on 2024/04/11 11:32
Change comment:
There is no comment for this version
To version 16.1
edited by Giorgi Mdivnishvili
on 2024/04/15 18:39
on 2024/04/15 18:39
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 -SearchTourPackages - Basic version1 +SearchTourPackages - Basic Version - Content
-
... ... @@ -6,11 +6,32 @@ 6 6 7 7 = Method Description = 8 8 9 -Tour package mean, tour with hotel and flight together. Using this method gives data about full package availability with flight and hotel options. 10 10 11 - It'spossiblereceivedata as current dates, alsoindate rangesusing parameter"stayDays": 0, "stayDaysTo": 0. themaximum difference between the dayscanbe 7.Below you cansee examples.10 +=== Method Overview: Streamlined Tour Package Discovery and Booking === 12 12 12 +**Purpose:** This method outlines the most efficient process for locating and subsequently booking a tour package utilizing a minimal set of required parameters. It is designed to simplify the user interaction by reducing the complexity and volume of input data necessary for operation. 13 13 14 +**Procedure:** 15 + 16 +1. **Initialization**: Start by specifying the essential parameters. This approach is engineered to streamline the search and booking process, focusing on the core data elements critical for identifying suitable tour packages. 17 +1. **Search Execution**: Deploy the method with the specified parameters to initiate the search. The system is optimized to process these inputs, conducting a targeted query across available tour packages to identify matches that align with the user's criteria. 18 +1. **Selection and Booking**: Upon receiving search results, the user can select a desired tour package. The booking process is then initiated with the minimal parameters already provided, ensuring a seamless transition from selection to confirmation. 19 + 20 +**Parameter Details:** 21 + 22 +* The parameters required for this method are intentionally limited to essential elements only, aiming to expedite the search and booking phases while maintaining effectiveness. Details on these parameters, including data types and usage instructions, are documented separately. 23 + 24 +**Usage Notes:** 25 + 26 +* This method is particularly beneficial for users seeking a straightforward and efficient path to tour package booking, minimizing decision fatigue and enhancing user experience. 27 + 28 +**Examples:** 29 + 30 +* Code examples and detailed step-by-step instructions for utilizing this method are available in the subsequent sections, providing practical guidance on implementing the streamlined tour package discovery and booking process. 31 + 32 +This documentation segment aims to facilitate developers and users in leveraging a simplified method for tour package exploration and booking, ensuring an efficient and user-friendly interaction with the system. 33 + 34 + 14 14 == Endpoint URL - [POST] == 15 15 16 16 {{info}} ... ... @@ -758,8 +758,6 @@ 758 758 |pageRowCount|Integer|No|The number of results to return per page. For example, 1 to return 1 result per page. 759 759 |searchCurrency|String|No|The currency in which the search results should be displayed. For example, "USD" for United States Dollar. 760 760 761 -=== === 762 - 763 763 === **Response Parameters** === 764 764 765 765 (% class="table-bordered" %) ... ... @@ -840,8 +840,6 @@ 840 840 |totalCount|Number|The total count of packages. This is the total number of packages in all pages of results. 841 841 |error|Boolean|A boolean indicating whether there was an error. If true, it means that there was an error in retrieving the packages. 842 842 843 -==== ==== 844 - 845 845 ==== first request ==== 846 846 847 847 {{code language="Json"}} ... ... @@ -868,6 +868,56 @@ 868 868 {{/code}} 869 869 870 870 888 +**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. 889 + 890 +**Initial Request:** 891 + 892 +* **Purpose**: The first request initiates the paging process and is designed to fetch the initial set of data without utilizing a pagingId. 893 +* **Parameters**: 894 +** pagingId: Should be set to an empty string ("") to indicate that this is the initial request. 895 +** pageNumber: Indicates the specific page of data to retrieve, starting with 1. 896 +** pageRowCount: Specifies the number of results to be included on each page. 897 + 898 +**Example - First Request**: 899 + 900 +{{{{ 901 + "pagingId": "", 902 + "pageNumber": 1, 903 + "pageRowCount": 10 904 +} 905 +}}} 906 + 907 + 908 +**Subsequent Requests with Caching:** 909 + 910 +* **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. 911 +* **Cache Utilization**: 912 +** Upon receiving a response, a pagingId value is provided. This pagingId should be used in subsequent requests to reference the cached data. 913 +** To navigate through the dataset, adjust the pageNumber while keeping the pagingId constant. 914 +** To refresh the dataset and clear the cache, initiate a new request without a pagingId. 915 + 916 +**Example - Request with Caching**: 917 + 918 +{{{ { 919 + "pagingId": "80", 920 + "pageNumber": 2, // Adjusted to fetch the next page 921 + "pageRowCount": 10 922 + } 923 +}}} 924 + 925 + 926 +**Cache Management:** 927 + 928 +* 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. 929 + 930 +**Implementation Notes**: 931 + 932 +* The paging and caching mechanism significantly enhances data retrieval efficiency by minimizing server load and optimizing response times. 933 +* Developers should ensure that the pagingId is correctly managed between requests to maintain session continuity and data consistency. 934 + 935 +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. 936 + 937 + 871 871 === search parameter options === 872 872 873 873 in the request body it's available to filter search results with parameters. parameter examples: ... ... @@ -906,22 +906,32 @@ 906 906 {{/code}} 907 907 908 908 909 - 910 910 == Important == 911 911 912 912 {{error}} 913 - It'sImportant to in every otherrequestheader, put Auth token979 +=== Implementing Authorization in Subsequent Requests === 914 914 915 - **Key**-Authorization981 +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: 916 916 917 -**Value **- Bearer Token what is given in this response. 983 +* **Header Key:** Authorization 984 +* **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. 918 918 986 +Additionally, to ensure your requests are properly formatted and recognized, include the following headers: 919 919 920 -**also note in headers that:** 988 +* **Content-Type:** Specify this header as application/json to indicate the format of the request body. 989 +* **Header Key:** X-nugios-timezone 990 +* **Header Value:** 240 - Adjust this value to match your local timezone offset in minutes. 921 921 922 -Content-Type - application/json 992 +Incorporating these headers with their respective values is essential for the successful processing of your API requests. 993 +{{/error}} 923 923 924 -**Key - **X-nugios-timezone 925 925 926 -**Value **- 240 927 -{{/error}} 996 + 997 +(% class="box errormessage" %) 998 +((( 999 +Tour package requirements can vary based on the destination country, necessitating the inclusion of additional mandatory services such as Visa, Insurance, and Tour Code. When querying for tour packages through the API, the response payload will dynamically include fields indicating whether these services are mandatory. For instance, the API may return a structure like this: 1000 + 1001 +[[image:https://xwiki.nugios.com/xwiki/bin/download/APIs/Online%20API/TourPackages/WebHome/1713191255012-154.png?rev=1.1||alt="1713191255012-154.png"]] 1002 + 1003 +in the given example it means that insurance service is mandatory for the tourpackage 1004 +)))