Wiki source code of 1. SearchTourPackages

Version 43.1 by Giorgi Mdivnishvili on 2024/04/16 18:50

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