Wiki source code of 1. SearchTourPackages

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

Show last authors
1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2
3
4 {{toc/}}
5 {{/box}}
6
7 = Method Description =
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.
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.
12
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 **Constraints:**
37
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.
39
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.
41
42 (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.)
43
44 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.
45
46
47 == Endpoint URL - [POST] ==
48
49 {{info}}
50 [[https:~~/~~/integration.kazunion.com/api/TourPackages/SearchTourPackages>>https://integration.kazunion.com/api/TourPackages/SearchTourPackages]]
51 {{/info}}
52
53 == Request Parameters ==
54
55 (% class="box infomessage" %)
56 (((
57 None 
58 )))
59
60
61 == Request Body ==
62
63 {{code language="Json"}}
64 {
65 "departureCountryCode": "string",
66 "departureCityUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
67 "arrivalCountryCode": "string",
68 "arrivalLocations": [
69 {
70 "type": "string",
71 "parent": "string",
72 "label": "string",
73 "subLabel": "string",
74 "value": "string",
75 "tag": "string"
76 }
77 ],
78 "checkInDate": "2023-12-14",
79 "checkInDateTo": "2023-12-14",
80 "checkOutDate": "2023-12-14",
81 "nights": 0,
82 "NightsTo": 0,
83 "departureDate": "2023-12-14",
84 "returnDate": "2023-12-14",
85 "airlineCode": "string",
86 "ticketType": "string",
87 "directFlightsOnly": true,
88 "longConnectTime": true,
89 "adults": 0,
90 "children": 0,
91 "childrenAges": [
92 0
93 ],
94 "extendedSearch": true,
95 "totalPriceFrom": 0,
96 "totalPriceTo": 0,
97 "recommended": true,
98 "popular": true,
99 "freeSale": true,
100 "groupByHotel": true,
101 "hotelCodes": [
102 "string"
103 ],
104 "mealPlans": [
105 "string"
106 ],
107 "hotelClasses": [
108 "string"
109 ],
110 "hotelTypes": [
111 "CityHotel"
112 ],
113 "hotelServices": [
114 "HasAlcohol"
115 ],
116 "pagingId": "string",
117 "pageNumber": 0,
118 "pageRowCount": 0
119 }
120 {{/code}}
121
122
123 == Request example ==
124
125 {{code language="Json"}}
126 {
127 "departureCountryCode": "KZ",
128 "departureCityUID": "f0ba6324-f337-405c-8cc7-23d62cf664e8",
129 "arrivalCountryCode": "AE",
130 "arrivalLocations": [
131 {
132 "type": "city",
133 "label": "Dubai",
134 "value": "f5185fa3-3f56-44ed-bf6b-80386a33caa2",
135 "tag": "Dubai"
136 }
137 ],
138 "checkInDate": "2024-02-05T20:00:00.000Z",
139 "checkInDateTo": "2024-02-10T20:00:00.000Z",
140
141 "nights": 3,
142 "nightsTo": 6,
143
144 "airlineCode": "",
145 "ticketType": "",
146 "directFlightsOnly": true,
147 "longConnectTime": true,
148 "adults": 1,
149 "children": 1,
150 "childrenAges": [
151 2
152 ],
153 "extendedSearch": false,
154 "totalPriceFrom": 100,
155 "totalPriceTo": 15000,
156 "recommended": true,
157 "popular": true,
158 "freeSale": true,
159 "groupByHotel": true,
160 "hotelCodes": [
161
162 ],
163 "mealPlans": [
164
165 ],
166 "hotelClasses": [
167
168 ],
169 "hotelTypes": [
170
171 ],
172 "hotelServices": [
173
174 ],
175 "pagingId": "",
176 "pageNumber": 10,
177 "pageRowCount": 10
178 }
179 {{/code}}
180
181
182 == Response Body ==
183
184 {{code language="json"}}
185 {
186 "error": true,
187 "errorCode": "string",
188 "errorDescription": "string",
189 "userErrorDescription": "string",
190 "packages": [
191 {
192 "id": "string",
193 "priceCurrency": "string",
194 "totalPrice": 0,
195 "agentCommissionPercent": 0,
196 "agentCommissionAmount": 0,
197 "includedExtrasAmount": 0,
198 "priceDifference": 0,
199 "hotel": {
200 "hotelPriceId": "string",
201 "providerId": 0,
202 "hotelName": "string",
203 "hotelCode": "string",
204 "nigths": 0,
205 "mealPlan": "string",
206 "hotelClass": "string",
207 "availabilityType": "OnRequest",
208 "availableRoomsCount": 0,
209 "fewRooms": true,
210 "roomCategoryCode": "string",
211 "roomCategoryName": "string",
212 "placementTypeName": "string",
213 "placementDescription": "string",
214 "checkInDate": "2023-12-14T13:47:13.396Z",
215 "checkOutDate": "2023-12-14T13:47:13.396Z",
216 "adults": 0,
217 "children": 0,
218 "districtUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
219 "districtName": "string",
220 "cityUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
221 "cityName": "string",
222 "countryCode": "string",
223 "countryName": "string",
224 "hasAlcohol": true,
225 "hasFreeWifi": true,
226 "hasMetro": true,
227 "hasPool": true,
228 "hasMall": true,
229 "cancellationPolicyDescription": "string",
230 "cancellationPolicy": {
231 "cancellationPolicyCode": "string",
232 "noShowChargeValue": 0,
233 "noShowChargeValueType": "string",
234 "earlyDepartureChargeValue": 0,
235 "earlyDepartureChargeValueType": "string",
236 "conditions": [
237 {
238 "timeunits": 0,
239 "timeunitType": "string",
240 "timeOffsetTypeName": "string",
241 "chargeValue": 0,
242 "chargeValueType": "string"
243 }
244 ]
245 }
246 },
247 "flight": {
248 "id": "string",
249 "departureDate": "2023-12-14T13:47:13.396Z",
250 "returnDate": "2023-12-14T13:47:13.396Z",
251 "departureTicketsLeft": 0,
252 "returnTicketsLeft": 0,
253 "departureAvailabilityType": "OnRequest",
254 "returnAvailabilityType": "OnRequest",
255 "isTwoWay": true,
256 "departureSegments": [
257 {
258 "airlineCode": "string",
259 "airlineName": "string",
260 "flightCode": "string",
261 "class": "string",
262 "lugageWeight": 0,
263 "handLugageWeight": 0,
264 "departureFlightDate": "2023-12-14T13:47:13.396Z",
265 "departureCountryName": "string",
266 "departureCityName": "string",
267 "departureAirportCode": "string",
268 "departureAirportName": "string",
269 "departureTerminalCode": "string",
270 "arrivalFlightDate": "2023-12-14T13:47:13.396Z",
271 "arrivalCountryName": "string",
272 "arrivalCityName": "string",
273 "arrivalAirportCode": "string",
274 "arrivalAirportName": "string",
275 "arrivalTerminalCode": "string",
276 "flightDuration": "string",
277 "baggages": [
278 {
279 "baggageCode": "string",
280 "description": "string",
281 "price": 0,
282 "currency": "string",
283 "included": true
284 }
285 ]
286 }
287 ],
288 "returnSegments": [
289 {
290 "airlineCode": "string",
291 "airlineName": "string",
292 "flightCode": "string",
293 "class": "string",
294 "lugageWeight": 0,
295 "handLugageWeight": 0,
296 "departureFlightDate": "2023-12-14T13:47:13.396Z",
297 "departureCountryName": "string",
298 "departureCityName": "string",
299 "departureAirportCode": "string",
300 "departureAirportName": "string",
301 "departureTerminalCode": "string",
302 "arrivalFlightDate": "2023-12-14T13:47:13.396Z",
303 "arrivalCountryName": "string",
304 "arrivalCityName": "string",
305 "arrivalAirportCode": "string",
306 "arrivalAirportName": "string",
307 "arrivalTerminalCode": "string",
308 "flightDuration": "string",
309 "baggages": [
310 {
311 "baggageCode": "string",
312 "description": "string",
313 "price": 0,
314 "currency": "string",
315 "included": true
316 }
317 ]
318 }
319 ]
320 },
321 "extraServices": [
322 {
323 "extraServiceCode": "string",
324 "extraServiceTypeCode": "string",
325 "isMandatory": 0,
326 "extraServiceName": "string",
327 "minimalServiceAmount": 0,
328 "includedPriceCode": "string",
329 "prices": [
330 {
331 "extraServicePriceCode": "string",
332 "displayName": "string",
333 "restrictionInfo": "string",
334 "additionalInfo": "string",
335 "price": 0,
336 "extraPrice": 0,
337 "currency": "string"
338 }
339 ]
340 }
341 ],
342 "insurancePrice": {
343 "name": "string",
344 "price": 0,
345 "priceSurcarge": 0,
346 "actualStartDate": "2023-12-14T13:47:13.396Z",
347 "actualEndDate": "2023-12-14T13:47:13.396Z",
348 "optional": true,
349 "includedInPackagePrice": true
350 }
351 }
352 ],
353 "pagingId": "string",
354 "pageNumber": 0,
355 "pageCount": 0
356 }
357 {{/code}}
358
359
360 == Response example ==
361
362 {{code language="Json"}}
363 {
364 "packages": [
365 {
366 "id": "tour:b01c168e-2ea7-4ea6-b6e0-55abb8cab0a0:da894a1e-88c0-4877-b216-0eeeabe186f3:4298d06f-4344-4a39-ad98-071b7760cf30",
367 "priceCurrency": "USD",
368 "totalPrice": 1033.53,
369 "agentCommissionPercent": 0.0,
370 "agentCommissionAmount": 0.0,
371 "includedExtrasAmount": 0,
372 "priceDifference": 0,
373 "hotel": {
374 "hotelPriceId": "da894a1e-88c0-4877-b216-0eeeabe186f3",
375 "providerId": 13,
376 "hotelName": "Mercure Dubai Barsha Heights Suites Apartments",
377 "hotelCode": "5f125310-7025-4807-a4c6-49cd284c9c14",
378 "nigths": 3,
379 "mealPlan": "BB",
380 "hotelClass": "4",
381 "availabilityType": "FreeSale",
382 "availableRoomsCount": 0,
383 "fewRooms": true,
384 "roomCategoryCode": "bc5f2224-bd4c-49b2-ab57-01eb7fa80d41",
385 "roomCategoryName": "1 B/R Suite City View",
386 "placementTypeName": "DBL",
387 "checkInDate": "2024-02-09T20:00:00.000Z",
388 "checkOutDate": "2024-02-12T20:00:00.000Z",
389 "adults": 1,
390 "children": 1,
391 "districtUID": "4c65f6ed-902b-4fd8-9419-af7884c22c5e",
392 "districtName": "Al Barsha",
393 "cityUID": "f5185fa3-3f56-44ed-bf6b-80386a33caa2",
394 "cityName": "Dubai",
395 "countryCode": "AE",
396 "countryName": "United Arab Emirates",
397 "hasAlcohol": false,
398 "hasFreeWifi": true,
399 "hasMetro": true,
400 "hasPool": true,
401 "hasMall": false,
402 "cancellationPolicyDescription": "Cancellation Policy: 5 Day Before Arrival: 100.00 %, Early Departure: 100.00 %, NoShow: 100.00 %",
403 "cancellationPolicy": {
404 "noShowChargeValue": 100.0,
405 "noShowChargeValueType": "%",
406 "earlyDepartureChargeValue": 100.0,
407 "earlyDepartureChargeValueType": "%",
408 "conditions": [
409 {
410 "timeunits": 5,
411 "timeunitType": "Day",
412 "timeOffsetTypeName": "Before Arrival",
413 "chargeValue": 100.0,
414 "chargeValueType": "%"
415 }
416 ]
417 }
418 },
419 "flight": {
420 "id": "4298d06f-4344-4a39-ad98-071b7760cf30",
421 "departureDate": "2024-02-09T20:00:00.000Z",
422 "returnDate": "2024-02-12T20:00:00.000Z",
423 "departureTicketsLeft": 7,
424 "returnTicketsLeft": 7,
425 "departureAvailabilityType": "FewPlaces",
426 "returnAvailabilityType": "FewPlaces",
427 "isTwoWay": true,
428 "sameBaggageForAll": false,
429 "totalBaggage": false,
430 "departureSegments": [
431 {
432 "airlineCode": "KC",
433 "airlineName": "Air Astana-",
434 "flightCode": "KC897",
435 "class": "econom",
436 "lugageWeight": 20,
437 "handLugageWeight": 6,
438 "departureFlightDate": "2024-02-09T20:00:00.000Z",
439 "departureCountryName": "Kazakhstan",
440 "departureCityName": "Almaty",
441 "departureAirportCode": "ALA",
442 "departureAirportName": "Almaty Intl Airport",
443 "departureTerminalCode": "ALA",
444 "arrivalFlightDate": "2024-02-09T20:00:00.000Z",
445 "arrivalCountryName": "United Arab Emirates",
446 "arrivalCityName": "Dubai",
447 "arrivalAirportCode": "DXB",
448 "arrivalAirportName": "Dubai Intl Airport",
449 "arrivalTerminalCode": "DXB1",
450 "flightDuration": "0h 50m"
451 }
452 ],
453 "returnSegments": [
454 {
455 "airlineCode": "KC",
456 "airlineName": "Air Astana-",
457 "flightCode": "KC900",
458 "class": "econom",
459 "lugageWeight": 20,
460 "handLugageWeight": 6,
461 "departureFlightDate": "2024-02-12T20:00:00.000Z",
462 "departureCountryName": "United Arab Emirates",
463 "departureCityName": "Dubai",
464 "departureAirportCode": "DXB",
465 "departureAirportName": "Dubai Intl Airport",
466 "departureTerminalCode": "DXB1",
467 "arrivalFlightDate": "2024-02-12T20:00:00.000Z",
468 "arrivalCountryName": "Kazakhstan",
469 "arrivalCityName": "Almaty",
470 "arrivalAirportCode": "ALA",
471 "arrivalAirportName": "Almaty Intl Airport",
472 "arrivalTerminalCode": "ALA",
473 "flightDuration": "8h 15m"
474 }
475 ],
476 "passengers": [
477 {
478 "id": "42768722011000004-A1",
479 "isAdult": true,
480 "forwardBaggages": [],
481 "backwardBaggages": []
482 },
483 {
484 "id": "42768722011000004-C1",
485 "isAdult": false,
486 "forwardBaggages": [],
487 "backwardBaggages": []
488 }
489 ]
490 },
491 "extraServices": [],
492 "insurancePrice": {
493 "name": "Medical INS (N10000)",
494 "price": 17.92,
495 "priceSurcarge": 0.0,
496 "actualStartDate": "2024-02-09T20:00:00.000Z",
497 "actualEndDate": "2024-02-12T20:00:00.000Z",
498 "optional": false,
499 "includedInPackagePrice": true
500 }
501 }
502 ],
503 "pagingId": "79",
504 "pageNumber": 10,
505 "pageCount": 2452,
506 "totalCount": 2452,
507 "error": false
508 }
509 {{/code}}
510
511
512 === Schema ===
513
514 {{success}}
515 SearchTourPackagesResponse{
516
517 |error|boolean
518 |errorCode|string
519 nullable: true
520 |errorDescription|string
521 nullable: true
522 |userErrorDescription|string
523 nullable: true
524 |packages|[
525 nullable: trueTourPackage{(((
526 |id|string
527 nullable: true
528 |priceCurrency|string
529 nullable: true
530 |totalPrice|number($double)
531 |agentCommissionPercent|number($double)
532 |agentCommissionAmount|number($double)
533 |includedExtrasAmount|number($double)
534 |priceDifference|number($double)
535 |hotel|PackageHotel{(((
536 |hotelPriceId|string
537 nullable: true
538 |providerId|integer($int32)
539 |hotelName|string
540 nullable: true
541 |hotelCode|string
542 nullable: true
543 |nigths|integer($int32)
544 |mealPlan|string
545 nullable: true
546 |hotelClass|string
547 nullable: true
548 |availabilityType|RoomAvailabilityTypeEnumstringEnum:
549 [ OnRequest, FreeSale, StopSale ]
550 |availableRoomsCount|integer($int32)
551 |fewRooms|boolean
552 |roomCategoryCode|string
553 nullable: true
554 |roomCategoryName|string
555 nullable: true
556 |placementTypeName|string
557 nullable: true
558 |placementDescription|string
559 nullable: true
560 |checkInDate|string($date-time)
561 |checkOutDate|string($date-time)
562 |adults|integer($int32)
563 |children|integer($int32)
564 |districtUID|string($uuid)
565 nullable: true
566 |districtName|string
567 nullable: true
568 |cityUID|string($uuid)
569 nullable: true
570 |cityName|string
571 nullable: true
572 |countryCode|string
573 nullable: true
574 |countryName|string
575 nullable: true
576 |hasAlcohol|boolean
577 |hasFreeWifi|boolean
578 |hasMetro|boolean
579 |hasPool|boolean
580 |hasMall|boolean
581 |cancellationPolicyDescription|string
582 nullable: true
583 |cancellationPolicy|CancellationPolicyExchange{(((
584 |cancellationPolicyCode|string
585 nullable: true
586 |noShowChargeValue|number($double)
587 nullable: true
588 |noShowChargeValueType|string
589 nullable: true
590 |earlyDepartureChargeValue|number($double)
591 nullable: true
592 |earlyDepartureChargeValueType|string
593 nullable: true
594 |conditions|[
595 nullable: trueCancellationPolicyConditionExchange{(((
596 |timeunits|integer($int32)
597 |timeunitType|string
598 nullable: true
599 |timeOffsetTypeName|string
600 nullable: true
601 |chargeValue|number($double)
602 nullable: true
603 |chargeValueType|string
604 nullable: true
605
606 }]
607 )))
608
609 }
610 )))
611
612 }
613 )))
614 |flight|PackageFlight{(((
615 |id|string
616 nullable: true
617 |departureDate|string($date-time)
618 |returnDate|string($date-time)
619 nullable: true
620 |departureTicketsLeft|integer($int32)
621 |returnTicketsLeft|integer($int32)
622 |departureAvailabilityType|FlightAvailabilityTypestringEnum:
623 [ OnRequest, FreeSale, FewPlaces, StopSale ]
624 |returnAvailabilityType|FlightAvailabilityTypestringEnum:
625 [ OnRequest, FreeSale, FewPlaces, StopSale ]
626 |isTwoWay|boolean
627 |departureSegments|[
628 nullable: trueFlightSegment{(((
629 |airlineCode|string
630 nullable: true
631 |airlineName|string
632 nullable: true
633 |flightCode|string
634 nullable: true
635 |class|string
636 nullable: true
637 |lugageWeight|number($double)
638 |handLugageWeight|number($double)
639 |departureFlightDate|string($date-time)
640 |departureCountryName|string
641 nullable: true
642 |departureCityName|string
643 nullable: true
644 |departureAirportCode|string
645 nullable: true
646 |departureAirportName|string
647 nullable: true
648 |departureTerminalCode|string
649 nullable: true
650 |arrivalFlightDate|string($date-time)
651 |arrivalCountryName|string
652 nullable: true
653 |arrivalCityName|string
654 nullable: true
655 |arrivalAirportCode|string
656 nullable: true
657 |arrivalAirportName|string
658 nullable: true
659 |arrivalTerminalCode|string
660 nullable: true
661 |flightDuration|string
662 nullable: true
663 |baggages|[
664 nullable: trueBaggage{(((
665 |baggageCode|string
666 nullable: true
667 |description|string
668 nullable: true
669 |price|number($double)
670 |currency|string
671 nullable: true
672 |included|boolean
673
674 }]
675 )))
676
677 }]
678 )))
679 |returnSegments|[
680 nullable: trueFlightSegment{(((
681 |airlineCode|string
682 nullable: true
683 |airlineName|string
684 nullable: true
685 |flightCode|string
686 nullable: true
687 |class|string
688 nullable: true
689 |lugageWeight|number($double)
690 |handLugageWeight|number($double)
691 |departureFlightDate|string($date-time)
692 |departureCountryName|string
693 nullable: true
694 |departureCityName|string
695 nullable: true
696 |departureAirportCode|string
697 nullable: true
698 |departureAirportName|string
699 nullable: true
700 |departureTerminalCode|string
701 nullable: true
702 |arrivalFlightDate|string($date-time)
703 |arrivalCountryName|string
704 nullable: true
705 |arrivalCityName|string
706 nullable: true
707 |arrivalAirportCode|string
708 nullable: true
709 |arrivalAirportName|string
710 nullable: true
711 |arrivalTerminalCode|string
712 nullable: true
713 |flightDuration|string
714 nullable: true
715 |baggages|[
716 nullable: trueBaggage{(((
717 |baggageCode|string
718 nullable: true
719 |description|string
720 nullable: true
721 |price|number($double)
722 |currency|string
723 nullable: true
724 |included|boolean
725
726 }]
727 )))
728
729 }]
730 )))
731
732 }
733 )))
734 |extraServices|[
735 nullable: trueHotelExtraServiceBase{(((
736 |extraServiceCode|string
737 nullable: true
738 |extraServiceTypeCode|string
739 nullable: true
740 |isMandatory|integer($int32)
741 |extraServiceName|string
742 nullable: true
743 |minimalServiceAmount|number($double)
744 |includedPriceCode|string
745 nullable: true
746 |prices|[
747 nullable: trueHotelExtraServicePriceBase{(((
748 |extraServicePriceCode|string
749 nullable: true
750 |displayName|string
751 nullable: true
752 |restrictionInfo|string
753 nullable: true
754 |additionalInfo|string
755 nullable: true
756 |price|number($double)
757 |extraPrice|number($double)
758 |currency|string
759 nullable: true
760
761 }]
762 )))
763
764 }]
765 )))
766 |insurancePrice|InsurancePrice{(((
767 |name|string
768 nullable: true
769 |price|number($double)
770 |priceSurcarge|number($double)
771 |actualStartDate|string($date-time)
772 |actualEndDate|string($date-time)
773 |optional|boolean
774 |includedInPackagePrice|boolean
775
776 }
777 )))
778
779 }]
780 )))
781 |pagingId|string
782 nullable: true
783 |pageNumber|integer($int64)
784 |pageCount|integer($int64)
785
786 }
787 {{/success}}
788
789
790 == Definitions ==
791
792 **Request Parameters **
793
794 (% class="table-bordered" %)
795 |=Field|=Type|=Description
796 |departureCountryCode|string|The ISO 3166-1 alpha-2 country code for the departure country. For example, "KZ" for Kazakhstan.  **Mandatory**
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**
799 |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.
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.
804 |airlineCode|string|The code of the airline. 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
806 |directFlightsOnly|boolean|Indicates whether to search for direct flights only.
807 |longConnectTime|boolean|Indicates whether to include flights with long connection times.
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.
811 |extendedSearch|boolean|Indicates whether to perform an extended search.
812 |totalPriceFrom|float|The minimum total price.
813 |totalPriceTo|float|The maximum total price.
814 |recommended|boolean|Indicates whether to include recommended packages.
815 |popular|boolean|Indicates whether to include popular packages.
816 |freeSale|boolean|Indicates whether to include free sale packages.
817 |groupByHotel|boolean|Indicates whether to group the results by hotel.
818 |hotelCodes|array|An array of strings, each representing a hotel code. This field can be empty.
819 |mealPlans|array|An array of meal plans. This field can be empty.
820 |hotelClasses|array|An array of hotel classes. This field can be empty.
821 |hotelTypes|array|An array of hotel types. This field can be empty.
822 |hotelServices|array|An array of hotel services. This field can be empty.
823 |pagingId|string|The paging ID for paginated results. This field can be empty.
824 |pageNumber|integer|The page number for paginated results.
825 |pageRowCount|integer|The number of rows per page for paginated results.
826
827 (% class="wikigeneratedid" %)
828 **Response Parameters**
829
830 (% class="table-bordered" %)
831 |=Field|=Type|=Description
832 |packages|array|An array of packages available. Each package contains:
833 |id|string|A unique identifier for the package.
834 |priceCurrency|string|The currency in which the price is displayed. examples -  •   KZT - ₸ •   USD - $ •   RUB - ₽ •   EUR - € •   UZS - ЛВ •   AZN - ₼
835 |totalPrice|float|The total price of the package.
836 |agentCommissionPercent|float|The commission percentage for the agent.
837 |agentCommissionAmount|float|The commission amount for the agent.
838 |includedExtrasAmount|integer|The amount of extras included in the package.
839 |priceDifference|integer|The difference in price from the original price.
840 |hotel|object|An object containing details about the hotel.
841 |hotelPriceId|string|A unique identifier for the hotel price.
842 |providerId|integer|A unique identifier for the provider.
843 |hotelName|string|The name of the hotel.
844 |hotelCode|string|A unique code for the hotel.
845 |nigths|integer|The number of nights for the stay.
846 |mealPlan|string|The meal plan for the stay.
847 |hotelClass|string|The class or rating of the hotel.
848 |availabilityType|string|The availability type of the hotel.
849 |availableRoomsCount|integer|The number of available rooms in the hotel.
850 |fewRooms|boolean|Indicates whether there are few rooms left.
851 |roomCategoryCode|string|A unique code for the room category.
852 |roomCategoryName|string|The name of the room category.
853 |placementTypeName|string|The name of the placement type.
854 |checkInDate|string|The check-in date in ISO 8601 format.
855 |checkOutDate|string|The check-out date in ISO 8601 format.
856 |adults|integer|The number of adults for the stay.
857 |children|integer|The number of children for the stay.
858 |districtUID|string|A unique identifier for the district.
859 |districtName|string|The name of the district.
860 |cityUID|string|A unique identifier for the city.
861 |cityName|string|The name of the city.
862 |countryCode|string|The ISO 3166-1 alpha-2 country code.
863 |countryName|string|The name of the country.
864 |hasAlcohol|boolean|Indicates whether the hotel serves alcohol.
865 |hasFreeWifi|boolean|Indicates whether the hotel offers free Wi-Fi.
866 |hasMetro|boolean|Indicates whether the hotel is near a metro station.
867 |hasPool|boolean|Indicates whether the hotel has a pool.
868 |hasMall|boolean|Indicates whether the hotel is near a shopping mall.
869 |cancellationPolicyDescription|string|The description of the cancellation policy.
870 |cancellationPolicy|object|An object containing details about the cancellation policy.
871 |flight|object|An object containing details about the flight.
872 |id|string|A unique identifier for the flight.
873 |departureDate|string|The departure date in ISO 8601 format.
874 |returnDate|string|The return date in ISO 8601 format.
875 |departureTicketsLeft|integer|The number of departure tickets left.
876 |returnTicketsLeft|integer|The number of return tickets left.
877 |departureAvailabilityType|string|The availability type of the departure flight.
878 |returnAvailabilityType|string|The availability type of the return flight.
879 |isTwoWay|boolean|Indicates whether the flight is two-way.
880 |sameBaggageForAll|boolean|Indicates whether the same baggage is applicable for all passengers.
881 |totalBaggage|boolean|Indicates whether total baggage is included.
882 |departureSegments|array|An array of objects, each representing a departure segment.
883 |returnSegments|array|An array of objects, each representing a return segment.
884 |passengers|array|An array of objects, each representing a passenger.
885 |extraServices|array|An array of extra services included in the package.
886 |insurancePrice|object|An object containing details about the insurance price.
887 |pagingId|string|The paging ID for paginated results.
888 |pageNumber|integer|The page number for paginated results.
889 |pageCount|integer|The total number of pages.
890 |totalCount|integer|The total count of packages.
891 |error|boolean|Indicates whether there was an error.
892
893 === Paging and Caching ===
894
895 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:
896
897
898 ==== First request ====
899
900 {{code language="Json"}}
901 {
902 "pagingId": "",
903 "pageNumber": 1,
904 "pageRowCount":10
905 }
906 {{/code}}
907
908 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.
909
910
911 ==== Request with caching ====
912
913 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": "",
914
915 {{code language="Json"}}
916 {
917 "pagingId": "80",
918 "pageNumber": 1,
919 "pageRowCount":10
920 }
921 {{/code}}
922
923
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
975 === Search parameter options ===
976
977 in the request body it's available to filter search results with parameters. parameter examples:
978
979 {{code language="Json"}}
980 { "totalPriceFrom": 500,
981 "totalPriceTo": 10000,
982 "hotelTypes": [
983 "CityHotel",
984 "BeachHotel",
985 "SecondLineBeach"
986 ],
987 "hotelClasses": [
988 "1",
989 "2",
990 "3",
991 "4",
992 "5",
993 "6"
994 ],
995 "hotelServices": [
996 "HasAlcohol",
997 "HasFreeWifi",
998 "HasMetro",
999 "HasPool",
1000 "HasMall"
1001 ],
1002 "mealPlans": [
1003 "RO",
1004 "BB",
1005 "HB",
1006 "FB",
1007 "AL"
1008 ]
1009 }
1010 {{/code}}
1011
1012
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.
1018
1019 **ticketType **definition of avia tickets classes.
1020
1021 enum: F - First, B - Business, P = Premium, C - Coach.
1022
1023 == Important ==
1024
1025 {{error}}
1026 === Implementing Authorization in Subsequent Requests ===
1027
1028 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:
1029
1030 * **Header Key:** Authorization
1031 * **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.
1032
1033 Additionally, to ensure your requests are properly formatted and recognized, include the following headers:
1034
1035 * **Content-Type:** Specify this header as application/json to indicate the format of the request body.
1036 * **Header Key:** X-nugios-timezone
1037 * **Header Value:** 240 - Adjust this value to match your local timezone offset in minutes.
1038
1039 Incorporating these headers with their respective values is essential for the successful processing of your API requests.
1040 {{/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 )))