Changes for page 1. SearchTourPackages

Last modified by Giorgi Mdivnishvili on 2025/10/22 15:30

From version 53.1
edited by Giorgi Mdivnishvili
on 2025/10/22 13:39
Change comment: There is no comment for this version
To version 22.1
edited by Giorgi Mdivnishvili
on 2024/04/10 10:48
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -6,45 +6,11 @@
6 6  
7 7  = Method Description =
8 8  
9 -Tour package mean, tour with hotel and flight  together In case of variation also with transfer option. Using this method gives data about full package availability with flight and hotel options.
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's possible to receive data as current dates, also in date ranges using parameter  "nights": 0,   "nightsTo ": 0. the maximum difference between the days can be 7. Below you can see examples.
11 +It's possible to receive data as current dates, also in date ranges using parameter  "stayDays": 0,   "stayDaysTo": 0. the maximum difference between the days can be 7. Below you can see examples.
12 12  
13 13  
14 -in more  details:
15 -
16 -A tour package encapsulates a bundled offering that includes both hotel accommodations and flight arrangements. In certain variations, it may also incorporate transfer options, providing a comprehensive travel solution. The method detailed herein facilitates the retrieval of data concerning the complete availability of such tour packages, including pertinent flight and hotel options.
17 -
18 -**Data Retrieval Parameters:**
19 -
20 -* **Parameter Usage**: To query package data, the system utilizes the following parameters within the request payload:
21 -** nights: Defines the minimum duration of stay (in days) as part of the tour package. The value is set to 0 by default, indicating no minimum duration constraint.
22 -** nightsTo: Specifies the maximum duration of stay (in nights) allowable within the package offerings. A default value of 0 implies no maximum limit; however, the system enforces a maximum duration difference of 7 days between nights and nightsTo.(((
23 -=== ===
24 -)))
25 -
26 -**Date Parameters**
27 -
28 -* **checkInDate** — the date when the guest checks into the hotel.
29 -* **checkOutDate** — the date of departure from the hotel (the last day of stay).
30 -* (((
31 -If only these two parameters are specified during the search, the system will automatically select flight options that correspond to the hotel stay dates.
32 -
33 -In cases where a user wants a longer trip — for example, a **10-day tour** with only **5 days at the hotel** — they can specify flight dates (**departureDate** and **returnDate**) separately from hotel stay dates (**checkInDate** and **checkOutDate**).
34 -)))
35 -
36 -
37 -**Constraints:**
38 -
39 -* The system imposes a constraint wherein the difference between nights and nightsTo cannot exceed 7 days. This limit is designed to refine search results and maintain query performance.
40 -
41 -**Example Requests:** Below are examples illustrating how to structure requests for retrieving tour package data, utilizing the nights and nightsTo parameters to define the desired range of stay durations.
42 -
43 -(Note: Actual example requests are not included in this response but should typically be provided here, showcasing the structure and format of API calls or query parameters used to fetch the tour package data.)
44 -
45 -This documentation aims to guide developers in effectively querying for tour package options, employing specified parameters to tailor the search according to the duration of stay requirements.
46 -
47 -
48 48  == Endpoint URL - [POST] ==
49 49  
50 50  {{info}}
... ... @@ -79,8 +79,8 @@
79 79   "checkInDate": "2023-12-14",
80 80   "checkInDateTo": "2023-12-14",
81 81   "checkOutDate": "2023-12-14",
82 - "nights": 0,
83 - "NightsTo": 0,
48 + "stayDays": 0,
49 + "stayDaysTo": 0,
84 84   "departureDate": "2023-12-14",
85 85   "returnDate": "2023-12-14",
86 86   "airlineCode": "string",
... ... @@ -139,8 +139,8 @@
139 139   "checkInDate": "2024-02-05T20:00:00.000Z",
140 140   "checkInDateTo": "2024-02-10T20:00:00.000Z",
141 141  
142 - "nights": 3,
143 - "nightsTo": 6,
108 + "stayDays": 3,
109 + "stayDaysTo": 6,
144 144  
145 145   "airlineCode": "",
146 146   "ticketType": "",
... ... @@ -190,6 +190,7 @@
190 190   "userErrorDescription": "string",
191 191   "packages": [
192 192   {
159 + "cacheKey": "string",
193 193   "id": "string",
194 194   "priceCurrency": "string",
195 195   "totalPrice": 0,
... ... @@ -364,6 +364,7 @@
364 364  {
365 365   "packages": [
366 366   {
334 + "cacheKey": "c705ab31e00e4f9a81c2fd46b2cdbb47f6fd9a6e16984236beb979b31aefafa4:{79}:i:10",
367 367   "id": "tour:b01c168e-2ea7-4ea6-b6e0-55abb8cab0a0:da894a1e-88c0-4877-b216-0eeeabe186f3:4298d06f-4344-4a39-ad98-071b7760cf30",
368 368   "priceCurrency": "USD",
369 369   "totalPrice": 1033.53,
... ... @@ -524,6 +524,8 @@
524 524  nullable: true
525 525  |packages|[
526 526  nullable: trueTourPackage{(((
495 +|cacheKey|string
496 +nullable: true
527 527  |id|string
528 528  nullable: true
529 529  |priceCurrency|string
... ... @@ -790,7 +790,6 @@
790 790  
791 791  == Definitions ==
792 792  
793 -**Request Parameters **
794 794  
795 795  (% class="table-bordered" %)
796 796  |=Field|=Type|=Description
... ... @@ -800,10 +800,10 @@
800 800  |arrivalLocations|array|An array of objects, each representing an arrival location. Each object contains: type (string) - The type of the location. This can be "city". label (string) - The name of the location. value (string) - The unique identifier for the location. tag (string) - A tag for the location.
801 801  |checkInDate|string|The check-in date in ISO 8601 format.
802 802  |checkInDateTo|string|The latest possible check-in date in ISO 8601 format.
803 -|nights|integer|The minimum number of days to stay.
804 -|nightsTo|integer|The maximum number of days to stay.
772 +|stayDays|integer|The minimum number of days to stay.
773 +|stayDaysTo|integer|The maximum number of days to stay.
805 805  |airlineCode|string|The code of the airline. This field can be empty.
806 -|ticketType|string|The type of the ticket. This field can be empty. definition of avia tickets classes. enum: F - First, B - Business, P = Premium, C - Coach
775 +|ticketType|string|The type of the ticket. This field can be empty.
807 807  |directFlightsOnly|boolean|Indicates whether to search for direct flights only.
808 808  |longConnectTime|boolean|Indicates whether to include flights with long connection times.
809 809  |adults|integer|The number of adults.
... ... @@ -825,78 +825,14 @@
825 825  |pageNumber|integer|The page number for paginated results.
826 826  |pageRowCount|integer|The number of rows per page for paginated results.
827 827  
828 -(% class="wikigeneratedid" %)
829 -**Response Parameters**
797 +=== ===
830 830  
831 -(% class="table-bordered" %)
832 -|=Field|=Type|=Description
833 -|packages|array|An array of packages available. Each package contains:
834 -|id|string|A unique identifier for the package.
835 -|priceCurrency|string|The currency in which the price is displayed. examples -  •   KZT - ₸ •   USD - $ •   RUB - ₽ •   EUR - € •   UZS - ЛВ •   AZN - ₼
836 -|totalPrice|float|The total price of the package.
837 -|agentCommissionPercent|float|The commission percentage for the agent.
838 -|agentCommissionAmount|float|The commission amount for the agent.
839 -|includedExtrasAmount|integer|The amount of extras included in the package.
840 -|priceDifference|integer|The difference in price from the original price.
841 -|hotel|object|An object containing details about the hotel.
842 -|hotelPriceId|string|A unique identifier for the hotel price.
843 -|providerId|integer|A unique identifier for the provider.
844 -|hotelName|string|The name of the hotel.
845 -|hotelCode|string|A unique code for the hotel.
846 -|nigths|integer|The number of nights for the stay.
847 -|mealPlan|string|The meal plan for the stay.
848 -|hotelClass|string|The class or rating of the hotel.
849 -|availabilityType|string|The availability type of the hotel.
850 -|availableRoomsCount|integer|The number of available rooms in the hotel.
851 -|fewRooms|boolean|Indicates whether there are few rooms left.
852 -|roomCategoryCode|string|A unique code for the room category.
853 -|roomCategoryName|string|The name of the room category.
854 -|placementTypeName|string|The name of the placement type.
855 -|checkInDate|string|The check-in date in ISO 8601 format.
856 -|checkOutDate|string|The check-out date in ISO 8601 format.
857 -|adults|integer|The number of adults for the stay.
858 -|children|integer|The number of children for the stay.
859 -|districtUID|string|A unique identifier for the district.
860 -|districtName|string|The name of the district.
861 -|cityUID|string|A unique identifier for the city.
862 -|cityName|string|The name of the city.
863 -|countryCode|string|The ISO 3166-1 alpha-2 country code.
864 -|countryName|string|The name of the country.
865 -|hasAlcohol|boolean|Indicates whether the hotel serves alcohol.
866 -|hasFreeWifi|boolean|Indicates whether the hotel offers free Wi-Fi.
867 -|hasMetro|boolean|Indicates whether the hotel is near a metro station.
868 -|hasPool|boolean|Indicates whether the hotel has a pool.
869 -|hasMall|boolean|Indicates whether the hotel is near a shopping mall.
870 -|cancellationPolicyDescription|string|The description of the cancellation policy.
871 -|cancellationPolicy|object|An object containing details about the cancellation policy.
872 -|flight|object|An object containing details about the flight.
873 -|id|string|A unique identifier for the flight.
874 -|departureDate|string|The departure date in ISO 8601 format.
875 -|returnDate|string|The return date in ISO 8601 format.
876 -|departureTicketsLeft|integer|The number of departure tickets left.
877 -|returnTicketsLeft|integer|The number of return tickets left.
878 -|departureAvailabilityType|string|The availability type of the departure flight.
879 -|returnAvailabilityType|string|The availability type of the return flight.
880 -|isTwoWay|boolean|Indicates whether the flight is two-way.
881 -|sameBaggageForAll|boolean|Indicates whether the same baggage is applicable for all passengers.
882 -|totalBaggage|boolean|Indicates whether total baggage is included.
883 -|departureSegments|array|An array of objects, each representing a departure segment.
884 -|returnSegments|array|An array of objects, each representing a return segment.
885 -|passengers|array|An array of objects, each representing a passenger.
886 -|extraServices|array|An array of extra services included in the package.
887 -|insurancePrice|object|An object containing details about the insurance price.
888 -|pagingId|string|The paging ID for paginated results.
889 -|pageNumber|integer|The page number for paginated results.
890 -|pageCount|integer|The total number of pages.
891 -|totalCount|integer|The total count of packages.
892 -|error|boolean|Indicates whether there was an error.
893 -
894 894  === Paging and Caching ===
895 895  
896 896  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:
897 897  
898 898  
899 -==== First request ====
804 +==== first request ====
900 900  
901 901  {{code language="Json"}}
902 902   {
... ... @@ -906,12 +906,10 @@
906 906   }
907 907  {{/code}}
908 908  
909 -While making first search request, paging id should be empty,  "pageNumber":  and  "pageRowCount":10 means that, in response there will be returned maximum 10 packages per page.
910 910  
911 -
912 912  ==== Request with caching ====
913 913  
914 -after receiving response from first search request, in the end we can see pagingId- number, wchich we can use for caching, and (pageinatoin) for switch pagenumbers, and displaying results as we whant. For cleaning cache, it's important to make new request without cllear pagingID, like this  "pagingId": "",
817 +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
915 915  
916 916  {{code language="Json"}}
917 917   {
... ... @@ -922,59 +922,8 @@
922 922  {{/code}}
923 923  
924 924  
925 -**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.
828 +=== search parameter options ===
926 926  
927 -**Initial Request:**
928 -
929 -* **Purpose**: The first request initiates the paging process and is designed to fetch the initial set of data without utilizing a pagingId.
930 -* **Parameters**:
931 -** pagingId: Should be set to an empty string ("") to indicate that this is the initial request.
932 -** pageNumber: Indicates the specific page of data to retrieve, starting with 1.
933 -** pageRowCount: Specifies the number of results to be included on each page.
934 -
935 -**Example - First Request**:
936 -
937 -{{{{
938 - "pagingId": "",
939 -  "pageNumber": 1,
940 -  "pageRowCount": 10
941 -}
942 -}}}
943 -
944 -
945 -**Subsequent Requests with Caching:**
946 -
947 -* **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.
948 -* **Cache Utilization**:
949 -** Upon receiving a response, a pagingId value is provided. This pagingId should be used in subsequent requests to reference the cached data.
950 -** To navigate through the dataset, adjust the pageNumber while keeping the pagingId constant.
951 -** To refresh the dataset and clear the cache, initiate a new request without a pagingId.
952 -
953 -**Example - Request with Caching**:
954 -
955 -{{{ {
956 - "pagingId": "80",
957 - "pageNumber": 2, // Adjusted to fetch the next page
958 - "pageRowCount": 10
959 - }
960 -}}}
961 -
962 -
963 -**Cache Management:**
964 -
965 -* 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.
966 -
967 -**Implementation Notes**:
968 -
969 -* The paging and caching mechanism significantly enhances data retrieval efficiency by minimizing server load and optimizing response times.
970 -* Developers should ensure that the pagingId is correctly managed between requests to maintain session continuity and data consistency.
971 -
972 -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.
973 -
974 -
975 -
976 -=== Search parameter options ===
977 -
978 978  in the request body it's available to filter search results with parameters. parameter examples:
979 979  
980 980  {{code language="Json"}}
... ... @@ -1011,42 +1011,22 @@
1011 1011  {{/code}}
1012 1012  
1013 1013  
1014 -1. **RO (Room Only)**: This plan includes only the accommodation with no meals provided. Guests will need to arrange their own meals either outside the hotel or by purchasing them separately within the hotel.
1015 -1. **BB (Bed and Breakfast)**: This plan includes accommodation along with breakfast served at the hotel. No other meals are included, which means guests need to arrange their own lunch and dinner.
1016 -1. **HB (Half Board)**: This meal plan includes accommodation along with two meals a day, typically breakfast and either lunch or dinner. Guests can choose which two meals are most convenient for them based on the options provided by the hotel.
1017 -1. **FB (Full Board)**: Under the full board plan, accommodation and all three meals (breakfast, lunch, and dinner) are included. This plan is convenient for guests who do not wish to worry about arranging meals during their stay.
1018 -1. **AL (All Inclusive)**: The all-inclusive meal plan includes accommodation, all meals (breakfast, lunch, dinner), and usually includes a range of snacks and beverages (both alcoholic and non-alcoholic). It is the most comprehensive meal plan, offering the greatest convenience and predictability in costs.
1019 1019  
1020 -**ticketType **definition of avia tickets classes.
1021 -
1022 -enum: F - First, B - Business, P = Premium, C - Coach.
1023 -
1024 1024  == Important ==
1025 1025  
1026 1026  {{error}}
1027 -=== Implementing Authorization in Subsequent Requests ===
870 +It's Important to in every other request header, put Auth token
1028 1028  
1029 -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:
872 +**Key **- Authorization
1030 1030  
1031 -* **Header Key:** Authorization
1032 -* **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.
874 +**Value **- Bearer Token what is given in this response.
1033 1033  
1034 -Additionally, to ensure your requests are properly formatted and recognized, include the following headers:
1035 1035  
1036 -* **Content-Type:** Specify this header as application/json to indicate the format of the request body.
1037 -* **Header Key:** X-nugios-timezone
1038 -* **Header Value:** 240 - Adjust this value to match your local timezone offset in minutes.
877 +**also note in headers that:**
1039 1039  
1040 -Incorporating these headers with their respective values is essential for the successful processing of your API requests.
1041 -{{/error}}
879 +Content-Type - application/json
1042 1042  
881 +**Key - **X-nugios-timezone
1043 1043  
1044 -
1045 -(% class="box errormessage" %)
1046 -(((
1047 -Tour package requirements can vary based on the destination country, necessitating the inclusion of additional mandatory services such as Visa, Insurance, etc. 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:
1048 -
1049 -[[image:https://xwiki.nugios.com/xwiki/bin/download/APIs/Online%20API/TourPackages/WebHome/1713191255012-154.png?rev=1.1||alt="1713191255012-154.png"]]
1050 -
1051 -in the given example it means that insurance service is mandatory for the tourpackage.
1052 -)))
883 +**Value **- 240
884 +{{/error}}