Changes for page 3. CalcCheckout
Last modified by Giorgi Mdivnishvili on 2025/02/03 12:34
From 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
To 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
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -7,36 +7,13 @@ 7 7 = Method Description = 8 8 9 9 10 - Thismethodis specificallydesignedforthe retrievalofhotelpricing information.Itsupportsqueriesfor both current dateprices andfor pricesoverapecifieddate range.10 +Once the desired tour variation has been selected, the next step involves calculating the package price in greater detail, typically just before proceeding with the reservation. To accomplish this, the **CalcCheckout **method must be utilized. This stage marks the pre-booking phase of the process. 11 11 12 -**Parameters:** 13 13 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 - 36 36 == Endpoint URL - [POST] == 37 37 38 38 {{info}} 39 -[[https:~~/~~/integration.kazunion.com/api/ OnlyHotelPackages/SearchHotelPrices>>https://integration.kazunion.com/api/OnlyHotelPackages/SearchHotelPrices]]16 +[[https:~~/~~/integration.kazunion.com/api/Checkout/CalcCheckout>>https://integration.kazunion.com/api/Checkout/CalcCheckout]] 40 40 {{/info}} 41 41 42 42 ... ... @@ -47,157 +47,465 @@ 47 47 None 48 48 ))) 49 49 27 + 50 50 == Request Body == 51 51 52 52 {{code language="Json"}} 53 53 { 54 - " countryCode": "string",55 - "locat ions": [32 + "reservationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", 33 + "calcTourPackageRequests": [ 56 56 { 57 - "type": "string", 58 - "parent": "string", 59 - "label": "string", 60 - "subLabel": "string", 61 - "value": "string", 62 - "tag": "string" 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 63 63 } 64 64 ], 65 - "c heckInDate":"2023-12-14",66 - "checkInDateTo":"2023-12-14",67 - "c heckOutDate": "2023-12-14",68 - " stayDays":0,69 - "st ayDaysTo": 0,70 - "adults":0,71 - " children":0,72 - " childrenAges":[73 - 050 + "calcOnlyHotelPackageRequests": [ 51 + { 52 + "packageId": "string", 53 + "extraServicePriceCodes": [ 54 + "string" 55 + ], 56 + "includeInsurance": true, 57 + "refreshPrices": true 58 + } 74 74 ], 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" 60 + "calcOnlyAviaPackageRequests": [ 61 + { 62 + "packageId": "string", 63 + "refreshPrices": true, 64 + "flightPassengers": [ 65 + { 66 + "id": "string", 67 + "selectedForwardBaggageCode": "string", 68 + "selectedBackwardBaggageCode": "string" 69 + } 70 + ] 71 + } 84 84 ], 85 - "mealPlans": [ 86 - "string" 73 + "hotels": [ 74 + { 75 + "hotelPriceId": "string", 76 + "agentConfirmationNumber": "string", 77 + "note": "string", 78 + "touristIds": [ 79 + "3fa85f64-5717-4562-b3fc-2c963f66afa6" 80 + ] 81 + } 87 87 ], 88 - "hotelClasses": [ 89 - "string" 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 + } 90 90 ], 91 - "hotelTypes": [ 92 - "CityHotel" 93 - ], 94 - "hotelServices": [ 95 - "HasAlcohol" 96 - ], 97 - "pagingId": "string", 98 - "pageNumber": 0, 99 - "pageRowCount": 0 119 + "note": "string", 120 + "contactPhone": "string" 100 100 } 122 + 101 101 {{/code}} 102 102 103 -== Request Body example == 125 +(% class="wikigeneratedid" id="HRequestBodyexample" %) 126 +(% id="cke_bm_10575S" style="display:none" %) 104 104 105 105 129 + 130 +== Request Body example == 131 + 106 106 {{code language="Json"}} 107 107 { 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 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 + } 118 118 ], 119 - "extendedSearch": false, 120 - "totalPriceFrom": 10, 121 - "totalPriceTo": 10000, 122 - "recommended": false, 123 - "popular": true, 124 - "freeSale": true, 125 - "groupByHotel": true, 126 - "hotelCodes": [ 127 - 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 + } 128 128 ], 129 - "mealPlans": [ 130 - 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 + } 131 131 ], 132 - "hotelClasses": [ 133 - 266 + "visas": [ 267 + { 268 + "prid": "3fa85f64-5717-4562-b3fc-2c963f66afa6", 269 + "prName": "string", 270 + "prValue": 0, 271 + "sortingOrder": 0 272 + } 134 134 ], 135 - "hotelTypes": [ 136 - 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 + } 137 137 ], 138 - "hotelServices": [ 139 - 140 - ], 141 - "pagingId": "", 142 - "pageNumber": 3, 143 - "pageRowCount": 10 284 + "containsError": true, 285 + "refreshPriceResult": "Success", 286 + "reservationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", 287 + "reservationDetailsUnavailable": true 144 144 } 145 145 {{/code}} 146 146 147 -== Response Body == 148 148 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}} 292 +=== Response example === 172 172 173 - 174 -=== Response Body example === 175 - 176 176 {{code language="Json"}} 177 177 { 178 - "packages": [ 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": [ 179 179 { 180 - "id": " onlyhotel:c4e23e7e-3d54-4efa-a3db-88508230ce91:504f63ca-6dd5-4d84-8245-cf7e77ccff73",463 + "id": "tour:1d0fa533-4261-4254-93bb-83599d581ffc:193990fa-41a5-46e6-9805-50f82c3c377f:63d79c94-1e19-443f-8a17-50e59e633ea8", 181 181 "priceCurrency": "USD", 182 - "totalPrice": 381.7, 183 - "agentCommissionPercent": 0.0, 184 - "agentCommissionAmount": 0.0, 465 + "totalPrice": 968.40, 466 + "agentCommissionPercent": 0.00, 467 + "agentCommissionAmount": 0.00, 468 + "includedExtrasAmount": 0, 469 + "priceDifference": 31.24, 185 185 "hotel": { 186 - "hotelPriceId": " 504f63ca-6dd5-4d84-8245-cf7e77ccff73",471 + "hotelPriceId": "193990fa-41a5-46e6-9805-50f82c3c377f", 187 187 "providerId": 13, 188 - "hotelName": " GoldenTulipAlBarsha Hotel",189 - "hotelCode": " ed0820c5-29b0-4e1b-8bcf-9f3c181e7961",190 - "nigths": 4,191 - "mealPlan": " RO",473 + "hotelName": "Mercure Dubai Barsha Heights Suites Apartments", 474 + "hotelCode": "5f125310-7025-4807-a4c6-49cd284c9c14", 475 + "nigths": 2, 476 + "mealPlan": "BB", 192 192 "hotelClass": "4", 193 - "availabilityType": " FreeSale",478 + "availabilityType": "StopSale", 194 194 "availableRoomsCount": 0, 195 195 "fewRooms": true, 196 - "roomCategoryCode": "e 63ea5ac-4883-4059-bb0a-795a534bbbfb",197 - "roomCategoryName": " SuperiorTwin",198 - "placementTypeName": "SNGL + CHILD( 6-11.99)sharing",199 - "checkInDate": "2024-02-1 7T08:00:00.000Z",200 - "checkOutDate": "2024-02- 21T08:00:00.000Z",481 + "roomCategoryCode": "f8e1ffe5-25cc-46a4-80e8-586d1c049de4", 482 + "roomCategoryName": "1 B/R Apartment City View", 483 + "placementTypeName": "SNGL + CHILD(2-5.99)sharing", 484 + "checkInDate": "2024-02-15T20:00:00.000Z", 485 + "checkOutDate": "2024-02-17T20:00:00.000Z", 201 201 "adults": 1, 202 202 "children": 1, 203 203 "districtUID": "4c65f6ed-902b-4fd8-9419-af7884c22c5e", ... ... @@ -206,30 +206,148 @@ 206 206 "cityName": "Dubai", 207 207 "countryCode": "AE", 208 208 "countryName": "United Arab Emirates", 209 - "hasAlcohol": true,494 + "hasAlcohol": false, 210 210 "hasFreeWifi": true, 211 - "hasMetro": false,496 + "hasMetro": true, 212 212 "hasPool": true, 213 213 "hasMall": false, 214 - "cancellationPolicyDescription": "Cancellation Policy: 15 Day Before Arrival: 100.00 %, Early Departure: 100.00 %, NoShow: 100.00 %",499 + "cancellationPolicyDescription": "Cancellation Policy: 5 Day Before Arrival: 100.00 %, Early Departure: 100.00 %, NoShow: 100.00 %", 215 215 "cancellationPolicy": { 216 - "noShowChargeValue": 100.0, 501 + "noShowChargeValue": 100.00, 217 217 "noShowChargeValueType": "%", 218 - "earlyDepartureChargeValue": 100.0, 503 + "earlyDepartureChargeValue": 100.00, 219 219 "earlyDepartureChargeValueType": "%", 220 220 "conditions": [ 221 221 { 222 - "timeunits": 15,507 + "timeunits": 5, 223 223 "timeunitType": "Day", 224 224 "timeOffsetTypeName": "Before Arrival", 225 - "chargeValue": 100.0, 510 + "chargeValue": 100.00, 226 226 "chargeValueType": "%" 227 227 } 228 228 ] 229 229 } 230 230 }, 231 - "extraServices": [] 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 + } 232 232 }, 635 + { 233 233 {{/code}} 234 234 235 235 ... ... @@ -236,237 +236,285 @@ 236 236 === Schema === 237 237 238 238 {{success}} 239 - SearchOnlyHotelPackagesResponse{642 +CheckoutFormIn{ 240 240 241 -|packages|[ 242 -nullable: trueOnlyHotelPackage{((( 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{((( 243 243 |id|string 244 244 nullable: true 245 -| priceCurrency|string656 +|selectedForwardBaggageCode|string 246 246 nullable: true 247 -|totalPrice|number($double) 248 -|agentCommissionPercent|number($double) 249 -|agentCommissionAmount|number($double) 250 -|hotel|PackageHotel{((( 251 -|hotelPriceId|string 658 +|selectedBackwardBaggageCode|string 252 252 nullable: true 253 -|providerId|integer($int32) 254 -|hotelName|string 660 + 661 +}] 662 +))) 663 +|includeInsurance|boolean 255 255 nullable: true 256 -|hotelCode|string 665 +|refreshPrices|boolean 666 + 667 +}] 668 +))) 669 +|calcOnlyHotelPackageRequests|[ 670 +nullable: trueCalcOnlyHotelPackageRequest{((( 671 +|packageId|string 257 257 nullable: true 258 -|nigths|integer($int32) 259 -|mealPlan|string 673 +|extraServicePriceCodes|[ 674 +nullable: truestring] 675 +|includeInsurance|boolean 676 +|refreshPrices|boolean 677 + 678 +}] 679 +))) 680 +|calcOnlyAviaPackageRequests|[ 681 +nullable: trueCalcOnlyAviaPackageRequest{((( 682 +|packageId|string 260 260 nullable: true 261 -|hotelClass|string 684 +|refreshPrices|boolean 685 +|flightPassengers|[ 686 +nullable: trueFlightPassengerIn{((( 687 +|id|string 262 262 nullable: true 263 -|availabilityType|RoomAvailabilityTypeEnumstringEnum: 264 -[ OnRequest, FreeSale, StopSale ] 265 -|availableRoomsCount|integer($int32) 266 -|fewRooms|boolean 267 -|roomCategoryCode|string 689 +|selectedForwardBaggageCode|string 268 268 nullable: true 269 -| roomCategoryName|string691 +|selectedBackwardBaggageCode|string 270 270 nullable: true 271 -|placementTypeName|string 693 + 694 +}] 695 +))) 696 + 697 +}] 698 +))) 699 +|hotels|[ 700 +nullable: trueCheckoutHotelIn{((( 701 +|hotelPriceId|string 272 272 nullable: true 273 -| placementDescription|string703 +|agentConfirmationNumber|string 274 274 nullable: true 275 -|checkInDate|string($date-time) 276 -|checkOutDate|string($date-time) 277 -|adults|integer($int32) 278 -|children|integer($int32) 279 -|districtUID|string($uuid) 705 +|note|string 280 280 nullable: true 281 -|districtName|string 707 +|touristIds|[ 708 +nullable: truestring($uuid)] 709 + 710 +}] 711 +))) 712 +|tourists|[ 713 +nullable: trueCheckoutTouristIn{((( 714 +|id|string($uuid) 715 +|firstName|string 282 282 nullable: true 283 -| cityUID|string($uuid)717 +|lastName|string 284 284 nullable: true 285 -| cityName|string719 +|birthDate|string($date-time) 286 286 nullable: true 287 -| countryCode|string721 +|passportNumber|string 288 288 nullable: true 289 -| countryName|string723 +|passportExpiry|string($date-time) 290 290 nullable: true 291 -|hasAlcohol|boolean 292 -|hasFreeWifi|boolean 293 -|hasMetro|boolean 294 -|hasPool|boolean 295 -|hasMall|boolean 296 -|cancellationPolicyDescription|string 725 +|passportIssue|string($date-time) 297 297 nullable: true 298 -|cancellationPolicy|CancellationPolicyExchange{((( 299 -|cancellationPolicyCode|string 727 +|citizenship|string 300 300 nullable: true 301 -|n oShowChargeValue|number($double)729 +|tin|string 302 302 nullable: true 303 -| noShowChargeValueType|string731 +|isMale|boolean 304 304 nullable: true 305 -|earlyDepartureChargeValue|number($double) 733 +|flightIds|[ 734 +nullable: truestring] 735 +|arrivalFlightInfo|ManualFlightInfo{((( 736 +|flightNumber|string 306 306 nullable: true 307 -| earlyDepartureChargeValueType|string738 +|terminalCode|string 308 308 nullable: true 309 -|conditions|[ 310 -nullable: trueCancellationPolicyConditionExchange{((( 311 -|timeunits|integer($int32) 312 -|timeunitType|string 740 +|date|string($date-time) 313 313 nullable: true 314 -|time OffsetTypeName|string742 +|time|string 315 315 nullable: true 316 -|chargeValue|number($double) 744 + 745 +} 746 +))) 747 +|departureFlightInfo|ManualFlightInfo{((( 748 +|flightNumber|string 317 317 nullable: true 318 -| chargeValueType|string750 +|terminalCode|string 319 319 nullable: true 752 +|date|string($date-time) 753 +nullable: true 754 +|time|string 755 +nullable: true 320 320 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 + 321 321 }] 322 322 ))) 323 323 324 -} 771 +}] 325 325 ))) 773 +|note|string 774 +nullable: true 775 +|contactPhone|string 776 +nullable: true 326 326 327 327 } 328 -))) 329 -|extraServices|[ 330 -nullable: trueHotelExtraServiceBase{((( 331 -|extraServiceCode|string 779 +{{/success}} 780 + 781 +{{success}} 782 +CheckoutFormOut{ 783 + 784 +|error|boolean 785 +|errorCode|string 332 332 nullable: true 333 -|e xtraServiceTypeCode|string787 +|errorDescription|string 334 334 nullable: true 335 -|isMandatory|integer($int32) 336 -|extraServiceName|string 789 +|userErrorDescription|string 337 337 nullable: true 338 -|minimalServiceAmount|number($double) 339 -|includedPriceCode|string 791 +|priceCurrency|string 340 340 nullable: true 341 -|prices|[ 342 -nullable: trueHotelExtraServicePriceBase{((( 343 -|extraServicePriceCode|string 793 +|totalPrice|number($double) 794 +|agentCommissionPercent|number($double) 795 +|agentCommissionAmount|number($double) 796 +|requiredCitizenIdentifiers|[ 797 +nullable: trueCitizenIdentifier{((( 798 +|countryCode|string 344 344 nullable: true 345 -|displayName|string 800 +|identifierType|IdentifierTypeEnumstringEnum: 801 +[ TIN, FIN ] 802 + 803 +}] 804 +))) 805 +|hotels|[ 806 +nullable: trueCheckoutHotelOut{((( 807 +|hotelPriceId|string 346 346 nullable: true 347 -|restrictionInfo|string 809 +|touristIds|[ 810 +nullable: truestring($uuid)] 811 +|errorCode|string 348 348 nullable: true 349 -| additionalInfo|string813 +|errorMessage|string 350 350 nullable: true 351 -|price|number($double) 352 -|extraPrice|number($double) 353 -|currency|string 815 +|description|string 354 354 nullable: true 355 355 356 356 }] 357 357 ))) 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) 358 358 359 359 }] 360 360 ))) 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 361 361 362 362 }] 363 363 ))) 364 -|pagingId|string 365 -nullable: true 366 -|pageNumber|integer($int64) 367 -|pageCount|integer($int64) 849 +|containsError|boolean 850 +|refreshPriceResult|RefreshPriceResultEnumstringEnum: 851 +[ Success, HotelPriceNoMoreAvailable, FlightPriceNoMoreAvailable ] 852 +|reservationId|string($uuid) 853 +|reservationDetailsUnavailable|boolean 368 368 369 369 } 370 370 {{/success}} 371 371 372 372 373 -== De finitions ==859 +== Descriptions == 374 374 375 375 376 -=== Pagingand Caching===862 +=== Request === 377 377 378 - During thefirst request,Pagingid muste emptylikethis ( "pagingId": "",) pagenumbers the numberof thepage,pagerowcount means number ofgiven result in one page.Soin the first requestwe can search like this:864 +Here's a table describing each parameter of the JSON request: 379 379 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. 380 380 381 -=== =first request====880 +=== Response === 382 382 383 -{{code language="Json"}} 384 - { 385 - "pagingId": "", 386 - "pageNumber": 1, 387 - "pageRowCount":10 388 - } 389 -{{/code}} 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. 390 390 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}} 923 +