Changes for page 1. SearchTourPackages
Last modified by Giorgi Mdivnishvili on 2025/10/22 15:30
From version 11.1
edited by Giorgi Mdivnishvili
on 2023/12/15 12:22
on 2023/12/15 12:22
Change comment:
There is no comment for this version
To version 38.4
edited by Giorgi Mdivnishvili
on 2024/04/16 09:13
on 2024/04/16 09:13
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 -SearchTourPackages 1 +1. SearchTourPackages - Content
-
... ... @@ -6,13 +6,36 @@ 6 6 7 7 = Method Description = 8 8 9 -T heinitialmethodof theintegrationprocessisauthorization.You will be providedwithatest userusername and passwordtogeneratethe accesstokenthatyouwillneed topassinallthefollowingmethods.9 +Tour package mean, tour with hotel and flight together In case of variation also with transfer option. Using this method gives data about full package availability with flight and hotel options. 10 10 11 +It's possible to receive data as current dates, also in date ranges using parameter "stayDays": 0, "stayDaysTo": 0. the maximum difference between the days can be 7. Below you can see examples. 11 11 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 + 12 12 == Endpoint URL - [POST] == 13 13 14 14 {{info}} 15 -[[https:~~/~~/ online-api.kazunion.com/api/TourPackages/SearchTourPackages>>https://online-api.kazunion.com/api/TourPackages/SearchTourPackages]]38 +[[https:~~/~~/integration.kazunion.com/api/TourPackages/SearchTourPackages>>https://integration.kazunion.com/api/TourPackages/SearchTourPackages]] 16 16 {{/info}} 17 17 18 18 == Request Parameters == ... ... @@ -40,13 +40,13 @@ 40 40 "tag": "string" 41 41 } 42 42 ], 43 - "checkInDate": "2023-12-14 T13:43:54.766Z",44 - "checkInDateTo": "2023-12-14 T13:43:54.766Z",45 - "checkOutDate": "2023-12-14 T13:43:54.766Z",66 + "checkInDate": "2023-12-14", 67 + "checkInDateTo": "2023-12-14", 68 + "checkOutDate": "2023-12-14", 46 46 "stayDays": 0, 47 47 "stayDaysTo": 0, 48 - "departureDate": "2023-12-14 T13:43:54.766Z",49 - "returnDate": "2023-12-14 T13:43:54.766Z",71 + "departureDate": "2023-12-14", 72 + "returnDate": "2023-12-14", 50 50 "airlineCode": "string", 51 51 "ticketType": "string", 52 52 "directFlightsOnly": true, ... ... @@ -85,6 +85,65 @@ 85 85 {{/code}} 86 86 87 87 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 + 88 88 == Response Body == 89 89 90 90 {{code language="json"}} ... ... @@ -264,271 +264,690 @@ 264 264 {{/code}} 265 265 266 266 267 -== =example ===349 +== Response example == 268 268 269 269 {{code language="Json"}} 270 -X 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 +} 271 271 {{/code}} 272 272 273 273 274 274 === Schema === 275 275 276 -{{c odelanguage="none"}}504 +{{success}} 277 277 SearchTourPackagesResponse{ 278 -error boolean 279 -errorCode string 280 -nullable: true 281 -errorDescription string 282 -nullable: true 283 -userErrorDescription string 284 -nullable: true 285 -packages [ 286 -nullable: true 287 -TourPackage{ 288 -cacheKey string 289 -nullable: true 290 -id string 291 -nullable: true 292 -priceCurrency string 293 -nullable: true 294 -totalPrice number($double) 295 -agentCommissionPercent number($double) 296 -agentCommissionAmount number($double) 297 -includedExtrasAmount number($double) 298 -priceDifference number($double) 299 -hotel PackageHotel{ 300 -hotelPriceId string 301 -nullable: true 302 -providerId integer($int32) 303 -hotelName string 304 -nullable: true 305 -hotelCode string 306 -nullable: true 307 -nigths integer($int32) 308 -mealPlan string 309 -nullable: true 310 -hotelClass string 311 -nullable: true 312 -availabilityType RoomAvailabilityTypeEnum[...] 313 -availableRoomsCount integer($int32) 314 -fewRooms boolean 315 -roomCategoryCode string 316 -nullable: true 317 -roomCategoryName string 318 -nullable: true 319 -placementTypeName string 320 -nullable: true 321 -placementDescription string 322 -nullable: true 323 -checkInDate string($date-time) 324 -checkOutDate string($date-time) 325 -adults integer($int32) 326 -children integer($int32) 327 -districtUID string($uuid) 328 -nullable: true 329 -districtName string 330 -nullable: true 331 -cityUID string($uuid) 332 -nullable: true 333 -cityName string 334 -nullable: true 335 -countryCode string 336 -nullable: true 337 -countryName string 338 -nullable: true 339 -hasAlcohol boolean 340 -hasFreeWifi boolean 341 -hasMetro boolean 342 -hasPool boolean 343 -hasMall boolean 344 -cancellationPolicyDescription string 345 -nullable: true 346 -cancellationPolicy CancellationPolicyExchange{ 347 -cancellationPolicyCode string 348 -nullable: true 349 -noShowChargeValue number($double) 350 -nullable: true 351 -noShowChargeValueType string 352 -nullable: true 353 -earlyDepartureChargeValue number($double) 354 -nullable: true 355 -earlyDepartureChargeValueType string 356 -nullable: true 357 -conditions [ 358 -nullable: true 359 -CancellationPolicyConditionExchange{ 360 -timeunits integer($int32) 361 -timeunitType string 362 -nullable: true 363 -timeOffsetTypeName string 364 -nullable: true 365 -chargeValue number($double) 366 -nullable: true 367 -chargeValueType string 368 -nullable: true 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 + 369 369 }] 599 +))) 600 + 370 370 } 602 +))) 603 + 371 371 } 372 -flight PackageFlight{ 373 -id string 374 -nullable: true 375 -departureDate string($date-time) 376 -returnDate string($date-time) 377 -nullable: true 378 -departureTicketsLeft integer($int32) 379 -returnTicketsLeft integer($int32) 380 -departureAvailabilityType FlightAvailabilityTypestring 381 -Enum: 382 -[ OnRequest, FreeSale, FewPlaces, StopSale ] 383 -returnAvailabilityType FlightAvailabilityTypestring 384 -Enum: 385 -[ OnRequest, FreeSale, FewPlaces, StopSale ] 386 -isTwoWay boolean 387 -departureSegments [ 388 -nullable: true 389 -FlightSegment{ 390 -airlineCode string 391 -nullable: true 392 -airlineName string 393 -nullable: true 394 -flightCode string 395 -nullable: true 396 -class string 397 -nullable: true 398 -lugageWeight number($double) 399 -handLugageWeight number($double) 400 -departureFlightDate string($date-time) 401 -departureCountryName string 402 -nullable: true 403 -departureCityName string 404 -nullable: true 405 -departureAirportCode string 406 -nullable: true 407 -departureAirportName string 408 -nullable: true 409 -departureTerminalCode string 410 -nullable: true 411 -arrivalFlightDate string($date-time) 412 -arrivalCountryName string 413 -nullable: true 414 -arrivalCityName string 415 -nullable: true 416 -arrivalAirportCode string 417 -nullable: true 418 -arrivalAirportName string 419 -nullable: true 420 -arrivalTerminalCode string 421 -nullable: true 422 -flightDuration string 423 -nullable: true 424 -baggages [ 425 -nullable: true 426 -Baggage{ 427 -baggageCode string 428 -nullable: true 429 -description string 430 -nullable: true 431 -price number($double) 432 -currency string 433 -nullable: true 434 -included boolean 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 + 435 435 }] 667 +))) 668 + 436 436 }] 437 - returnSegments [438 - nullable:true439 -FlightSegment{ 440 -airlineCode string441 -nullable: true442 -airlineName string443 -nullable: true444 -flightCode string445 -nullable: true446 -class string447 -nullable: true448 -lugageWeight number($double)449 -handLugageWeight number($double)450 -departureFlightDate string($date-time)451 -departureCountryName string452 -nullable: true453 -departureCityName string454 -nullable: true455 -departureAirportCode string456 -nullable: true457 -departureAirportName string458 -nullable: true459 -departureTerminalCode string460 -nullable: true461 -arrivalFlightDate string($date-time)462 -arrivalCountryName string463 -nullable: true464 -arrivalCityName string465 -nullable: true466 -arrivalAirportCode string467 -nullable: true468 -arrivalAirportName string469 -nullable: true470 -arrivalTerminalCode string471 -nullable: true472 -flightDuration string473 -nullable: true474 -baggages [475 -nullable: true476 - Baggage{477 - baggageCode string478 - nullable:true479 - description string480 -nu llable: true481 - price number($double)482 - currency string483 -n ullable: true484 - included boolean670 +))) 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 + 485 485 }] 719 +))) 720 + 486 486 }] 722 +))) 723 + 487 487 } 488 - extraServices [489 - nullable:true490 -HotelExtraServiceBase{ 491 -extraServiceCode string492 -nullable: true493 -extraServiceTypeCode string494 -nullable: true495 -isMandatory integer($int32)496 -extraServiceName string497 -nullable: true498 -minimalServiceAmount number($double)499 -includedPriceCode string500 -nullable: true501 -prices [502 -nullable: true503 - HotelExtraServicePriceBase{504 - extraServicePriceCode string505 - nullable:true506 - displayNamestring507 - nullable:true508 - restrictionInfo string509 -n ullable:true510 - additionalInfo string511 -nu llable: true512 - pricenumber($double)513 - extraPricenumber($double)514 - currency string515 - nullable: true725 +))) 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 + 516 516 }] 754 +))) 755 + 517 517 }] 518 -insurancePrice InsurancePrice{ 519 -name string 520 -nullable: true 521 -price number($double) 522 -priceSurcarge number($double) 523 -actualStartDate string($date-time) 524 -actualEndDate string($date-time) 525 -optional boolean 526 -includedInPackagePrice boolean 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 + 527 527 } 769 +))) 770 + 528 528 }] 529 -pagingId string 530 -nullable: true 531 -pageNumber integer($int64) 532 -pageCount integer($int64) 772 +))) 773 +|pagingId|string 774 +nullable: true 775 +|pageNumber|integer($int64) 776 +|pageCount|integer($int64) 777 + 533 533 } 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. 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 + } 534 534 {{/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 + 1007 +== Important == 1008 + 1009 +{{error}} 1010 +=== Implementing Authorization in Subsequent Requests === 1011 + 1012 +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: 1013 + 1014 +* **Header Key:** Authorization 1015 +* **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. 1016 + 1017 +Additionally, to ensure your requests are properly formatted and recognized, include the following headers: 1018 + 1019 +* **Content-Type:** Specify this header as application/json to indicate the format of the request body. 1020 +* **Header Key:** X-nugios-timezone 1021 +* **Header Value:** 240 - Adjust this value to match your local timezone offset in minutes. 1022 + 1023 +Incorporating these headers with their respective values is essential for the successful processing of your API requests. 1024 +{{/error}} 1025 + 1026 + 1027 + 1028 +(% class="box errormessage" %) 1029 +((( 1030 +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: 1031 + 1032 +[[image:https://xwiki.nugios.com/xwiki/bin/download/APIs/Online%20API/TourPackages/WebHome/1713191255012-154.png?rev=1.1||alt="1713191255012-154.png"]] 1033 + 1034 +in the given example it means that insurance service is mandatory for the tourpackage 1035 +)))