1. SearchTourPackages
Method Description
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.
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.
in more details:
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.
Data Retrieval Parameters:
- Parameter Usage: To query package data, the system utilizes the following parameters within the request payload:
- 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.
- 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.
Constraints:
- 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.
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.
(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.)
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.
Endpoint URL - [POST]
Request Parameters
Request Body
"departureCountryCode": "string",
"departureCityUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"arrivalCountryCode": "string",
"arrivalLocations": [
{
"type": "string",
"parent": "string",
"label": "string",
"subLabel": "string",
"value": "string",
"tag": "string"
}
],
"checkInDate": "2023-12-14",
"checkInDateTo": "2023-12-14",
"checkOutDate": "2023-12-14",
"stayDays": 0,
"stayDaysTo": 0,
"departureDate": "2023-12-14",
"returnDate": "2023-12-14",
"airlineCode": "string",
"ticketType": "string",
"directFlightsOnly": true,
"longConnectTime": true,
"adults": 0,
"children": 0,
"childrenAges": [
0
],
"extendedSearch": true,
"totalPriceFrom": 0,
"totalPriceTo": 0,
"recommended": true,
"popular": true,
"freeSale": true,
"groupByHotel": true,
"hotelCodes": [
"string"
],
"mealPlans": [
"string"
],
"hotelClasses": [
"string"
],
"hotelTypes": [
"CityHotel"
],
"hotelServices": [
"HasAlcohol"
],
"pagingId": "string",
"pageNumber": 0,
"pageRowCount": 0
}
Request example
"departureCountryCode": "KZ",
"departureCityUID": "f0ba6324-f337-405c-8cc7-23d62cf664e8",
"arrivalCountryCode": "AE",
"arrivalLocations": [
{
"type": "city",
"label": "Dubai",
"value": "f5185fa3-3f56-44ed-bf6b-80386a33caa2",
"tag": "Dubai"
}
],
"checkInDate": "2024-02-05T20:00:00.000Z",
"checkInDateTo": "2024-02-10T20:00:00.000Z",
"stayDays": 3,
"stayDaysTo": 6,
"airlineCode": "",
"ticketType": "",
"directFlightsOnly": true,
"longConnectTime": true,
"adults": 1,
"children": 1,
"childrenAges": [
2
],
"extendedSearch": false,
"totalPriceFrom": 100,
"totalPriceTo": 15000,
"recommended": true,
"popular": true,
"freeSale": true,
"groupByHotel": true,
"hotelCodes": [
],
"mealPlans": [
],
"hotelClasses": [
],
"hotelTypes": [
],
"hotelServices": [
],
"pagingId": "",
"pageNumber": 10,
"pageRowCount": 10
}
Response Body
"error": true,
"errorCode": "string",
"errorDescription": "string",
"userErrorDescription": "string",
"packages": [
{
"cacheKey": "string",
"id": "string",
"priceCurrency": "string",
"totalPrice": 0,
"agentCommissionPercent": 0,
"agentCommissionAmount": 0,
"includedExtrasAmount": 0,
"priceDifference": 0,
"hotel": {
"hotelPriceId": "string",
"providerId": 0,
"hotelName": "string",
"hotelCode": "string",
"nigths": 0,
"mealPlan": "string",
"hotelClass": "string",
"availabilityType": "OnRequest",
"availableRoomsCount": 0,
"fewRooms": true,
"roomCategoryCode": "string",
"roomCategoryName": "string",
"placementTypeName": "string",
"placementDescription": "string",
"checkInDate": "2023-12-14T13:47:13.396Z",
"checkOutDate": "2023-12-14T13:47:13.396Z",
"adults": 0,
"children": 0,
"districtUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"districtName": "string",
"cityUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"cityName": "string",
"countryCode": "string",
"countryName": "string",
"hasAlcohol": true,
"hasFreeWifi": true,
"hasMetro": true,
"hasPool": true,
"hasMall": true,
"cancellationPolicyDescription": "string",
"cancellationPolicy": {
"cancellationPolicyCode": "string",
"noShowChargeValue": 0,
"noShowChargeValueType": "string",
"earlyDepartureChargeValue": 0,
"earlyDepartureChargeValueType": "string",
"conditions": [
{
"timeunits": 0,
"timeunitType": "string",
"timeOffsetTypeName": "string",
"chargeValue": 0,
"chargeValueType": "string"
}
]
}
},
"flight": {
"id": "string",
"departureDate": "2023-12-14T13:47:13.396Z",
"returnDate": "2023-12-14T13:47:13.396Z",
"departureTicketsLeft": 0,
"returnTicketsLeft": 0,
"departureAvailabilityType": "OnRequest",
"returnAvailabilityType": "OnRequest",
"isTwoWay": true,
"departureSegments": [
{
"airlineCode": "string",
"airlineName": "string",
"flightCode": "string",
"class": "string",
"lugageWeight": 0,
"handLugageWeight": 0,
"departureFlightDate": "2023-12-14T13:47:13.396Z",
"departureCountryName": "string",
"departureCityName": "string",
"departureAirportCode": "string",
"departureAirportName": "string",
"departureTerminalCode": "string",
"arrivalFlightDate": "2023-12-14T13:47:13.396Z",
"arrivalCountryName": "string",
"arrivalCityName": "string",
"arrivalAirportCode": "string",
"arrivalAirportName": "string",
"arrivalTerminalCode": "string",
"flightDuration": "string",
"baggages": [
{
"baggageCode": "string",
"description": "string",
"price": 0,
"currency": "string",
"included": true
}
]
}
],
"returnSegments": [
{
"airlineCode": "string",
"airlineName": "string",
"flightCode": "string",
"class": "string",
"lugageWeight": 0,
"handLugageWeight": 0,
"departureFlightDate": "2023-12-14T13:47:13.396Z",
"departureCountryName": "string",
"departureCityName": "string",
"departureAirportCode": "string",
"departureAirportName": "string",
"departureTerminalCode": "string",
"arrivalFlightDate": "2023-12-14T13:47:13.396Z",
"arrivalCountryName": "string",
"arrivalCityName": "string",
"arrivalAirportCode": "string",
"arrivalAirportName": "string",
"arrivalTerminalCode": "string",
"flightDuration": "string",
"baggages": [
{
"baggageCode": "string",
"description": "string",
"price": 0,
"currency": "string",
"included": true
}
]
}
]
},
"extraServices": [
{
"extraServiceCode": "string",
"extraServiceTypeCode": "string",
"isMandatory": 0,
"extraServiceName": "string",
"minimalServiceAmount": 0,
"includedPriceCode": "string",
"prices": [
{
"extraServicePriceCode": "string",
"displayName": "string",
"restrictionInfo": "string",
"additionalInfo": "string",
"price": 0,
"extraPrice": 0,
"currency": "string"
}
]
}
],
"insurancePrice": {
"name": "string",
"price": 0,
"priceSurcarge": 0,
"actualStartDate": "2023-12-14T13:47:13.396Z",
"actualEndDate": "2023-12-14T13:47:13.396Z",
"optional": true,
"includedInPackagePrice": true
}
}
],
"pagingId": "string",
"pageNumber": 0,
"pageCount": 0
}
Response example
"packages": [
{
"cacheKey": "c705ab31e00e4f9a81c2fd46b2cdbb47f6fd9a6e16984236beb979b31aefafa4:{79}:i:10",
"id": "tour:b01c168e-2ea7-4ea6-b6e0-55abb8cab0a0:da894a1e-88c0-4877-b216-0eeeabe186f3:4298d06f-4344-4a39-ad98-071b7760cf30",
"priceCurrency": "USD",
"totalPrice": 1033.53,
"agentCommissionPercent": 0.0,
"agentCommissionAmount": 0.0,
"includedExtrasAmount": 0,
"priceDifference": 0,
"hotel": {
"hotelPriceId": "da894a1e-88c0-4877-b216-0eeeabe186f3",
"providerId": 13,
"hotelName": "Mercure Dubai Barsha Heights Suites Apartments",
"hotelCode": "5f125310-7025-4807-a4c6-49cd284c9c14",
"nigths": 3,
"mealPlan": "BB",
"hotelClass": "4",
"availabilityType": "FreeSale",
"availableRoomsCount": 0,
"fewRooms": true,
"roomCategoryCode": "bc5f2224-bd4c-49b2-ab57-01eb7fa80d41",
"roomCategoryName": "1 B/R Suite City View",
"placementTypeName": "DBL",
"checkInDate": "2024-02-09T20:00:00.000Z",
"checkOutDate": "2024-02-12T20:00:00.000Z",
"adults": 1,
"children": 1,
"districtUID": "4c65f6ed-902b-4fd8-9419-af7884c22c5e",
"districtName": "Al Barsha",
"cityUID": "f5185fa3-3f56-44ed-bf6b-80386a33caa2",
"cityName": "Dubai",
"countryCode": "AE",
"countryName": "United Arab Emirates",
"hasAlcohol": false,
"hasFreeWifi": true,
"hasMetro": true,
"hasPool": true,
"hasMall": false,
"cancellationPolicyDescription": "Cancellation Policy: 5 Day Before Arrival: 100.00 %, Early Departure: 100.00 %, NoShow: 100.00 %",
"cancellationPolicy": {
"noShowChargeValue": 100.0,
"noShowChargeValueType": "%",
"earlyDepartureChargeValue": 100.0,
"earlyDepartureChargeValueType": "%",
"conditions": [
{
"timeunits": 5,
"timeunitType": "Day",
"timeOffsetTypeName": "Before Arrival",
"chargeValue": 100.0,
"chargeValueType": "%"
}
]
}
},
"flight": {
"id": "4298d06f-4344-4a39-ad98-071b7760cf30",
"departureDate": "2024-02-09T20:00:00.000Z",
"returnDate": "2024-02-12T20:00:00.000Z",
"departureTicketsLeft": 7,
"returnTicketsLeft": 7,
"departureAvailabilityType": "FewPlaces",
"returnAvailabilityType": "FewPlaces",
"isTwoWay": true,
"sameBaggageForAll": false,
"totalBaggage": false,
"departureSegments": [
{
"airlineCode": "KC",
"airlineName": "Air Astana-",
"flightCode": "KC897",
"class": "econom",
"lugageWeight": 20,
"handLugageWeight": 6,
"departureFlightDate": "2024-02-09T20:00:00.000Z",
"departureCountryName": "Kazakhstan",
"departureCityName": "Almaty",
"departureAirportCode": "ALA",
"departureAirportName": "Almaty Intl Airport",
"departureTerminalCode": "ALA",
"arrivalFlightDate": "2024-02-09T20:00:00.000Z",
"arrivalCountryName": "United Arab Emirates",
"arrivalCityName": "Dubai",
"arrivalAirportCode": "DXB",
"arrivalAirportName": "Dubai Intl Airport",
"arrivalTerminalCode": "DXB1",
"flightDuration": "0h 50m"
}
],
"returnSegments": [
{
"airlineCode": "KC",
"airlineName": "Air Astana-",
"flightCode": "KC900",
"class": "econom",
"lugageWeight": 20,
"handLugageWeight": 6,
"departureFlightDate": "2024-02-12T20:00:00.000Z",
"departureCountryName": "United Arab Emirates",
"departureCityName": "Dubai",
"departureAirportCode": "DXB",
"departureAirportName": "Dubai Intl Airport",
"departureTerminalCode": "DXB1",
"arrivalFlightDate": "2024-02-12T20:00:00.000Z",
"arrivalCountryName": "Kazakhstan",
"arrivalCityName": "Almaty",
"arrivalAirportCode": "ALA",
"arrivalAirportName": "Almaty Intl Airport",
"arrivalTerminalCode": "ALA",
"flightDuration": "8h 15m"
}
],
"passengers": [
{
"id": "42768722011000004-A1",
"isAdult": true,
"forwardBaggages": [],
"backwardBaggages": []
},
{
"id": "42768722011000004-C1",
"isAdult": false,
"forwardBaggages": [],
"backwardBaggages": []
}
]
},
"extraServices": [],
"insurancePrice": {
"name": "Medical INS (N10000)",
"price": 17.92,
"priceSurcarge": 0.0,
"actualStartDate": "2024-02-09T20:00:00.000Z",
"actualEndDate": "2024-02-12T20:00:00.000Z",
"optional": false,
"includedInPackagePrice": true
}
}
],
"pagingId": "79",
"pageNumber": 10,
"pageCount": 2452,
"totalCount": 2452,
"error": false
}
Schema
Definitions
Request Parameters
Field | Type | Description |
---|---|---|
departureCountryCode | string | The ISO 3166-1 alpha-2 country code for the departure country. For example, "KZ" for Kazakhstan. |
departureCityUID | string | The unique identifier for the departure city. |
arrivalCountryCode | string | The ISO 3166-1 alpha-2 country code for the arrival country. For example, "AE" for United Arab Emirates. |
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. |
checkInDate | string | The check-in date in ISO 8601 format. |
checkInDateTo | string | The latest possible check-in date in ISO 8601 format. |
stayDays | integer | The minimum number of days to stay. |
stayDaysTo | integer | The maximum number of days to stay. |
airlineCode | string | The code of the airline. This field can be empty. |
ticketType | string | The type of the ticket. This field can be empty. |
directFlightsOnly | boolean | Indicates whether to search for direct flights only. |
longConnectTime | boolean | Indicates whether to include flights with long connection times. |
adults | integer | The number of adults. |
children | integer | The number of children. |
childrenAges | array | An array of integers, each representing the age of a child. |
extendedSearch | boolean | Indicates whether to perform an extended search. |
totalPriceFrom | float | The minimum total price. |
totalPriceTo | float | The maximum total price. |
recommended | boolean | Indicates whether to include recommended packages. |
popular | boolean | Indicates whether to include popular packages. |
freeSale | boolean | Indicates whether to include free sale packages. |
groupByHotel | boolean | Indicates whether to group the results by hotel. |
hotelCodes | array | An array of strings, each representing a hotel code. This field can be empty. |
mealPlans | array | An array of meal plans. This field can be empty. |
hotelClasses | array | An array of hotel classes. This field can be empty. |
hotelTypes | array | An array of hotel types. This field can be empty. |
hotelServices | array | An array of hotel services. This field can be empty. |
pagingId | string | The paging ID for paginated results. This field can be empty. |
pageNumber | integer | The page number for paginated results. |
pageRowCount | integer | The number of rows per page for paginated results. |
Response Parameters
Field | Type | Description |
---|---|---|
packages | array | An array of packages available. Each package contains: |
cacheKey | string | A unique identifier for the cache. |
id | string | A unique identifier for the package. |
priceCurrency | string | The currency in which the price is displayed. examples - • KZT - ₸ • USD - $ • RUB - ₽ • EUR - € • UZS - ЛВ • AZN - ₼ |
totalPrice | float | The total price of the package. |
agentCommissionPercent | float | The commission percentage for the agent. |
agentCommissionAmount | float | The commission amount for the agent. |
includedExtrasAmount | integer | The amount of extras included in the package. |
priceDifference | integer | The difference in price from the original price. |
hotel | object | An object containing details about the hotel. |
hotelPriceId | string | A unique identifier for the hotel price. |
providerId | integer | A unique identifier for the provider. |
hotelName | string | The name of the hotel. |
hotelCode | string | A unique code for the hotel. |
nigths | integer | The number of nights for the stay. |
mealPlan | string | The meal plan for the stay. |
hotelClass | string | The class or rating of the hotel. |
availabilityType | string | The availability type of the hotel. |
availableRoomsCount | integer | The number of available rooms in the hotel. |
fewRooms | boolean | Indicates whether there are few rooms left. |
roomCategoryCode | string | A unique code for the room category. |
roomCategoryName | string | The name of the room category. |
placementTypeName | string | The name of the placement type. |
checkInDate | string | The check-in date in ISO 8601 format. |
checkOutDate | string | The check-out date in ISO 8601 format. |
adults | integer | The number of adults for the stay. |
children | integer | The number of children for the stay. |
districtUID | string | A unique identifier for the district. |
districtName | string | The name of the district. |
cityUID | string | A unique identifier for the city. |
cityName | string | The name of the city. |
countryCode | string | The ISO 3166-1 alpha-2 country code. |
countryName | string | The name of the country. |
hasAlcohol | boolean | Indicates whether the hotel serves alcohol. |
hasFreeWifi | boolean | Indicates whether the hotel offers free Wi-Fi. |
hasMetro | boolean | Indicates whether the hotel is near a metro station. |
hasPool | boolean | Indicates whether the hotel has a pool. |
hasMall | boolean | Indicates whether the hotel is near a shopping mall. |
cancellationPolicyDescription | string | The description of the cancellation policy. |
cancellationPolicy | object | An object containing details about the cancellation policy. |
flight | object | An object containing details about the flight. |
id | string | A unique identifier for the flight. |
departureDate | string | The departure date in ISO 8601 format. |
returnDate | string | The return date in ISO 8601 format. |
departureTicketsLeft | integer | The number of departure tickets left. |
returnTicketsLeft | integer | The number of return tickets left. |
departureAvailabilityType | string | The availability type of the departure flight. |
returnAvailabilityType | string | The availability type of the return flight. |
isTwoWay | boolean | Indicates whether the flight is two-way. |
sameBaggageForAll | boolean | Indicates whether the same baggage is applicable for all passengers. |
totalBaggage | boolean | Indicates whether total baggage is included. |
departureSegments | array | An array of objects, each representing a departure segment. |
returnSegments | array | An array of objects, each representing a return segment. |
passengers | array | An array of objects, each representing a passenger. |
extraServices | array | An array of extra services included in the package. |
insurancePrice | object | An object containing details about the insurance price. |
pagingId | string | The paging ID for paginated results. |
pageNumber | integer | The page number for paginated results. |
pageCount | integer | The total number of pages. |
totalCount | integer | The total count of packages. |
error | boolean | Indicates whether there was an error. |
Paging and Caching
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:
First request
"pagingId": "",
"pageNumber": 1,
"pageRowCount":10
}
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.
Request with caching
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": "",
"pagingId": "80",
"pageNumber": 1,
"pageRowCount":10
}
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.
Initial Request:
- Purpose: The first request initiates the paging process and is designed to fetch the initial set of data without utilizing a pagingId.
- Parameters:
- pagingId: Should be set to an empty string ("") to indicate that this is the initial request.
- pageNumber: Indicates the specific page of data to retrieve, starting with 1.
- pageRowCount: Specifies the number of results to be included on each page.
Example - First Request:
{ "pagingId": "", "pageNumber": 1, "pageRowCount": 10 }
Subsequent Requests with Caching:
- 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.
- Cache Utilization:
- Upon receiving a response, a pagingId value is provided. This pagingId should be used in subsequent requests to reference the cached data.
- To navigate through the dataset, adjust the pageNumber while keeping the pagingId constant.
- To refresh the dataset and clear the cache, initiate a new request without a pagingId.
Example - Request with Caching:
{ "pagingId": "80", "pageNumber": 2, // Adjusted to fetch the next page "pageRowCount": 10 }
Cache Management:
- 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.
Implementation Notes:
- The paging and caching mechanism significantly enhances data retrieval efficiency by minimizing server load and optimizing response times.
- Developers should ensure that the pagingId is correctly managed between requests to maintain session continuity and data consistency.
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.
Search parameter options
in the request body it's available to filter search results with parameters. parameter examples:
"totalPriceTo": 10000,
"hotelTypes": [
"CityHotel",
"BeachHotel",
"SecondLineBeach"
],
"hotelClasses": [
"1",
"2",
"3",
"4",
"5",
"6"
],
"hotelServices": [
"HasAlcohol",
"HasFreeWifi",
"HasMetro",
"HasPool",
"HasMall"
],
"mealPlans": [
"RO",
"BB",
"HB",
"FB",
"AL"
]
}
- 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.
- 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.
- 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.
- 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.
- 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.