Wiki source code of 2. CalcPackage
Version 9.1 by Giorgi Mdivnishvili on 2024/01/09 07:19
Hide last authors
| author | version | line-number | content |
|---|---|---|---|
| |
1.1 | 1 | {{box cssClass="floatinginfobox" title="**Contents**"}} |
| |
2.1 | 2 | |
| 3 | |||
| |
1.1 | 4 | {{toc/}} |
| 5 | {{/box}} | ||
| 6 | |||
| |
2.1 | 7 | = Method Description = |
| |
1.1 | 8 | |
| |
2.1 | 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. |
| |
1.1 | 10 | |
| 11 | |||
| |
2.1 | 12 | == Endpoint URL - [POST] == |
| |
1.1 | 13 | |
| |
2.1 | 14 | {{info}} |
| |
9.1 | 15 | [[https:~~/~~/integration.kazunion.com/api/OnlyAviaPackages/CalcPackage>>https://integration.kazunion.com/api/OnlyAviaPackages/CalcPackage]] |
| |
2.1 | 16 | {{/info}} |
| |
1.1 | 17 | |
| 18 | |||
| |
2.1 | 19 | == Request Parameters == |
| |
1.1 | 20 | |
| |
2.1 | 21 | (% class="box infomessage" %) |
| 22 | ((( | ||
| 23 | None | ||
| 24 | ))) | ||
| |
1.1 | 25 | |
| 26 | |||
| |
2.1 | 27 | == Request Body == |
| |
1.1 | 28 | |
| |
2.1 | 29 | {{code language="Json"}} |
| |
3.1 | 30 | { |
| 31 | "packageId": "string" | ||
| |
2.1 | 32 | } |
| 33 | {{/code}} | ||
| |
1.1 | 34 | |
| |
2.1 | 35 | == (% id="cke_bm_10575S" style="display:none" %) (%%)Request Body example == |
| |
1.1 | 36 | |
| |
2.1 | 37 | {{code language="Json"}} |
| 38 | { | ||
| |
8.1 | 39 | "packageId": "onlyavia:8df9ae18-dcb3-46bf-b493-4a14f8483e9b:2693f089-1032-42c0-bf85-f1d7a4e91848" |
| |
2.1 | 40 | } |
| 41 | {{/code}} | ||
| |
1.1 | 42 | |
| 43 | |||
| |
2.1 | 44 | == Response == |
| 45 | |||
| 46 | {{code language="json"}} | ||
| 47 | { | ||
| 48 | "error": true, | ||
| 49 | "errorCode": "string", | ||
| 50 | "errorDescription": "string", | ||
| 51 | "userErrorDescription": "string", | ||
| 52 | "package": { | ||
| 53 | "id": "string", | ||
| 54 | "priceCurrency": "string", | ||
| 55 | "totalPrice": 0, | ||
| |
3.1 | 56 | "flight": { |
| 57 | "id": "string", | ||
| 58 | "departureDate": "2023-12-14T13:38:04.073Z", | ||
| 59 | "returnDate": "2023-12-14T13:38:04.073Z", | ||
| 60 | "departureTicketsLeft": 0, | ||
| 61 | "returnTicketsLeft": 0, | ||
| 62 | "departureAvailabilityType": "OnRequest", | ||
| 63 | "returnAvailabilityType": "OnRequest", | ||
| 64 | "isTwoWay": true, | ||
| 65 | "departureSegments": [ | ||
| 66 | { | ||
| 67 | "airlineCode": "string", | ||
| 68 | "airlineName": "string", | ||
| 69 | "flightCode": "string", | ||
| 70 | "class": "string", | ||
| 71 | "lugageWeight": 0, | ||
| 72 | "handLugageWeight": 0, | ||
| 73 | "departureFlightDate": "2023-12-14T13:38:04.073Z", | ||
| 74 | "departureCountryName": "string", | ||
| 75 | "departureCityName": "string", | ||
| 76 | "departureAirportCode": "string", | ||
| 77 | "departureAirportName": "string", | ||
| 78 | "departureTerminalCode": "string", | ||
| 79 | "arrivalFlightDate": "2023-12-14T13:38:04.073Z", | ||
| 80 | "arrivalCountryName": "string", | ||
| 81 | "arrivalCityName": "string", | ||
| 82 | "arrivalAirportCode": "string", | ||
| 83 | "arrivalAirportName": "string", | ||
| 84 | "arrivalTerminalCode": "string", | ||
| 85 | "flightDuration": "string", | ||
| 86 | "baggages": [ | ||
| 87 | { | ||
| 88 | "baggageCode": "string", | ||
| 89 | "description": "string", | ||
| 90 | "price": 0, | ||
| 91 | "currency": "string", | ||
| 92 | "included": true | ||
| 93 | } | ||
| 94 | ] | ||
| 95 | } | ||
| 96 | ], | ||
| 97 | "returnSegments": [ | ||
| 98 | { | ||
| 99 | "airlineCode": "string", | ||
| 100 | "airlineName": "string", | ||
| 101 | "flightCode": "string", | ||
| 102 | "class": "string", | ||
| 103 | "lugageWeight": 0, | ||
| 104 | "handLugageWeight": 0, | ||
| 105 | "departureFlightDate": "2023-12-14T13:38:04.073Z", | ||
| 106 | "departureCountryName": "string", | ||
| 107 | "departureCityName": "string", | ||
| 108 | "departureAirportCode": "string", | ||
| 109 | "departureAirportName": "string", | ||
| 110 | "departureTerminalCode": "string", | ||
| 111 | "arrivalFlightDate": "2023-12-14T13:38:04.073Z", | ||
| 112 | "arrivalCountryName": "string", | ||
| 113 | "arrivalCityName": "string", | ||
| 114 | "arrivalAirportCode": "string", | ||
| 115 | "arrivalAirportName": "string", | ||
| 116 | "arrivalTerminalCode": "string", | ||
| 117 | "flightDuration": "string", | ||
| 118 | "baggages": [ | ||
| 119 | { | ||
| 120 | "baggageCode": "string", | ||
| 121 | "description": "string", | ||
| 122 | "price": 0, | ||
| 123 | "currency": "string", | ||
| 124 | "included": true | ||
| 125 | } | ||
| 126 | ] | ||
| 127 | } | ||
| 128 | ] | ||
| 129 | } | ||
| |
2.1 | 130 | } |
| 131 | } | ||
| 132 | {{/code}} | ||
| 133 | |||
| 134 | |||
| 135 | === Response example === | ||
| 136 | |||
| 137 | {{code language="Json"}} | ||
| |
8.1 | 138 | { |
| 139 | "package": { | ||
| 140 | "id": "onlyavia:8df9ae18-dcb3-46bf-b493-4a14f8483e9b:2693f089-1032-42c0-bf85-f1d7a4e91848", | ||
| 141 | "priceCurrency": "USD", | ||
| 142 | "totalPrice": 230.00, | ||
| 143 | "flight": { | ||
| 144 | "id": "2693f089-1032-42c0-bf85-f1d7a4e91848", | ||
| 145 | "departureDate": "2023-12-28T20:00:00.000Z", | ||
| 146 | "returnDate": "2023-12-30T20:00:00.000Z", | ||
| 147 | "departureTicketsLeft": 1, | ||
| 148 | "returnTicketsLeft": 24, | ||
| 149 | "departureAvailabilityType": "FewPlaces", | ||
| 150 | "returnAvailabilityType": "FreeSale", | ||
| 151 | "isTwoWay": true, | ||
| 152 | "sameBaggageForAll": false, | ||
| 153 | "totalBaggage": false, | ||
| 154 | "departureSegments": [ | ||
| 155 | { | ||
| 156 | "airlineCode": "KC", | ||
| 157 | "airlineName": "Air Astana.", | ||
| 158 | "flightCode": "KC899", | ||
| 159 | "class": "econom", | ||
| 160 | "lugageWeight": 20, | ||
| 161 | "handLugageWeight": 6, | ||
| 162 | "departureFlightDate": "2023-12-28T20:00:00.000Z", | ||
| 163 | "departureCountryName": "Kazakhstan", | ||
| 164 | "departureCityName": "Almaty", | ||
| 165 | "departureAirportCode": "ALA", | ||
| 166 | "departureAirportName": "Almaty Intl Airport", | ||
| 167 | "departureTerminalCode": "ALA", | ||
| 168 | "arrivalFlightDate": "2023-12-28T20:00:00.000Z", | ||
| 169 | "arrivalCountryName": "United Arab Emirates", | ||
| 170 | "arrivalCityName": "Dubai", | ||
| 171 | "arrivalAirportCode": "DXB", | ||
| 172 | "arrivalAirportName": "Dubai Intl Airport", | ||
| 173 | "arrivalTerminalCode": "DXB1", | ||
| 174 | "flightDuration": "0h 55m" | ||
| 175 | } | ||
| 176 | ], | ||
| 177 | "returnSegments": [ | ||
| 178 | { | ||
| 179 | "airlineCode": "KC", | ||
| 180 | "airlineName": "Air Astana.", | ||
| 181 | "flightCode": "KC900", | ||
| 182 | "class": "econom", | ||
| 183 | "lugageWeight": 20, | ||
| 184 | "handLugageWeight": 6, | ||
| 185 | "departureFlightDate": "2023-12-30T20:00:00.000Z", | ||
| 186 | "departureCountryName": "United Arab Emirates", | ||
| 187 | "departureCityName": "Dubai", | ||
| 188 | "departureAirportCode": "DXB", | ||
| 189 | "departureAirportName": "Dubai Intl Airport", | ||
| 190 | "departureTerminalCode": "DXB1", | ||
| 191 | "arrivalFlightDate": "2023-12-29T20:00:00.000Z", | ||
| 192 | "arrivalCountryName": "Kazakhstan", | ||
| 193 | "arrivalCityName": "Almaty", | ||
| 194 | "arrivalAirportCode": "ALA", | ||
| 195 | "arrivalAirportName": "Almaty Intl Airport", | ||
| 196 | "arrivalTerminalCode": "ALA", | ||
| 197 | "flightDuration": "-45m" | ||
| 198 | } | ||
| 199 | ], | ||
| 200 | "passengers": [ | ||
| 201 | { | ||
| 202 | "id": "42777149001000012-A1", | ||
| 203 | "isAdult": true, | ||
| 204 | "selectedForwardBaggageCode": "INCLUDED", | ||
| 205 | "selectedBackwardBaggageCode": "INCLUDED", | ||
| 206 | "forwardBaggages": [ | ||
| 207 | { | ||
| 208 | "baggageCode": "INCLUDED", | ||
| 209 | "description": "20 KG INCLUDED", | ||
| 210 | "price": 0.0, | ||
| 211 | "currency": "USD", | ||
| 212 | "included": true | ||
| 213 | } | ||
| 214 | ], | ||
| 215 | "backwardBaggages": [ | ||
| 216 | { | ||
| 217 | "baggageCode": "INCLUDED", | ||
| 218 | "description": "20 KG INCLUDED", | ||
| 219 | "price": 0.0, | ||
| 220 | "currency": "USD", | ||
| 221 | "included": true | ||
| 222 | } | ||
| 223 | ] | ||
| 224 | } | ||
| 225 | ] | ||
| 226 | } | ||
| 227 | }, | ||
| 228 | "refreshPriceResult": "Success", | ||
| 229 | "error": false | ||
| 230 | } | ||
| |
2.1 | 231 | {{/code}} |
| 232 | |||
| 233 | |||
| 234 | === Schema === | ||
| 235 | |||
| |
6.1 | 236 | {{success}} |
| |
4.1 | 237 | CalcOnlyAviaPackageResponse{ |
| |
6.1 | 238 | |
| 239 | |error|boolean | ||
| 240 | |errorCode|string | ||
| 241 | nullable: true | ||
| 242 | |errorDescription|string | ||
| 243 | nullable: true | ||
| 244 | |userErrorDescription|string | ||
| 245 | nullable: true | ||
| 246 | |package|OnlyAviaPackage{((( | ||
| 247 | |id|string | ||
| 248 | nullable: true | ||
| 249 | |priceCurrency|string | ||
| 250 | nullable: true | ||
| 251 | |totalPrice|number($double) | ||
| 252 | |flight|PackageFlight{((( | ||
| 253 | |id|string | ||
| 254 | nullable: true | ||
| 255 | |departureDate|string($date-time) | ||
| 256 | |returnDate|string($date-time) | ||
| 257 | nullable: true | ||
| 258 | |departureTicketsLeft|integer($int32) | ||
| 259 | |returnTicketsLeft|integer($int32) | ||
| 260 | |departureAvailabilityType|FlightAvailabilityTypestringEnum: | ||
| 261 | [ OnRequest, FreeSale, FewPlaces, StopSale ] | ||
| 262 | |returnAvailabilityType|FlightAvailabilityTypestringEnum: | ||
| 263 | [ OnRequest, FreeSale, FewPlaces, StopSale ] | ||
| 264 | |isTwoWay|boolean | ||
| 265 | |departureSegments|[ | ||
| 266 | nullable: trueFlightSegment{((( | ||
| 267 | |airlineCode|string | ||
| 268 | nullable: true | ||
| 269 | |airlineName|string | ||
| 270 | nullable: true | ||
| 271 | |flightCode|string | ||
| 272 | nullable: true | ||
| 273 | |class|string | ||
| 274 | nullable: true | ||
| 275 | |lugageWeight|number($double) | ||
| 276 | |handLugageWeight|number($double) | ||
| 277 | |departureFlightDate|string($date-time) | ||
| 278 | |departureCountryName|string | ||
| 279 | nullable: true | ||
| 280 | |departureCityName|string | ||
| 281 | nullable: true | ||
| 282 | |departureAirportCode|string | ||
| 283 | nullable: true | ||
| 284 | |departureAirportName|string | ||
| 285 | nullable: true | ||
| 286 | |departureTerminalCode|string | ||
| 287 | nullable: true | ||
| 288 | |arrivalFlightDate|string($date-time) | ||
| 289 | |arrivalCountryName|string | ||
| 290 | nullable: true | ||
| 291 | |arrivalCityName|string | ||
| 292 | nullable: true | ||
| 293 | |arrivalAirportCode|string | ||
| 294 | nullable: true | ||
| 295 | |arrivalAirportName|string | ||
| 296 | nullable: true | ||
| 297 | |arrivalTerminalCode|string | ||
| 298 | nullable: true | ||
| 299 | |flightDuration|string | ||
| 300 | nullable: true | ||
| 301 | |baggages|[ | ||
| 302 | nullable: trueBaggage{((( | ||
| 303 | |baggageCode|string | ||
| 304 | nullable: true | ||
| 305 | |description|string | ||
| 306 | nullable: true | ||
| 307 | |price|number($double) | ||
| 308 | |currency|string | ||
| 309 | nullable: true | ||
| 310 | |included|boolean | ||
| 311 | |||
| |
5.1 | 312 | }] |
| |
6.1 | 313 | ))) |
| 314 | |||
| |
5.1 | 315 | }] |
| |
6.1 | 316 | ))) |
| 317 | |returnSegments|[ | ||
| 318 | nullable: trueFlightSegment{((( | ||
| 319 | |airlineCode|string | ||
| 320 | nullable: true | ||
| 321 | |airlineName|string | ||
| 322 | nullable: true | ||
| 323 | |flightCode|string | ||
| 324 | nullable: true | ||
| 325 | |class|string | ||
| 326 | nullable: true | ||
| 327 | |lugageWeight|number($double) | ||
| 328 | |handLugageWeight|number($double) | ||
| 329 | |departureFlightDate|string($date-time) | ||
| 330 | |departureCountryName|string | ||
| 331 | nullable: true | ||
| 332 | |departureCityName|string | ||
| 333 | nullable: true | ||
| 334 | |departureAirportCode|string | ||
| 335 | nullable: true | ||
| 336 | |departureAirportName|string | ||
| 337 | nullable: true | ||
| 338 | |departureTerminalCode|string | ||
| 339 | nullable: true | ||
| 340 | |arrivalFlightDate|string($date-time) | ||
| 341 | |arrivalCountryName|string | ||
| 342 | nullable: true | ||
| 343 | |arrivalCityName|string | ||
| 344 | nullable: true | ||
| 345 | |arrivalAirportCode|string | ||
| 346 | nullable: true | ||
| 347 | |arrivalAirportName|string | ||
| 348 | nullable: true | ||
| 349 | |arrivalTerminalCode|string | ||
| 350 | nullable: true | ||
| 351 | |flightDuration|string | ||
| 352 | nullable: true | ||
| 353 | |baggages|[ | ||
| 354 | nullable: trueBaggage{((( | ||
| 355 | |baggageCode|string | ||
| 356 | nullable: true | ||
| 357 | |description|string | ||
| 358 | nullable: true | ||
| 359 | |price|number($double) | ||
| 360 | |currency|string | ||
| 361 | nullable: true | ||
| 362 | |included|boolean | ||
| 363 | |||
| |
5.1 | 364 | }] |
| |
6.1 | 365 | ))) |
| 366 | |||
| |
5.1 | 367 | }] |
| |
6.1 | 368 | ))) |
| 369 | |||
| |
2.1 | 370 | } |
| |
6.1 | 371 | ))) |
| 372 | |||
| |
2.1 | 373 | } |
| |
6.1 | 374 | ))) |
| 375 | |||
| |
4.1 | 376 | } |
| |
6.1 | 377 | {{/success}} |