Changes for page 3. CalcCheckout
Last modified by Giorgi Mdivnishvili on 2025/02/03 12:34
From version 1.3
edited by Giorgi Mdivnishvili
on 2024/04/12 18:49
on 2024/04/12 18:49
Change comment:
There is no comment for this version
To version 1.2
edited by Giorgi Mdivnishvili
on 2024/04/12 18:43
on 2024/04/12 18:43
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -7,13 +7,36 @@ 7 7 = Method Description = 8 8 9 9 10 - Once the desiredtourvariation hasbeenselected, the next stepinvolvescalculatingthepackagepricein greaterdetail,typicallyjustbeforeproceedingwith thereservation.Toaccomplishthis,the**CalcCheckout **methodmustbeutilized. Thisstagemarksthepre-bookingphaseof theprocess.10 +This method is specifically designed for the retrieval of hotel pricing information. It supports queries for both current date prices and for prices over a specified date range. 11 11 12 +**Parameters:** 12 12 14 +* stayDays (integer): Indicates the starting point of the stay duration in days. A default value of 0 signifies immediate date pricing retrieval. 15 +* stayDaysTo (integer): Specifies the endpoint of the stay duration in days. The initial value is set to 0, indicating the system will fetch prices for the immediate date by default. 16 + 17 +**Constraints:** 18 + 19 +* The difference between stayDays and stayDaysTo must not exceed 7 days. This limitation is imposed to optimize the query performance and ensure the relevance of the returned data. 20 + 21 +**Implementation:** 22 + 23 +1. **Query Initialization**: Begin by defining the stayDays and stayDaysTo parameters to frame your search criteria. These parameters enable the system to understand the desired duration for which the hotel pricing information is required. 24 +1. **Data Retrieval**: Execute the method with the provided parameters. The system processes the input and queries the database for hotel prices that match the specified duration, taking into account the constraint on the maximum duration difference. 25 +1. **Result Processing**: Upon successful retrieval, the system presents the hotel pricing data. This data is either for the current date (when both parameters are set to 0) or for the defined date range, adhering to the specified duration constraints. 26 + 27 +**Example Usage:** (Examples of API calls or function usage would typically be provided here, demonstrating how to correctly implement the method to retrieve hotel prices based on immediate dates or a specified date range.) 28 + 29 +**Notes:** 30 + 31 +* This method ensures efficient access to hotel pricing information, catering to both immediate and short-term planning needs by leveraging a simple, parameter-driven query mechanism. 32 + 33 +This documentation provides a detailed guide for developers on utilizing the hotel pricing retrieval method, emphasizing parameter usage, operational constraints, and the process flow for executing queries and handling results. 34 + 35 + 13 13 == Endpoint URL - [POST] == 14 14 15 15 {{info}} 16 -[[https:~~/~~/integration.kazunion.com/api/ Checkout/CalcCheckout>>https://integration.kazunion.com/api/Checkout/CalcCheckout]]39 +[[https:~~/~~/integration.kazunion.com/api/OnlyHotelPackages/SearchHotelPrices>>https://integration.kazunion.com/api/OnlyHotelPackages/SearchHotelPrices]] 17 17 {{/info}} 18 18 19 19 ... ... @@ -24,465 +24,157 @@ 24 24 None 25 25 ))) 26 26 27 - 28 28 == Request Body == 29 29 30 30 {{code language="Json"}} 31 31 { 32 - " reservationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",33 - " calcTourPackageRequests": [54 + "countryCode": "string", 55 + "locations": [ 34 34 { 35 - "packageId": "string", 36 - "extraServicePriceCodes": [ 37 - "string" 38 - ], 39 - "flightPassengers": [ 40 - { 41 - "id": "string", 42 - "selectedForwardBaggageCode": "string", 43 - "selectedBackwardBaggageCode": "string" 44 - } 45 - ], 46 - "includeInsurance": true, 47 - "refreshPrices": true 57 + "type": "string", 58 + "parent": "string", 59 + "label": "string", 60 + "subLabel": "string", 61 + "value": "string", 62 + "tag": "string" 48 48 } 49 49 ], 50 - "c alcOnlyHotelPackageRequests":[51 - {52 - packageId": "string",53 - extraServicePriceCodes":[54 - ring"55 - ],56 - includeInsurance":true,57 - freshPrices":true58 - }65 + "checkInDate": "2023-12-14", 66 + "checkInDateTo": "2023-12-14", 67 + "checkOutDate": "2023-12-14", 68 + "stayDays": 0, 69 + "stayDaysTo": 0, 70 + "adults": 0, 71 + "children": 0, 72 + "childrenAges": [ 73 + 0 59 59 ], 60 - "calcOnlyAviaPackageRequests": [ 61 - { 62 - "packageId": "string", 63 - "refreshPrices": true, 64 - "flightPassengers": [ 65 - { 66 - "id": "string", 67 - "selectedForwardBaggageCode": "string", 68 - "selectedBackwardBaggageCode": "string" 69 - } 70 - ] 71 - } 75 + "extendedSearch": true, 76 + "totalPriceFrom": 0, 77 + "totalPriceTo": 0, 78 + "recommended": true, 79 + "popular": true, 80 + "freeSale": true, 81 + "groupByHotel": true, 82 + "hotelCodes": [ 83 + "string" 72 72 ], 73 - "hotels": [ 74 - { 75 - "hotelPriceId": "string", 76 - "agentConfirmationNumber": "string", 77 - "note": "string", 78 - "touristIds": [ 79 - "3fa85f64-5717-4562-b3fc-2c963f66afa6" 80 - ] 81 - } 85 + "mealPlans": [ 86 + "string" 82 82 ], 83 - "tourists": [ 84 - { 85 - "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", 86 - "firstName": "string", 87 - "lastName": "string", 88 - "birthDate": "2024-04-11T03:34:15.828Z", 89 - "passportNumber": "string", 90 - "passportExpiry": "2024-04-11T03:34:15.828Z", 91 - "passportIssue": "2024-04-11T03:34:15.828Z", 92 - "citizenship": "string", 93 - "tin": "string", 94 - "isMale": true, 95 - "flightIds": [ 96 - "string" 97 - ], 98 - "arrivalFlightInfo": { 99 - "flightNumber": "string", 100 - "terminalCode": "string", 101 - "date": "2024-04-11T03:34:15.828Z", 102 - "time": "string" 103 - }, 104 - "departureFlightInfo": { 105 - "flightNumber": "string", 106 - "terminalCode": "string", 107 - "date": "2024-04-11T03:34:15.828Z", 108 - "time": "string" 109 - }, 110 - "selectedVisaId": "string", 111 - "transfers": [ 112 - { 113 - "id": "string", 114 - "selectedTransferPriceId": "string" 115 - } 116 - ] 117 - } 88 + "hotelClasses": [ 89 + "string" 118 118 ], 119 - "note": "string", 120 - "contactPhone": "string" 91 + "hotelTypes": [ 92 + "CityHotel" 93 + ], 94 + "hotelServices": [ 95 + "HasAlcohol" 96 + ], 97 + "pagingId": "string", 98 + "pageNumber": 0, 99 + "pageRowCount": 0 121 121 } 122 - 123 123 {{/code}} 124 124 125 -(% class="wikigeneratedid" id="HRequestBodyexample" %) 126 -(% id="cke_bm_10575S" style="display:none" %) 127 - 128 - 129 - 130 130 == Request Body example == 131 131 105 + 132 132 {{code language="Json"}} 133 133 { 134 - "calcTourPackageRequests": [ 135 - { 136 - "refreshPrices": true, 137 - "packageId": "tour:7caef71d-25e3-4882-b0db-81e766af2b72:fa7a89d5-1c20-4004-b3d2-f8d08163827f:53552191-59ea-469d-ae9d-5b848da8839d", 138 - "flightPassengers": [ 139 - { 140 - "id": "53552191-59ea-469d-ae9d-5b848da8839d-A1", 141 - "selectedForwardBaggageCode": "INCLUDED", 142 - "selectedBackwardBaggageCode": "INCLUDED" 143 - }, 144 - { 145 - "id": "53552191-59ea-469d-ae9d-5b848da8839d-A2", 146 - "selectedForwardBaggageCode": "INCLUDED", 147 - "selectedBackwardBaggageCode": "INCLUDED" 148 - } 149 - ], 150 - "extraServicePriceCodes": [], 151 - "includeInsurance": true 152 - } 153 - ], 154 - "calcOnlyHotelPackageRequests": [], 155 - "calcOnlyAviaPackageRequests": [] 156 -} 157 -{{/code}} 158 - 159 - 160 -== Response == 161 - 162 -{{code language="json"}} 163 -{ 164 - "error": true, 165 - "errorCode": "string", 166 - "errorDescription": "string", 167 - "userErrorDescription": "string", 168 - "priceCurrency": "string", 169 - "totalPrice": 0, 170 - "agentCommissionPercent": 0, 171 - "agentCommissionAmount": 0, 172 - "requiredCitizenIdentifiers": [ 173 - { 174 - "countryCode": "string", 175 - "identifierType": "TIN" 176 - } 108 + "countryCode": "AE", 109 + "checkInDate": "2024-02-15", 110 + "checkInDateTo": "2024-02-20", 111 + 112 + "stayDays": 4, 113 + "stayDaysTo": 6, 114 + "adults": 1, 115 + "children": 1, 116 + "childrenAges": [ 117 + 1 177 177 ], 178 - "hotels": [ 179 - { 180 - "hotelPriceId": "string", 181 - "touristIds": [ 182 - "3fa85f64-5717-4562-b3fc-2c963f66afa6" 183 - ], 184 - "errorCode": "string", 185 - "errorMessage": "string", 186 - "description": "string" 187 - } 119 + "extendedSearch": false, 120 + "totalPriceFrom": 10, 121 + "totalPriceTo": 10000, 122 + "recommended": false, 123 + "popular": true, 124 + "freeSale": true, 125 + "groupByHotel": true, 126 + "hotelCodes": [ 127 + 188 188 ], 189 - "tourists": [ 190 - { 191 - "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", 192 - "age": 0, 193 - "isAdult": true, 194 - "flightIds": [ 195 - "string" 196 - ], 197 - "flights": [ 198 - { 199 - "flightId": "string", 200 - "note": "string" 201 - } 202 - ], 203 - "arrivalFlightInfo": { 204 - "flightNumber": "string", 205 - "terminalCode": "string", 206 - "date": "2024-04-11T05:03:16.796Z", 207 - "time": "string" 208 - }, 209 - "departureFlightInfo": { 210 - "flightNumber": "string", 211 - "terminalCode": "string", 212 - "date": "2024-04-11T05:03:16.796Z", 213 - "time": "string" 214 - }, 215 - "insurancePrice": { 216 - "insuranceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", 217 - "insuranceServiceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", 218 - "insurancePriceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", 219 - "touristId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", 220 - "insuranceName": "string", 221 - "insuranceDescription": "string", 222 - "contragentName": "string", 223 - "contragentFullName": "string", 224 - "actualStartDate": "2024-04-11T05:03:16.796Z", 225 - "actualEndDate": "2024-04-11T05:03:16.796Z", 226 - "costCurrencyCode": "string", 227 - "costAmount": 0, 228 - "priceCurrencyCode": "string", 229 - "priceAmount": 0, 230 - "coverageCurrencyCode": "string", 231 - "coverageAmount": 0 232 - }, 233 - "selectedVisaId": "string", 234 - "transfers": [ 235 - { 236 - "id": "string", 237 - "type": "Arrival", 238 - "flightId": "string", 239 - "flightInfo": { 240 - "flightNumber": "string", 241 - "terminalCode": "string", 242 - "date": "2024-04-11T05:03:16.796Z", 243 - "time": "string" 244 - }, 245 - "checkInHotelId": "string", 246 - "checkOutHotelId": "string", 247 - "selectedTransferPriceId": "string", 248 - "transferPrices": [ 249 - { 250 - "id": "string", 251 - "name": "string", 252 - "adultPlaces": 0, 253 - "childPlaces": 0, 254 - "perPersonPrice": true, 255 - "adultPrice": 0, 256 - "childPrice": 0 257 - } 258 - ] 259 - } 260 - ], 261 - "errorCode": "string", 262 - "errorMessage": "string", 263 - "description": "string" 264 - } 129 + "mealPlans": [ 130 + 265 265 ], 266 - "visas": [ 267 - { 268 - "prid": "3fa85f64-5717-4562-b3fc-2c963f66afa6", 269 - "prName": "string", 270 - "prValue": 0, 271 - "sortingOrder": 0 272 - } 132 + "hotelClasses": [ 133 + 273 273 ], 274 - "terminals": [ 275 - { 276 - "terminalCode": "string", 277 - "cityUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6", 278 - "districtUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6", 279 - "terminalName": "string", 280 - "countryCode": "string", 281 - "note": "string" 282 - } 135 + "hotelTypes": [ 136 + 283 283 ], 284 - "containsError": true, 285 - "refreshPriceResult": "Success", 286 - "reservationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", 287 - "reservationDetailsUnavailable": true 138 + "hotelServices": [ 139 + 140 + ], 141 + "pagingId": "", 142 + "pageNumber": 3, 143 + "pageRowCount": 10 288 288 } 289 289 {{/code}} 290 290 147 +== Response Body == 291 291 292 -=== Response example === 149 +{{code language="json"}} 150 +[ 151 + { 152 + "hotelCode": "string", 153 + "hotelName": "string", 154 + "hotelClass": "string", 155 + "cityUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6", 156 + "countryCode": "string", 157 + "countryName": "string", 158 + "districtUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6", 159 + "cityName": "string", 160 + "districtName": "string", 161 + "hotelType": "CityHotel", 162 + "latitude": "string", 163 + "longitude": "string", 164 + "hasAlcohol": true, 165 + "hasFreeWifi": true, 166 + "hasMetro": true, 167 + "hasPool": true, 168 + "hasMall": true 169 + } 170 +] 171 +{{/code}} 293 293 173 + 174 +=== Response Body example === 175 + 294 294 {{code language="Json"}} 295 295 { 296 - "package": { 297 - "id": "tour:1d0fa533-4261-4254-93bb-83599d581ffc:193990fa-41a5-46e6-9805-50f82c3c377f:0c299240-6fc6-4f79-ba99-3548f2de3f57", 298 - "priceCurrency": "USD", 299 - "totalPrice": 937.16, 300 - "agentCommissionPercent": 0.00, 301 - "agentCommissionAmount": 0.00, 302 - "includedExtrasAmount": 0, 303 - "priceDifference": 0, 304 - "hotel": { 305 - "hotelPriceId": "193990fa-41a5-46e6-9805-50f82c3c377f", 306 - "providerId": 13, 307 - "hotelName": "Mercure Dubai Barsha Heights Suites Apartments", 308 - "hotelCode": "5f125310-7025-4807-a4c6-49cd284c9c14", 309 - "nigths": 2, 310 - "mealPlan": "BB", 311 - "hotelClass": "4", 312 - "availabilityType": "StopSale", 313 - "availableRoomsCount": 0, 314 - "fewRooms": true, 315 - "roomCategoryCode": "f8e1ffe5-25cc-46a4-80e8-586d1c049de4", 316 - "roomCategoryName": "1 B/R Apartment City View", 317 - "placementTypeName": "SNGL + CHILD(2-5.99)sharing", 318 - "checkInDate": "2024-02-15T20:00:00.000Z", 319 - "checkOutDate": "2024-02-17T20:00:00.000Z", 320 - "adults": 1, 321 - "children": 1, 322 - "districtUID": "4c65f6ed-902b-4fd8-9419-af7884c22c5e", 323 - "districtName": "Al Barsha", 324 - "cityUID": "f5185fa3-3f56-44ed-bf6b-80386a33caa2", 325 - "cityName": "Dubai", 326 - "countryCode": "AE", 327 - "countryName": "United Arab Emirates", 328 - "hasAlcohol": false, 329 - "hasFreeWifi": true, 330 - "hasMetro": true, 331 - "hasPool": true, 332 - "hasMall": false, 333 - "cancellationPolicyDescription": "Cancellation Policy: 5 Day Before Arrival: 100.00 %, Early Departure: 100.00 %, NoShow: 100.00 %", 334 - "cancellationPolicy": { 335 - "noShowChargeValue": 100.00, 336 - "noShowChargeValueType": "%", 337 - "earlyDepartureChargeValue": 100.00, 338 - "earlyDepartureChargeValueType": "%", 339 - "conditions": [ 340 - { 341 - "timeunits": 5, 342 - "timeunitType": "Day", 343 - "timeOffsetTypeName": "Before Arrival", 344 - "chargeValue": 100.00, 345 - "chargeValueType": "%" 346 - } 347 - ] 348 - } 349 - }, 350 - "flight": { 351 - "id": "0c299240-6fc6-4f79-ba99-3548f2de3f57", 352 - "departureDate": "2024-02-15T20:00:00.000Z", 353 - "returnDate": "2024-02-17T20:00:00.000Z", 354 - "departureTicketsLeft": 7, 355 - "returnTicketsLeft": 7, 356 - "departureAvailabilityType": "FewPlaces", 357 - "returnAvailabilityType": "FewPlaces", 358 - "isTwoWay": true, 359 - "sameBaggageForAll": false, 360 - "totalBaggage": true, 361 - "departureSegments": [ 362 - { 363 - "airlineCode": "KC", 364 - "airlineName": "Air Astana-", 365 - "flightCode": "KC899", 366 - "class": "econom", 367 - "lugageWeight": 20, 368 - "handLugageWeight": 6, 369 - "departureFlightDate": "2024-02-15T20:00:00.000Z", 370 - "departureCountryName": "Kazakhstan", 371 - "departureCityName": "Almaty", 372 - "departureAirportCode": "ALA", 373 - "departureAirportName": "Almaty Intl Airport", 374 - "departureTerminalCode": "ALA", 375 - "arrivalFlightDate": "2024-02-15T20:00:00.000Z", 376 - "arrivalCountryName": "United Arab Emirates", 377 - "arrivalCityName": "Dubai", 378 - "arrivalAirportCode": "DXB", 379 - "arrivalAirportName": "Dubai Intl Airport", 380 - "arrivalTerminalCode": "DXB1", 381 - "flightDuration": "0h 50m" 382 - } 383 - ], 384 - "returnSegments": [ 385 - { 386 - "airlineCode": "KC", 387 - "airlineName": "Air Astana-", 388 - "flightCode": "KC900", 389 - "class": "econom", 390 - "lugageWeight": 20, 391 - "handLugageWeight": 6, 392 - "departureFlightDate": "2024-02-17T20:00:00.000Z", 393 - "departureCountryName": "United Arab Emirates", 394 - "departureCityName": "Dubai", 395 - "departureAirportCode": "DXB", 396 - "departureAirportName": "Dubai Intl Airport", 397 - "departureTerminalCode": "DXB1", 398 - "arrivalFlightDate": "2024-02-17T20:00:00.000Z", 399 - "arrivalCountryName": "Kazakhstan", 400 - "arrivalCityName": "Almaty", 401 - "arrivalAirportCode": "ALA", 402 - "arrivalAirportName": "Almaty Intl Airport", 403 - "arrivalTerminalCode": "ALA", 404 - "flightDuration": "8h 15m" 405 - } 406 - ], 407 - "passengers": [ 408 - { 409 - "id": "42779531011000004-A1", 410 - "isAdult": true, 411 - "forwardBaggages": [ 412 - { 413 - "baggageCode": "TOTAL_BAGGAGE", 414 - "description": "1 piece included, UP TO 50 POUNDS/23 KILOGRAMS, OVER 62 LINEAR INCHES/158 LINEAR CENTIMETERS", 415 - "price": 45.00, 416 - "currency": "USD", 417 - "included": false 418 - } 419 - ], 420 - "backwardBaggages": [ 421 - { 422 - "baggageCode": "INCLUDED_IN_FORWARD", 423 - "price": 0, 424 - "included": false 425 - } 426 - ] 427 - }, 428 - { 429 - "id": "42779531011000004-C1", 430 - "isAdult": false, 431 - "forwardBaggages": [ 432 - { 433 - "baggageCode": "TOTAL_BAGGAGE", 434 - "description": "1 piece included, UP TO 50 POUNDS/23 KILOGRAMS, OVER 62 LINEAR INCHES/158 LINEAR CENTIMETERS", 435 - "price": 45.00, 436 - "currency": "USD", 437 - "included": false 438 - } 439 - ], 440 - "backwardBaggages": [ 441 - { 442 - "baggageCode": "INCLUDED_IN_FORWARD", 443 - "price": 0, 444 - "included": false 445 - } 446 - ] 447 - } 448 - ] 449 - }, 450 - "extraServices": [], 451 - "insurancePrice": { 452 - "name": "Medical INS (N10000)", 453 - "price": 13.44, 454 - "priceSurcarge": 0.00, 455 - "actualStartDate": "2024-02-15T20:00:00.000Z", 456 - "actualEndDate": "2024-02-17T20:00:00.000Z", 457 - "optional": false, 458 - "includedInPackagePrice": true 459 - } 460 - }, 461 - "altPackages": [ 178 + "packages": [ 462 462 { 463 - "id": " tour:1d0fa533-4261-4254-93bb-83599d581ffc:193990fa-41a5-46e6-9805-50f82c3c377f:63d79c94-1e19-443f-8a17-50e59e633ea8",180 + "id": "onlyhotel:c4e23e7e-3d54-4efa-a3db-88508230ce91:504f63ca-6dd5-4d84-8245-cf7e77ccff73", 464 464 "priceCurrency": "USD", 465 - "totalPrice": 968.40, 466 - "agentCommissionPercent": 0.00, 467 - "agentCommissionAmount": 0.00, 468 - "includedExtrasAmount": 0, 469 - "priceDifference": 31.24, 182 + "totalPrice": 381.7, 183 + "agentCommissionPercent": 0.0, 184 + "agentCommissionAmount": 0.0, 470 470 "hotel": { 471 - "hotelPriceId": " 193990fa-41a5-46e6-9805-50f82c3c377f",186 + "hotelPriceId": "504f63ca-6dd5-4d84-8245-cf7e77ccff73", 472 472 "providerId": 13, 473 - "hotelName": " MercureDubai Barsha Heights Suites Apartments",474 - "hotelCode": " 5f125310-7025-4807-a4c6-49cd284c9c14",475 - "nigths": 2,476 - "mealPlan": " BB",188 + "hotelName": "Golden Tulip Al Barsha Hotel", 189 + "hotelCode": "ed0820c5-29b0-4e1b-8bcf-9f3c181e7961", 190 + "nigths": 4, 191 + "mealPlan": "RO", 477 477 "hotelClass": "4", 478 - "availabilityType": "S topSale",193 + "availabilityType": "FreeSale", 479 479 "availableRoomsCount": 0, 480 480 "fewRooms": true, 481 - "roomCategoryCode": " f8e1ffe5-25cc-46a4-80e8-586d1c049de4",482 - "roomCategoryName": " 1 B/R Apartment CityView",483 - "placementTypeName": "SNGL + CHILD( 2-5.99)sharing",484 - "checkInDate": "2024-02-1 5T20:00:00.000Z",485 - "checkOutDate": "2024-02-1 7T20:00:00.000Z",196 + "roomCategoryCode": "e63ea5ac-4883-4059-bb0a-795a534bbbfb", 197 + "roomCategoryName": "Superior Twin", 198 + "placementTypeName": "SNGL + CHILD(6-11.99)sharing", 199 + "checkInDate": "2024-02-17T08:00:00.000Z", 200 + "checkOutDate": "2024-02-21T08:00:00.000Z", 486 486 "adults": 1, 487 487 "children": 1, 488 488 "districtUID": "4c65f6ed-902b-4fd8-9419-af7884c22c5e", ... ... @@ -491,148 +491,30 @@ 491 491 "cityName": "Dubai", 492 492 "countryCode": "AE", 493 493 "countryName": "United Arab Emirates", 494 - "hasAlcohol": false,209 + "hasAlcohol": true, 495 495 "hasFreeWifi": true, 496 - "hasMetro": true,211 + "hasMetro": false, 497 497 "hasPool": true, 498 498 "hasMall": false, 499 - "cancellationPolicyDescription": "Cancellation Policy: 5 Day Before Arrival: 100.00 %, Early Departure: 100.00 %, NoShow: 100.00 %", 214 + "cancellationPolicyDescription": "Cancellation Policy: 15 Day Before Arrival: 100.00 %, Early Departure: 100.00 %, NoShow: 100.00 %", 500 500 "cancellationPolicy": { 501 - "noShowChargeValue": 100.0 0,216 + "noShowChargeValue": 100.0, 502 502 "noShowChargeValueType": "%", 503 - "earlyDepartureChargeValue": 100.0 0,218 + "earlyDepartureChargeValue": 100.0, 504 504 "earlyDepartureChargeValueType": "%", 505 505 "conditions": [ 506 506 { 507 - "timeunits": 5, 222 + "timeunits": 15, 508 508 "timeunitType": "Day", 509 509 "timeOffsetTypeName": "Before Arrival", 510 - "chargeValue": 100.0 0,225 + "chargeValue": 100.0, 511 511 "chargeValueType": "%" 512 512 } 513 513 ] 514 514 } 515 515 }, 516 - "flight": { 517 - "id": "63d79c94-1e19-443f-8a17-50e59e633ea8", 518 - "departureDate": "2024-02-15T20:00:00.000Z", 519 - "returnDate": "2024-02-17T20:00:00.000Z", 520 - "departureTicketsLeft": 50, 521 - "returnTicketsLeft": 50, 522 - "departureAvailabilityType": "FewPlaces", 523 - "returnAvailabilityType": "FewPlaces", 524 - "isTwoWay": true, 525 - "sameBaggageForAll": false, 526 - "totalBaggage": false, 527 - "departureSegments": [ 528 - { 529 - "airlineCode": "FZ", 530 - "airlineName": "Fly Dubai.", 531 - "flightCode": "FZ1722", 532 - "class": "econom", 533 - "lugageWeight": 20, 534 - "handLugageWeight": 6, 535 - "departureFlightDate": "2024-02-15T20:00:00.000Z", 536 - "departureCountryName": "Kazakhstan", 537 - "departureCityName": "Almaty", 538 - "departureAirportCode": "ALA", 539 - "departureAirportName": "Almaty Intl Airport", 540 - "departureTerminalCode": "ALA", 541 - "arrivalFlightDate": "2024-02-15T20:00:00.000Z", 542 - "arrivalCountryName": "United Arab Emirates", 543 - "arrivalCityName": "Dubai", 544 - "arrivalAirportCode": "DXB", 545 - "arrivalAirportName": "Dubai Intl Airport", 546 - "arrivalTerminalCode": "DXB3", 547 - "flightDuration": "0h 55m" 548 - } 549 - ], 550 - "returnSegments": [ 551 - { 552 - "airlineCode": "FZ", 553 - "airlineName": "Fly Dubai.", 554 - "flightCode": "FZ1721", 555 - "class": "econom", 556 - "lugageWeight": 20, 557 - "handLugageWeight": 6, 558 - "departureFlightDate": "2024-02-17T20:00:00.000Z", 559 - "departureCountryName": "United Arab Emirates", 560 - "departureCityName": "Dubai", 561 - "departureAirportCode": "DXB", 562 - "departureAirportName": "Dubai Intl Airport", 563 - "departureTerminalCode": "DXB3", 564 - "arrivalFlightDate": "2024-02-18T20:00:00.000Z", 565 - "arrivalCountryName": "Kazakhstan", 566 - "arrivalCityName": "Almaty", 567 - "arrivalAirportCode": "ALA", 568 - "arrivalAirportName": "Almaty Intl Airport", 569 - "arrivalTerminalCode": "DXB3", 570 - "flightDuration": "8h 10m" 571 - } 572 - ], 573 - "passengers": [ 574 - { 575 - "id": "42779547001000004-A1", 576 - "isAdult": true, 577 - "selectedForwardBaggageCode": "INCLUDED", 578 - "selectedBackwardBaggageCode": "INCLUDED", 579 - "forwardBaggages": [ 580 - { 581 - "baggageCode": "INCLUDED", 582 - "description": "20 KG INCLUDED", 583 - "price": 0.0, 584 - "currency": "USD", 585 - "included": true 586 - } 587 - ], 588 - "backwardBaggages": [ 589 - { 590 - "baggageCode": "INCLUDED", 591 - "description": "20 KG INCLUDED", 592 - "price": 0.0, 593 - "currency": "USD", 594 - "included": true 595 - } 596 - ] 597 - }, 598 - { 599 - "id": "42779547001000004-C1", 600 - "isAdult": false, 601 - "selectedForwardBaggageCode": "INCLUDED", 602 - "selectedBackwardBaggageCode": "INCLUDED", 603 - "forwardBaggages": [ 604 - { 605 - "baggageCode": "INCLUDED", 606 - "description": "20 KG INCLUDED", 607 - "price": 0.0, 608 - "currency": "USD", 609 - "included": true 610 - } 611 - ], 612 - "backwardBaggages": [ 613 - { 614 - "baggageCode": "INCLUDED", 615 - "description": "20 KG INCLUDED", 616 - "price": 0.0, 617 - "currency": "USD", 618 - "included": true 619 - } 620 - ] 621 - } 622 - ] 623 - }, 624 - "extraServices": [], 625 - "insurancePrice": { 626 - "name": "Medical INS (N10000)", 627 - "price": 13.44, 628 - "priceSurcarge": 0.00, 629 - "actualStartDate": "2024-02-15T20:00:00.000Z", 630 - "actualEndDate": "2024-02-17T20:00:00.000Z", 631 - "optional": false, 632 - "includedInPackagePrice": true 633 - } 231 + "extraServices": [] 634 634 }, 635 - { 636 636 {{/code}} 637 637 638 638 ... ... @@ -639,285 +639,237 @@ 639 639 === Schema === 640 640 641 641 {{success}} 642 - CheckoutFormIn{239 +SearchOnlyHotelPackagesResponse{ 643 643 644 -|reservationId|string($uuid) 645 -nullable: true 646 -|calcTourPackageRequests|[ 647 -nullable: trueCalcTourPackageRequest{((( 648 -|packageId|string 649 -nullable: true 650 -|extraServicePriceCodes|[ 651 -nullable: truestring] 652 -|flightPassengers|[ 653 -nullable: trueFlightPassengerIn{((( 241 +|packages|[ 242 +nullable: trueOnlyHotelPackage{((( 654 654 |id|string 655 655 nullable: true 656 -| selectedForwardBaggageCode|string245 +|priceCurrency|string 657 657 nullable: true 658 -|selectedBackwardBaggageCode|string 247 +|totalPrice|number($double) 248 +|agentCommissionPercent|number($double) 249 +|agentCommissionAmount|number($double) 250 +|hotel|PackageHotel{((( 251 +|hotelPriceId|string 659 659 nullable: true 660 - 661 -}] 662 -))) 663 -|includeInsurance|boolean 253 +|providerId|integer($int32) 254 +|hotelName|string 664 664 nullable: true 665 -|refreshPrices|boolean 666 - 667 -}] 668 -))) 669 -|calcOnlyHotelPackageRequests|[ 670 -nullable: trueCalcOnlyHotelPackageRequest{((( 671 -|packageId|string 256 +|hotelCode|string 672 672 nullable: true 673 -|extraServicePriceCodes|[ 674 -nullable: truestring] 675 -|includeInsurance|boolean 676 -|refreshPrices|boolean 677 - 678 -}] 679 -))) 680 -|calcOnlyAviaPackageRequests|[ 681 -nullable: trueCalcOnlyAviaPackageRequest{((( 682 -|packageId|string 258 +|nigths|integer($int32) 259 +|mealPlan|string 683 683 nullable: true 684 -|refreshPrices|boolean 685 -|flightPassengers|[ 686 -nullable: trueFlightPassengerIn{((( 687 -|id|string 261 +|hotelClass|string 688 688 nullable: true 689 -|selectedForwardBaggageCode|string 263 +|availabilityType|RoomAvailabilityTypeEnumstringEnum: 264 +[ OnRequest, FreeSale, StopSale ] 265 +|availableRoomsCount|integer($int32) 266 +|fewRooms|boolean 267 +|roomCategoryCode|string 690 690 nullable: true 691 -| selectedBackwardBaggageCode|string269 +|roomCategoryName|string 692 692 nullable: true 693 - 694 -}] 695 -))) 696 - 697 -}] 698 -))) 699 -|hotels|[ 700 -nullable: trueCheckoutHotelIn{((( 701 -|hotelPriceId|string 271 +|placementTypeName|string 702 702 nullable: true 703 -|a gentConfirmationNumber|string273 +|placementDescription|string 704 704 nullable: true 705 -|note|string 275 +|checkInDate|string($date-time) 276 +|checkOutDate|string($date-time) 277 +|adults|integer($int32) 278 +|children|integer($int32) 279 +|districtUID|string($uuid) 706 706 nullable: true 707 -|touristIds|[ 708 -nullable: truestring($uuid)] 709 - 710 -}] 711 -))) 712 -|tourists|[ 713 -nullable: trueCheckoutTouristIn{((( 714 -|id|string($uuid) 715 -|firstName|string 281 +|districtName|string 716 716 nullable: true 717 -| lastName|string283 +|cityUID|string($uuid) 718 718 nullable: true 719 -| birthDate|string($date-time)285 +|cityName|string 720 720 nullable: true 721 -| passportNumber|string287 +|countryCode|string 722 722 nullable: true 723 -| passportExpiry|string($date-time)289 +|countryName|string 724 724 nullable: true 725 -|passportIssue|string($date-time) 291 +|hasAlcohol|boolean 292 +|hasFreeWifi|boolean 293 +|hasMetro|boolean 294 +|hasPool|boolean 295 +|hasMall|boolean 296 +|cancellationPolicyDescription|string 726 726 nullable: true 727 -|citizenship|string 298 +|cancellationPolicy|CancellationPolicyExchange{((( 299 +|cancellationPolicyCode|string 728 728 nullable: true 729 -| tin|string301 +|noShowChargeValue|number($double) 730 730 nullable: true 731 -| isMale|boolean303 +|noShowChargeValueType|string 732 732 nullable: true 733 -|flightIds|[ 734 -nullable: truestring] 735 -|arrivalFlightInfo|ManualFlightInfo{((( 736 -|flightNumber|string 305 +|earlyDepartureChargeValue|number($double) 737 737 nullable: true 738 -|ter minalCode|string307 +|earlyDepartureChargeValueType|string 739 739 nullable: true 740 -|date|string($date-time) 309 +|conditions|[ 310 +nullable: trueCancellationPolicyConditionExchange{((( 311 +|timeunits|integer($int32) 312 +|timeunitType|string 741 741 nullable: true 742 -|time|string 314 +|timeOffsetTypeName|string 743 743 nullable: true 744 - 745 -} 746 -))) 747 -|departureFlightInfo|ManualFlightInfo{((( 748 -|flightNumber|string 316 +|chargeValue|number($double) 749 749 nullable: true 750 -| terminalCode|string318 +|chargeValueType|string 751 751 nullable: true 752 -|date|string($date-time) 753 -nullable: true 754 -|time|string 755 -nullable: true 756 756 757 -} 758 -))) 759 -|selectedVisaId|string 760 -nullable: true 761 -|transfers|[ 762 -nullable: trueCheckoutTransferIn{((( 763 -|id|string 764 -nullable: true 765 -|selectedTransferPriceId|string 766 -nullable: true 767 - 768 768 }] 769 769 ))) 770 770 771 -} ]324 +} 772 772 ))) 773 -|note|string 774 -nullable: true 775 -|contactPhone|string 776 -nullable: true 777 777 778 778 } 779 -{{/success}} 780 - 781 -{{success}} 782 -CheckoutFormOut{ 783 - 784 -|error|boolean 785 -|errorCode|string 328 +))) 329 +|extraServices|[ 330 +nullable: trueHotelExtraServiceBase{((( 331 +|extraServiceCode|string 786 786 nullable: true 787 -|er rorDescription|string333 +|extraServiceTypeCode|string 788 788 nullable: true 789 -|userErrorDescription|string 335 +|isMandatory|integer($int32) 336 +|extraServiceName|string 790 790 nullable: true 791 -|priceCurrency|string 338 +|minimalServiceAmount|number($double) 339 +|includedPriceCode|string 792 792 nullable: true 793 -|totalPrice|number($double) 794 -|agentCommissionPercent|number($double) 795 -|agentCommissionAmount|number($double) 796 -|requiredCitizenIdentifiers|[ 797 -nullable: trueCitizenIdentifier{((( 798 -|countryCode|string 341 +|prices|[ 342 +nullable: trueHotelExtraServicePriceBase{((( 343 +|extraServicePriceCode|string 799 799 nullable: true 800 -|identifierType|IdentifierTypeEnumstringEnum: 801 -[ TIN, FIN ] 802 - 803 -}] 804 -))) 805 -|hotels|[ 806 -nullable: trueCheckoutHotelOut{((( 807 -|hotelPriceId|string 345 +|displayName|string 808 808 nullable: true 809 -|touristIds|[ 810 -nullable: truestring($uuid)] 811 -|errorCode|string 347 +|restrictionInfo|string 812 812 nullable: true 813 -| errorMessage|string349 +|additionalInfo|string 814 814 nullable: true 815 -|description|string 351 +|price|number($double) 352 +|extraPrice|number($double) 353 +|currency|string 816 816 nullable: true 817 817 818 818 }] 819 819 ))) 820 -|tourists|[ 821 -nullable: trueCheckoutTouristOut{...}] 822 -|visas|[ 823 -nullable: trueServicePrice{((( 824 -|prid|string($uuid) 825 -|prName|string 826 -nullable: true 827 -|prValue|number($double) 828 -|sortingOrder|integer($int32) 829 829 830 830 }] 831 831 ))) 832 -|terminals|[ 833 -nullable: trueTerminal{((( 834 -|terminalCode|string 835 -nullable: true 836 -|cityUID|string($uuid) 837 -nullable: true 838 -|districtUID|string($uuid) 839 -nullable: true 840 -|terminalName|string 841 -nullable: true 842 -|countryCode|string 843 -nullable: true 844 -|note|string 845 -nullable: true 846 846 847 847 }] 848 848 ))) 849 -|containsError|boolean 850 -|refreshPriceResult|RefreshPriceResultEnumstringEnum: 851 -[ Success, HotelPriceNoMoreAvailable, FlightPriceNoMoreAvailable ] 852 -|reservationId|string($uuid) 853 -|reservationDetailsUnavailable|boolean 364 +|pagingId|string 365 +nullable: true 366 +|pageNumber|integer($int64) 367 +|pageCount|integer($int64) 854 854 855 855 } 856 856 {{/success}} 857 857 858 858 859 -== De scriptions ==373 +== Definitions == 860 860 861 861 862 -=== Request===376 +=== Paging and Caching === 863 863 864 - Here's a table describingeachparameter ofJSONrequest:378 +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: 865 865 866 -(% class="table-bordered" %) 867 -|=Parameter|=Data Type|=Description 868 -|calcTourPackageRequests|Array|An array of objects, each representing a tour package request. 869 -|refreshPrices|Boolean|If true, the prices for the tour package will be refreshed. 870 -|packageId|String|A unique identifier for the tour package. 871 -|flightPassengers|Array|An array of objects, each representing a flight passenger. 872 -|id|String|A unique identifier for each flight passenger. 873 -|selectedForwardBaggageCode|String|The selected baggage option for the forward journey. there is two optoions "" 874 -|selectedBackwardBaggageCode|String|The selected baggage option for the backward journey. 875 -|extraServicePriceCodes|Array|An array of extra service price codes. If empty, no extra services are selected. 876 -|includeInsurance|Boolean|If true, insurance will be included in the tour package. 877 -|calcOnlyHotelPackageRequests|Array|An array of objects, each representing a hotel-only package request. If empty, no hotel-only packages are requested. 878 -|calcOnlyAviaPackageRequests|Array|An array of objects, each representing an avia-only package request. If empty, no avia-only packages are requested. 879 879 880 -=== Response ===381 +==== first request ==== 881 881 882 -(% class="table-bordered" %) 883 -|=Parameter|=Data Type|=Description 884 -|priceCurrency|String|The currency code (ISO 4217) for all prices mentioned in the response. 885 -|totalPrice|Number|The total price of the booking. 886 -|agentCommissionPercent|Number|The commission percentage for the agent. 887 -|agentCommissionAmount|Number|The total commission amount for the agent in priceCurrency. 888 -|requiredCitizenIdentifiers[*].countryCode|String|The ISO 3166-1 alpha-2 country code. 889 -|requiredCitizenIdentifiers[*].identifierType|String|The type of identifier required (e.g., "TIN", "FIN"). **TIN (Taxpayer Identification Number) & FIN (Financial Identification Number)** 890 -|hotels[*].hotelPriceId|String|Unique identifier for the hotel price. 891 -|hotels[*].touristIds[*]|String|List of tourist IDs that are booked in this hotel. 892 -|hotels[*].description|String|A brief description of the hotel. 893 -|tourists[*].id|String|Unique identifier for the tourist. 894 -|tourists[*].isAdult|Boolean|Indicates if the tourist is an adult. 895 -|tourists[*].flightIds[*]|String|Identifiers for flights associated with the tourist. 896 -|tourists[*].flights[*].flightId|String|Unique identifier for the flight. 897 -|tourists[*].flights[*].note|String|Additional information about the flight, such as baggage allowance. 898 -|tourists[*].insurancePrice.insuranceId|String|Unique identifier for the insurance product. 899 -|tourists[*].insurancePrice.insuranceServiceId|String|Identifier for the insurance service provider. 900 -|...|...|Additional fields for insurancePrice as detailed previously. 901 -|tourists[*].transfers[*].id|String|Unique identifier for the transfer service. 902 -|tourists[*].transfers[*].type|String|The type of transfer (e.g., "Arrival", "Departure"). 903 -|tourists[*].transfers[*].flightId|String|Identifier of the flight associated with this transfer. 904 -|tourists[*].transfers[*].checkInHotelId|String|Hotel ID for check-in associated with this transfer (for arrival type). 905 -|tourists[*].transfers[*].checkOutHotelId|String|Hotel ID for check-out associated with this transfer (for departure type). 906 -|tourists[*].transfers[*].selectedTransferPriceId|String|The ID of the selected pricing option for the transfer. 907 -|tourists[*].transfers[*].transferPrices[*].id|String|Unique identifier for the transfer price option. 908 -|tourists[*].transfers[*].transferPrices[*].name|String|The name of the transfer service (e.g., "GROUP", "MINIVAN"). 909 -|...|...|Additional fields for transferPrices as detailed previously. 910 -|visas[*].prid|String|Unique identifier for the visa option. 911 -|visas[*].prName|String|The name of the visa option. 912 -|visas[*].prValue|Number|The cost associated with this visa option. 913 -|visas[*].sortingOrder|Number|Used to sort visa options in the response or UI. 914 -|terminals[*].terminalCode|String|The code representing the terminal. 915 -|terminals[*].cityUID|String|Unique identifier for the city where the terminal is located. 916 -|...|...|Additional fields for terminals as detailed previously. 917 -|containsError|Boolean|Indicates if the response contains any errors. 918 -|refreshPriceResult|String|The result of attempting to refresh the price (e.g., "Success"). 919 -|reservationId|String|Unique identifier for the reservation. 920 -|reservationDetailsUnavailable|Boolean|Indicates if the reservation details are currently unavailable. 921 -|error|Boolean|A generic error indicator, presumably redundant with containsError. 383 +{{code language="Json"}} 384 + { 385 + "pagingId": "", 386 + "pageNumber": 1, 387 + "pageRowCount":10 388 + } 389 +{{/code}} 922 922 923 - 391 + 392 +==== Request with caching ==== 393 + 394 +as we receive response, in the end we can see pagingId- number, chich we can use for caching, and then just switch pagenumbers. for cleaning cache, it's important to make new request without pagingID 395 + 396 +{{code language="Json"}} 397 + { 398 + "pagingId": "80", 399 + "pageNumber": 1, 400 + "pageRowCount":10 401 + } 402 +{{/code}} 403 + 404 + 405 +**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. 406 + 407 +**Initial Request:** 408 + 409 +* **Purpose**: The first request initiates the paging process and is designed to fetch the initial set of data without utilizing a pagingId. 410 +* **Parameters**: 411 +** pagingId: Should be set to an empty string ("") to indicate that this is the initial request. 412 +** pageNumber: Indicates the specific page of data to retrieve, starting with 1. 413 +** pageRowCount: Specifies the number of results to be included on each page. 414 + 415 +**Example - First Request**: 416 + 417 +{{{{ 418 + "pagingId": "", 419 + "pageNumber": 1, 420 + "pageRowCount": 10 421 +} 422 +}}} 423 + 424 + 425 +**Subsequent Requests with Caching:** 426 + 427 +* **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. 428 +* **Cache Utilization**: 429 +** Upon receiving a response, a pagingId value is provided. This pagingId should be used in subsequent requests to reference the cached data. 430 +** To navigate through the dataset, adjust the pageNumber while keeping the pagingId constant. 431 +** To refresh the dataset and clear the cache, initiate a new request without a pagingId. 432 + 433 +**Example - Request with Caching**: 434 + 435 +{{{ { 436 + "pagingId": "80", 437 + "pageNumber": 2, // Adjusted to fetch the next page 438 + "pageRowCount": 10 439 + } 440 +}}} 441 + 442 + 443 +**Cache Management:** 444 + 445 +* 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. 446 + 447 +**Implementation Notes**: 448 + 449 +* The paging and caching mechanism significantly enhances data retrieval efficiency by minimizing server load and optimizing response times. 450 +* Developers should ensure that the pagingId is correctly managed between requests to maintain session continuity and data consistency. 451 + 452 +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. 453 + 454 + 455 +== Important == 456 + 457 +{{error}} 458 +=== Implementing Authorization in Subsequent Requests === 459 + 460 +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: 461 + 462 +* **Header Key:** Authorization 463 +* **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. 464 + 465 +Additionally, to ensure your requests are properly formatted and recognized, include the following headers: 466 + 467 +* **Content-Type:** Specify this header as application/json to indicate the format of the request body. 468 +* **Header Key:** X-nugios-timezone 469 +* **Header Value:** 240 - Adjust this value to match your local timezone offset in minutes. 470 + 471 +Incorporating these headers with their respective values is essential for the successful processing of your API requests. 472 +{{/error}}