Changes for page 1. SearchTourPackages

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

From version 37.1
edited by Giorgi Mdivnishvili
on 2024/04/11 17:29
Change comment: There is no comment for this version
To version 54.1
edited by Giorgi Mdivnishvili
on 2025/10/22 15:29
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -8,7 +8,7 @@
8 8  
9 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.
10 10  
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.
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.
12 12  
13 13  
14 14  in more  details:
... ... @@ -18,14 +18,26 @@
18 18  **Data Retrieval Parameters:**
19 19  
20 20  * **Parameter Usage**: To query package data, the system utilizes the following parameters within the request payload:
21 -** stayDays: 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 -** stayDaysTo: Specifies the maximum duration of stay (in days) 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 stayDays and stayDaysTo.
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 +)))
23 23  
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 +
24 24  **Constraints:**
25 25  
26 -* The system imposes a constraint wherein the difference between stayDays and stayDaysTo cannot exceed 7 days. This limit is designed to refine search results and maintain query performance.
38 +* 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.
27 27  
28 -**Example Requests:** Below are examples illustrating how to structure requests for retrieving tour package data, utilizing the stayDays and stayDaysTo parameters to define the desired range of stay durations.
40 +**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.
29 29  
30 30  (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.)
31 31  
... ... @@ -66,8 +66,8 @@
66 66   "checkInDate": "2023-12-14",
67 67   "checkInDateTo": "2023-12-14",
68 68   "checkOutDate": "2023-12-14",
69 - "stayDays": 0,
70 - "stayDaysTo": 0,
81 + "nights": 0,
82 + "NightsTo": 0,
71 71   "departureDate": "2023-12-14",
72 72   "returnDate": "2023-12-14",
73 73   "airlineCode": "string",
... ... @@ -126,8 +126,8 @@
126 126   "checkInDate": "2024-02-05T20:00:00.000Z",
127 127   "checkInDateTo": "2024-02-10T20:00:00.000Z",
128 128  
129 - "stayDays": 3,
130 - "stayDaysTo": 6,
141 + "nights": 3,
142 + "nightsTo": 6,
131 131  
132 132   "airlineCode": "",
133 133   "ticketType": "",
... ... @@ -177,7 +177,6 @@
177 177   "userErrorDescription": "string",
178 178   "packages": [
179 179   {
180 - "cacheKey": "string",
181 181   "id": "string",
182 182   "priceCurrency": "string",
183 183   "totalPrice": 0,
... ... @@ -352,7 +352,6 @@
352 352  {
353 353   "packages": [
354 354   {
355 - "cacheKey": "c705ab31e00e4f9a81c2fd46b2cdbb47f6fd9a6e16984236beb979b31aefafa4:{79}:i:10",
356 356   "id": "tour:b01c168e-2ea7-4ea6-b6e0-55abb8cab0a0:da894a1e-88c0-4877-b216-0eeeabe186f3:4298d06f-4344-4a39-ad98-071b7760cf30",
357 357   "priceCurrency": "USD",
358 358   "totalPrice": 1033.53,
... ... @@ -513,8 +513,6 @@
513 513  nullable: true
514 514  |packages|[
515 515  nullable: trueTourPackage{(((
516 -|cacheKey|string
517 -nullable: true
518 518  |id|string
519 519  nullable: true
520 520  |priceCurrency|string
... ... @@ -785,21 +785,21 @@
785 785  
786 786  (% class="table-bordered" %)
787 787  |=Field|=Type|=Description
788 -|departureCountryCode|string|The ISO 3166-1 alpha-2 country code for the departure country. For example, "KZ" for Kazakhstan.
789 -|departureCityUID|string|The unique identifier for the departure city.
790 -|arrivalCountryCode|string|The ISO 3166-1 alpha-2 country code for the arrival country. For example, "AE" for United Arab Emirates.
796 +|departureCountryCode|string|The ISO 3166-1 alpha-2 country code for the departure country. For example, "KZ" for Kazakhstan.
797 +|departureCityUID|string|The unique identifier for the departure city. **Mandatory**
798 +|arrivalCountryCode|string|The ISO 3166-1 alpha-2 country code for the arrival country. For example, "AE" for United Arab Emirates. **Mandatory**
791 791  |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.
792 -|checkInDate|string|The check-in date in ISO 8601 format.
793 -|checkInDateTo|string|The latest possible check-in date in ISO 8601 format.
794 -|stayDays|integer|The minimum number of days to stay.
795 -|stayDaysTo|integer|The maximum number of days to stay.
800 +|checkInDate|string|The check-in date in ISO 8601 format. - **Mandatory**
801 +|checkInDateTo|string|The latest possible check-in date in ISO 8601 format. **Mandatory**
802 +|nights|integer|The minimum number of days to stay.
803 +|nightsTo|integer|The maximum number of days to stay.
796 796  |airlineCode|string|The code of the airline. This field can be empty.
797 -|ticketType|string|The type of the ticket. This field can be empty.
805 +|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
798 798  |directFlightsOnly|boolean|Indicates whether to search for direct flights only.
799 799  |longConnectTime|boolean|Indicates whether to include flights with long connection times.
800 -|adults|integer|The number of adults.
801 -|children|integer|The number of children.
802 -|childrenAges|array|An array of integers, each representing the age of a child.
808 +|adults|integer|The number of adults. **Mandatory**
809 +|children|integer|The number of children. **Mandatory**
810 +|childrenAges|array|An array of integers, each representing the age of a child.
803 803  |extendedSearch|boolean|Indicates whether to perform an extended search.
804 804  |totalPriceFrom|float|The minimum total price.
805 805  |totalPriceTo|float|The maximum total price.
... ... @@ -822,9 +822,8 @@
822 822  (% class="table-bordered" %)
823 823  |=Field|=Type|=Description
824 824  |packages|array|An array of packages available. Each package contains:
825 -|cacheKey|string|A unique identifier for the cache.
826 826  |id|string|A unique identifier for the package.
827 -|priceCurrency|string|The currency in which the price is displayed.
834 +|priceCurrency|string|The currency in which the price is displayed. examples -  •   KZT - ₸ •   USD - $ •   RUB - ₽ •   EUR - € •   UZS - ЛВ •   AZN - ₼
828 828  |totalPrice|float|The total price of the package.
829 829  |agentCommissionPercent|float|The commission percentage for the agent.
830 830  |agentCommissionAmount|float|The commission amount for the agent.
... ... @@ -914,6 +914,57 @@
914 914  {{/code}}
915 915  
916 916  
924 +**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.
925 +
926 +**Initial Request:**
927 +
928 +* **Purpose**: The first request initiates the paging process and is designed to fetch the initial set of data without utilizing a pagingId.
929 +* **Parameters**:
930 +** pagingId: Should be set to an empty string ("") to indicate that this is the initial request.
931 +** pageNumber: Indicates the specific page of data to retrieve, starting with 1.
932 +** pageRowCount: Specifies the number of results to be included on each page.
933 +
934 +**Example - First Request**:
935 +
936 +{{{{
937 + "pagingId": "",
938 +  "pageNumber": 1,
939 +  "pageRowCount": 10
940 +}
941 +}}}
942 +
943 +
944 +**Subsequent Requests with Caching:**
945 +
946 +* **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.
947 +* **Cache Utilization**:
948 +** Upon receiving a response, a pagingId value is provided. This pagingId should be used in subsequent requests to reference the cached data.
949 +** To navigate through the dataset, adjust the pageNumber while keeping the pagingId constant.
950 +** To refresh the dataset and clear the cache, initiate a new request without a pagingId.
951 +
952 +**Example - Request with Caching**:
953 +
954 +{{{ {
955 + "pagingId": "80",
956 + "pageNumber": 2, // Adjusted to fetch the next page
957 + "pageRowCount": 10
958 + }
959 +}}}
960 +
961 +
962 +**Cache Management:**
963 +
964 +* 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.
965 +
966 +**Implementation Notes**:
967 +
968 +* The paging and caching mechanism significantly enhances data retrieval efficiency by minimizing server load and optimizing response times.
969 +* Developers should ensure that the pagingId is correctly managed between requests to maintain session continuity and data consistency.
970 +
971 +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.
972 +
973 +
974 +
917 917  === Search parameter options ===
918 918  
919 919  in the request body it's available to filter search results with parameters. parameter examples:
... ... @@ -952,7 +952,16 @@
952 952  {{/code}}
953 953  
954 954  
1013 +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.
1014 +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.
1015 +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.
1016 +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.
1017 +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.
955 955  
1019 +**ticketType **definition of avia tickets classes.
1020 +
1021 +enum: F - First, B - Business, P = Premium, C - Coach.
1022 +
956 956  == Important ==
957 957  
958 958  {{error}}
... ... @@ -971,3 +971,14 @@
971 971  
972 972  Incorporating these headers with their respective values is essential for the successful processing of your API requests.
973 973  {{/error}}
1041 +
1042 +
1043 +
1044 +(% class="box errormessage" %)
1045 +(((
1046 +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:
1047 +
1048 +[[image:https://xwiki.nugios.com/xwiki/bin/download/APIs/Online%20API/TourPackages/WebHome/1713191255012-154.png?rev=1.1||alt="1713191255012-154.png"]]
1049 +
1050 +in the given example it means that insurance service is mandatory for the tourpackage.
1051 +)))