Wiki source code of 3. CalcPackage

Version 6.1 by Giorgi Mdivnishvili on 2023/12/26 17:01

Show last authors
1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2
3
4 {{toc/}}
5 {{/box}}
6
7 = Method Description =
8
9 The initial method of the integration process is authorization. You will be provided with a test user username and password to generate the access token that you will need to pass in all the following methods.
10
11
12 == Endpoint URL - [POST] ==
13
14 {{info}}
15 [[https:~~/~~/online-api.kazunion.com/api/OnlyHotelPackages/CalcPackage>>https://online-api.kazunion.com/api/OnlyHotelPackages/CalcPackage]]
16 {{/info}}
17
18
19 == Request Parameters ==
20
21 (% class="box infomessage" %)
22 (((
23 None
24 )))
25
26
27 == Request Body ==
28
29 {{code language="Json"}}
30 {
31 "packageId": "string",
32 "extraServicePriceCodes": [
33 "string"
34 ],
35 "flightPassengers": [
36 {
37 "id": "string",
38 "selectedForwardBaggageCode": "string",
39 "selectedBackwardBaggageCode": "string"
40 }
41 ],
42 "includeInsurance": true,
43 "refreshPrices": true
44 }
45 {{/code}}
46
47 (% class="wikigeneratedid" id="HRequestBodyexample" %)
48 (% id="cke_bm_10575S" style="display:none" %)
49
50 == Request Body example ==
51
52 {{code language="Json"}}
53 {
54 "packageId": "tour:1d0fa533-4261-4254-93bb-83599d581ffc:193990fa-41a5-46e6-9805-50f82c3c377f:0c299240-6fc6-4f79-ba99-3548f2de3f57",
55 "extraServicePriceCodes": [
56
57 ],
58 "flightPassengers": [
59 {
60 "id": "42779531011000004-A1",
61 "selectedForwardBaggageCode": "",
62 "selectedBackwardBaggageCode": ""
63 }
64 ],
65 "includeInsurance": true,
66 "refreshPrices": true
67 }
68 {{/code}}
69
70
71 == Response ==
72
73 {{code language="json"}}
74 {
75 "error": true,
76 "errorCode": "string",
77 "errorDescription": "string",
78 "userErrorDescription": "string",
79 "package": {
80 "cacheKey": "string",
81 "id": "string",
82 "priceCurrency": "string",
83 "totalPrice": 0,
84 "agentCommissionPercent": 0,
85 "agentCommissionAmount": 0,
86 "includedExtrasAmount": 0,
87 "priceDifference": 0,
88 "hotel": {
89 "hotelPriceId": "string",
90 "providerId": 0,
91 "hotelName": "string",
92 "hotelCode": "string",
93 "nigths": 0,
94 "mealPlan": "string",
95 "hotelClass": "string",
96 "availabilityType": "OnRequest",
97 "availableRoomsCount": 0,
98 "fewRooms": true,
99 "roomCategoryCode": "string",
100 "roomCategoryName": "string",
101 "placementTypeName": "string",
102 "placementDescription": "string",
103 "checkInDate": "2023-12-26T12:55:59.433Z",
104 "checkOutDate": "2023-12-26T12:55:59.433Z",
105 "adults": 0,
106 "children": 0,
107 "districtUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
108 "districtName": "string",
109 "cityUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
110 "cityName": "string",
111 "countryCode": "string",
112 "countryName": "string",
113 "hasAlcohol": true,
114 "hasFreeWifi": true,
115 "hasMetro": true,
116 "hasPool": true,
117 "hasMall": true,
118 "cancellationPolicyDescription": "string",
119 "cancellationPolicy": {
120 "cancellationPolicyCode": "string",
121 "noShowChargeValue": 0,
122 "noShowChargeValueType": "string",
123 "earlyDepartureChargeValue": 0,
124 "earlyDepartureChargeValueType": "string",
125 "conditions": [
126 {
127 "timeunits": 0,
128 "timeunitType": "string",
129 "timeOffsetTypeName": "string",
130 "chargeValue": 0,
131 "chargeValueType": "string"
132 }
133 ]
134 }
135 },
136 "flight": {
137 "id": "string",
138 "departureDate": "2023-12-26T12:55:59.433Z",
139 "returnDate": "2023-12-26T12:55:59.433Z",
140 "departureTicketsLeft": 0,
141 "returnTicketsLeft": 0,
142 "departureAvailabilityType": "OnRequest",
143 "returnAvailabilityType": "OnRequest",
144 "isTwoWay": true,
145 "sameBaggageForAll": true,
146 "totalBaggage": true,
147 "departureSegments": [
148 {
149 "airlineCode": "string",
150 "airlineName": "string",
151 "flightCode": "string",
152 "class": "string",
153 "lugageWeight": 0,
154 "handLugageWeight": 0,
155 "departureFlightDate": "2023-12-26T12:55:59.433Z",
156 "departureCountryName": "string",
157 "departureCityName": "string",
158 "departureAirportCode": "string",
159 "departureAirportName": "string",
160 "departureTerminalCode": "string",
161 "arrivalFlightDate": "2023-12-26T12:55:59.433Z",
162 "arrivalCountryName": "string",
163 "arrivalCityName": "string",
164 "arrivalAirportCode": "string",
165 "arrivalAirportName": "string",
166 "arrivalTerminalCode": "string",
167 "flightDuration": "string"
168 }
169 ],
170 "returnSegments": [
171 {
172 "airlineCode": "string",
173 "airlineName": "string",
174 "flightCode": "string",
175 "class": "string",
176 "lugageWeight": 0,
177 "handLugageWeight": 0,
178 "departureFlightDate": "2023-12-26T12:55:59.433Z",
179 "departureCountryName": "string",
180 "departureCityName": "string",
181 "departureAirportCode": "string",
182 "departureAirportName": "string",
183 "departureTerminalCode": "string",
184 "arrivalFlightDate": "2023-12-26T12:55:59.433Z",
185 "arrivalCountryName": "string",
186 "arrivalCityName": "string",
187 "arrivalAirportCode": "string",
188 "arrivalAirportName": "string",
189 "arrivalTerminalCode": "string",
190 "flightDuration": "string"
191 }
192 ],
193 "passengers": [
194 {
195 "id": "string",
196 "isAdult": true,
197 "selectedForwardBaggageCode": "string",
198 "selectedBackwardBaggageCode": "string",
199 "forwardBaggages": [
200 {
201 "baggageCode": "string",
202 "description": "string",
203 "price": 0,
204 "currency": "string",
205 "included": true
206 }
207 ],
208 "backwardBaggages": [
209 {
210 "baggageCode": "string",
211 "description": "string",
212 "price": 0,
213 "currency": "string",
214 "included": true
215 }
216 ]
217 }
218 ]
219 },
220 "extraServices": [
221 {
222 "extraServiceCode": "string",
223 "extraServiceTypeCode": "string",
224 "isMandatory": 0,
225 "extraServiceName": "string",
226 "minimalServiceAmount": 0,
227 "includedPriceCode": "string",
228 "prices": [
229 {
230 "extraServicePriceCode": "string",
231 "displayName": "string",
232 "restrictionInfo": "string",
233 "additionalInfo": "string",
234 "price": 0,
235 "extraPrice": 0,
236 "currency": "string"
237 }
238 ]
239 }
240 ],
241 "insurancePrice": {
242 "name": "string",
243 "price": 0,
244 "priceSurcarge": 0,
245 "actualStartDate": "2023-12-26T12:55:59.433Z",
246 "actualEndDate": "2023-12-26T12:55:59.433Z",
247 "optional": true,
248 "includedInPackagePrice": true
249 }
250 },
251 "altPackages": [
252 {
253 "cacheKey": "string",
254 "id": "string",
255 "priceCurrency": "string",
256 "totalPrice": 0,
257 "agentCommissionPercent": 0,
258 "agentCommissionAmount": 0,
259 "includedExtrasAmount": 0,
260 "priceDifference": 0,
261 "hotel": {
262 "hotelPriceId": "string",
263 "providerId": 0,
264 "hotelName": "string",
265 "hotelCode": "string",
266 "nigths": 0,
267 "mealPlan": "string",
268 "hotelClass": "string",
269 "availabilityType": "OnRequest",
270 "availableRoomsCount": 0,
271 "fewRooms": true,
272 "roomCategoryCode": "string",
273 "roomCategoryName": "string",
274 "placementTypeName": "string",
275 "placementDescription": "string",
276 "checkInDate": "2023-12-26T12:55:59.433Z",
277 "checkOutDate": "2023-12-26T12:55:59.433Z",
278 "adults": 0,
279 "children": 0,
280 "districtUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
281 "districtName": "string",
282 "cityUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
283 "cityName": "string",
284 "countryCode": "string",
285 "countryName": "string",
286 "hasAlcohol": true,
287 "hasFreeWifi": true,
288 "hasMetro": true,
289 "hasPool": true,
290 "hasMall": true,
291 "cancellationPolicyDescription": "string",
292 "cancellationPolicy": {
293 "cancellationPolicyCode": "string",
294 "noShowChargeValue": 0,
295 "noShowChargeValueType": "string",
296 "earlyDepartureChargeValue": 0,
297 "earlyDepartureChargeValueType": "string",
298 "conditions": [
299 {
300 "timeunits": 0,
301 "timeunitType": "string",
302 "timeOffsetTypeName": "string",
303 "chargeValue": 0,
304 "chargeValueType": "string"
305 }
306 ]
307 }
308 },
309 "flight": {
310 "id": "string",
311 "departureDate": "2023-12-26T12:55:59.433Z",
312 "returnDate": "2023-12-26T12:55:59.433Z",
313 "departureTicketsLeft": 0,
314 "returnTicketsLeft": 0,
315 "departureAvailabilityType": "OnRequest",
316 "returnAvailabilityType": "OnRequest",
317 "isTwoWay": true,
318 "sameBaggageForAll": true,
319 "totalBaggage": true,
320 "departureSegments": [
321 {
322 "airlineCode": "string",
323 "airlineName": "string",
324 "flightCode": "string",
325 "class": "string",
326 "lugageWeight": 0,
327 "handLugageWeight": 0,
328 "departureFlightDate": "2023-12-26T12:55:59.433Z",
329 "departureCountryName": "string",
330 "departureCityName": "string",
331 "departureAirportCode": "string",
332 "departureAirportName": "string",
333 "departureTerminalCode": "string",
334 "arrivalFlightDate": "2023-12-26T12:55:59.433Z",
335 "arrivalCountryName": "string",
336 "arrivalCityName": "string",
337 "arrivalAirportCode": "string",
338 "arrivalAirportName": "string",
339 "arrivalTerminalCode": "string",
340 "flightDuration": "string"
341 }
342 ],
343 "returnSegments": [
344 {
345 "airlineCode": "string",
346 "airlineName": "string",
347 "flightCode": "string",
348 "class": "string",
349 "lugageWeight": 0,
350 "handLugageWeight": 0,
351 "departureFlightDate": "2023-12-26T12:55:59.433Z",
352 "departureCountryName": "string",
353 "departureCityName": "string",
354 "departureAirportCode": "string",
355 "departureAirportName": "string",
356 "departureTerminalCode": "string",
357 "arrivalFlightDate": "2023-12-26T12:55:59.433Z",
358 "arrivalCountryName": "string",
359 "arrivalCityName": "string",
360 "arrivalAirportCode": "string",
361 "arrivalAirportName": "string",
362 "arrivalTerminalCode": "string",
363 "flightDuration": "string"
364 }
365 ],
366 "passengers": [
367 {
368 "id": "string",
369 "isAdult": true,
370 "selectedForwardBaggageCode": "string",
371 "selectedBackwardBaggageCode": "string",
372 "forwardBaggages": [
373 {
374 "baggageCode": "string",
375 "description": "string",
376 "price": 0,
377 "currency": "string",
378 "included": true
379 }
380 ],
381 "backwardBaggages": [
382 {
383 "baggageCode": "string",
384 "description": "string",
385 "price": 0,
386 "currency": "string",
387 "included": true
388 }
389 ]
390 }
391 ]
392 },
393 "extraServices": [
394 {
395 "extraServiceCode": "string",
396 "extraServiceTypeCode": "string",
397 "isMandatory": 0,
398 "extraServiceName": "string",
399 "minimalServiceAmount": 0,
400 "includedPriceCode": "string",
401 "prices": [
402 {
403 "extraServicePriceCode": "string",
404 "displayName": "string",
405 "restrictionInfo": "string",
406 "additionalInfo": "string",
407 "price": 0,
408 "extraPrice": 0,
409 "currency": "string"
410 }
411 ]
412 }
413 ],
414 "insurancePrice": {
415 "name": "string",
416 "price": 0,
417 "priceSurcarge": 0,
418 "actualStartDate": "2023-12-26T12:55:59.433Z",
419 "actualEndDate": "2023-12-26T12:55:59.433Z",
420 "optional": true,
421 "includedInPackagePrice": true
422 }
423 }
424 ],
425 "refreshPriceResult": "Success"
426 }
427 {{/code}}
428
429
430 === Response example ===
431
432 {{code language="Json"}}{{/code}}
433
434
435 === Schema ===
436
437 {{success}}
438 CalcOnlyHotelPackageResponse{
439
440 |error|boolean
441 |errorCode|string
442 nullable: true
443 |errorDescription|string
444 nullable: true
445 |userErrorDescription|string
446 nullable: true
447 |package|OnlyHotelPackage{(((
448 |id|string
449 nullable: true
450 |priceCurrency|string
451 nullable: true
452 |totalPrice|number($double)
453 |agentCommissionPercent|number($double)
454 |agentCommissionAmount|number($double)
455 |hotel|PackageHotel{(((
456 |hotelPriceId|string
457 nullable: true
458 |providerId|integer($int32)
459 |hotelName|string
460 nullable: true
461 |hotelCode|string
462 nullable: true
463 |nigths|integer($int32)
464 |mealPlan|string
465 nullable: true
466 |hotelClass|string
467 nullable: true
468 |availabilityType|RoomAvailabilityTypeEnumstringEnum:
469 [ OnRequest, FreeSale, StopSale ]
470 |availableRoomsCount|integer($int32)
471 |fewRooms|boolean
472 |roomCategoryCode|string
473 nullable: true
474 |roomCategoryName|string
475 nullable: true
476 |placementTypeName|string
477 nullable: true
478 |placementDescription|string
479 nullable: true
480 |checkInDate|string($date-time)
481 |checkOutDate|string($date-time)
482 |adults|integer($int32)
483 |children|integer($int32)
484 |districtUID|string($uuid)
485 nullable: true
486 |districtName|string
487 nullable: true
488 |cityUID|string($uuid)
489 nullable: true
490 |cityName|string
491 nullable: true
492 |countryCode|string
493 nullable: true
494 |countryName|string
495 nullable: true
496 |hasAlcohol|boolean
497 |hasFreeWifi|boolean
498 |hasMetro|boolean
499 |hasPool|boolean
500 |hasMall|boolean
501 |cancellationPolicyDescription|string
502 nullable: true
503 |cancellationPolicy|CancellationPolicyExchange{(((
504 |cancellationPolicyCode|string
505 nullable: true
506 |noShowChargeValue|number($double)
507 nullable: true
508 |noShowChargeValueType|string
509 nullable: true
510 |earlyDepartureChargeValue|number($double)
511 nullable: true
512 |earlyDepartureChargeValueType|string
513 nullable: true
514 |conditions|[
515 nullable: trueCancellationPolicyConditionExchange{(((
516 |timeunits|integer($int32)
517 |timeunitType|string
518 nullable: true
519 |timeOffsetTypeName|string
520 nullable: true
521 |chargeValue|number($double)
522 nullable: true
523 |chargeValueType|string
524 nullable: true
525
526 }]
527 )))
528
529 }
530 )))
531
532 }
533 )))
534 |extraServices|[
535 nullable: trueHotelExtraServiceBase{(((
536 |extraServiceCode|string
537 nullable: true
538 |extraServiceTypeCode|string
539 nullable: true
540 |isMandatory|integer($int32)
541 |extraServiceName|string
542 nullable: true
543 |minimalServiceAmount|number($double)
544 |includedPriceCode|string
545 nullable: true
546 |prices|[
547 nullable: trueHotelExtraServicePriceBase{(((
548 |extraServicePriceCode|string
549 nullable: true
550 |displayName|string
551 nullable: true
552 |restrictionInfo|string
553 nullable: true
554 |additionalInfo|string
555 nullable: true
556 |price|number($double)
557 |extraPrice|number($double)
558 |currency|string
559 nullable: true
560
561 }]
562 )))
563
564 }]
565 )))
566
567 }
568 )))
569
570 }
571 {{/success}}