Wiki source code of 1. SearchTourPackages

Last modified by Giorgi Mdivnishvili on 2025/02/12 15:25

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