Wiki source code of CalcPackage

Version 4.1 by Giorgi Mdivnishvili on 2023/12/14 17:40

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/OnlyAviaPackages/CalcPackage>>https://online-api.kazunion.com/api/OnlyAviaPackages/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 }
33 {{/code}}
34
35 == (% id="cke_bm_10575S" style="display:none" %) (%%)Request Body example ==
36
37 {{code language="Json"}}
38 {
39 "packageId": "onlyavia:2e822eb1-c0dd-49a4-9c78-e8a93444fb48:26581120-a15b-4a04-8ec1-570a312be3f3"
40 }
41 {{/code}}
42
43
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,
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 }
130 }
131 }
132 {{/code}}
133
134
135 === Response example ===
136
137 {{code language="Json"}}
138 error
139 {{/code}}
140
141
142 === Schema ===
143
144 {{code language="none"}}
145 CalcOnlyAviaPackageResponse{
146 error boolean
147 errorCode string
148 nullable: true
149 errorDescription string
150 nullable: true
151 userErrorDescription string
152 nullable: true
153 package OnlyAviaPackage{
154 id string
155 nullable: true
156 priceCurrency string
157 nullable: true
158 totalPrice number($double)
159 flight PackageFlight{
160 id string
161 nullable: true
162 departureDate string($date-time)
163 returnDate string($date-time)
164 nullable: true
165 departureTicketsLeft integer($int32)
166 returnTicketsLeft integer($int32)
167 departureAvailabilityType FlightAvailabilityTypestring
168 Enum:
169 [ OnRequest, FreeSale, FewPlaces, StopSale ]
170 returnAvailabilityType FlightAvailabilityTypestring
171 Enum:
172 [ OnRequest, FreeSale, FewPlaces, StopSale ]
173 isTwoWay boolean
174 departureSegments [
175 nullable: true
176 FlightSegment{...}]
177 returnSegments [
178 nullable: true
179 FlightSegment{...}]
180 }
181 }
182 }
183 {{/code}}