Wiki source code of 7. GetFlightDateOptions

Last modified by Giorgi Mdivnishvili on 2024/08/28 13:31

Show last authors
1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2
3
4 {{toc/}}
5 {{/box}}
6
7 = Method Description =
8
9
10
11 In order to verify the availability of flights from the selected city to the target country you can can utilize the provided method GetFlightDateOptions
12
13 To achieve this, ensure that the required parameters listed below are included in the request. The corresponding city codes can be retrieved using the specified method - [[GetDepartureCities>>doc:APIs.Online API.Catalogue.GetDepartureCities.WebHome]].
14
15
16
17 == EndpointURL - [GET] ==
18
19 {{info}}
20 [[https:~~/~~/integration.kazunion.com/api/Catalogue/GetFlightDateOptions>>https://integration.kazunion.com/api/Catalogue/GetFlightDateOptions]]
21 {{/info}}
22
23
24 == Request Parameters ==
25
26 (% class="box infomessage" %)
27 (((
28 [[https:~~/~~/integration.kazunion.com/api/Catalogue/GetFlightDateOptions?CityUID=f0ba6324-f337-405c-8cc7-23d62cf664e8&CountryCode=AE&IsFrom=true&Month=8&Year=2024>>https://integration.kazunion.com/api/Catalogue/GetFlightDateOptions?CityUID=f0ba6324-f337-405c-8cc7-23d62cf664e8&CountryCode=AE&IsFrom=true&Month=8&Year=2024]]
29 )))
30
31
32
33 == Request Body ==
34
35 {{code language="Json"}}
36 none
37 {{/code}}
38
39
40 === Response example success with data ===
41
42 {{code language="Json"}}
43 {
44 "availableDates": [
45 {
46 "departureDate": "2024-10-01T00:00:00.000",
47 "remainingTickets": 27
48 },
49 {
50 "departureDate": "2024-10-02T00:00:00.000",
51 "remainingTickets": 41
52 },
53 {
54 "departureDate": "2024-10-03T00:00:00.000",
55 "remainingTickets": 50
56 },
57 {
58 "departureDate": "2024-10-04T00:00:00.000",
59 "remainingTickets": 47
60 },
61 {
62 "departureDate": "2024-10-05T00:00:00.000",
63 "remainingTickets": 46
64 },
65 {
66 "departureDate": "2024-10-06T00:00:00.000",
67 "remainingTickets": 36
68 },
69 {
70 "departureDate": "2024-10-07T00:00:00.000",
71 "remainingTickets": 40
72 },
73 {
74 "departureDate": "2024-10-08T00:00:00.000",
75 "remainingTickets": 30
76 },
77 {
78 "departureDate": "2024-10-09T00:00:00.000",
79 "remainingTickets": 38
80 },
81 {
82 "departureDate": "2024-10-10T00:00:00.000",
83 "remainingTickets": 44
84 },
85 {
86 "departureDate": "2024-10-11T00:00:00.000",
87 "remainingTickets": 48
88 },
89 {
90 "departureDate": "2024-10-12T00:00:00.000",
91 "remainingTickets": 50
92 },
93 {
94 "departureDate": "2024-10-13T00:00:00.000",
95 "remainingTickets": 50
96 },
97 {
98 "departureDate": "2024-10-14T00:00:00.000",
99 "remainingTickets": 46
100 },
101 {
102 "departureDate": "2024-10-15T00:00:00.000",
103 "remainingTickets": 46
104 },
105 {
106 "departureDate": "2024-10-16T00:00:00.000",
107 "remainingTickets": 50
108 },
109 {
110 "departureDate": "2024-10-17T00:00:00.000",
111 "remainingTickets": 46
112 },
113 {
114 "departureDate": "2024-10-18T00:00:00.000",
115 "remainingTickets": 37
116 },
117 {
118 "departureDate": "2024-10-19T00:00:00.000",
119 "remainingTickets": 28
120 },
121 {
122 "departureDate": "2024-10-20T00:00:00.000",
123 "remainingTickets": 42
124 },
125 {
126 "departureDate": "2024-10-21T00:00:00.000",
127 "remainingTickets": 42
128 },
129 {
130 "departureDate": "2024-10-22T00:00:00.000",
131 "remainingTickets": 15
132 },
133 {
134 "departureDate": "2024-10-23T00:00:00.000",
135 "remainingTickets": 37
136 },
137 {
138 "departureDate": "2024-10-24T00:00:00.000",
139 "remainingTickets": 30
140 },
141 {
142 "departureDate": "2024-10-25T00:00:00.000",
143 "remainingTickets": 8
144 },
145 {
146 "departureDate": "2024-10-26T00:00:00.000",
147 "remainingTickets": 26
148 },
149 {
150 "departureDate": "2024-10-27T00:00:00.000",
151 "remainingTickets": 83
152 },
153 {
154 "departureDate": "2024-10-28T00:00:00.000",
155 "remainingTickets": 45
156 },
157 {
158 "departureDate": "2024-10-29T00:00:00.000",
159 "remainingTickets": 52
160 },
161 {
162 "departureDate": "2024-10-30T00:00:00.000",
163 "remainingTickets": 29
164 },
165 {
166 "departureDate": "2024-10-31T00:00:00.000",
167 "remainingTickets": 46
168 }
169 ],
170 "remainingTicketLimit": 9
171 }
172 {{/code}}
173
174
175 === **Response example success with data** ===
176
177 {{code language="Json"}}
178 {
179 "availableDates": [],
180 "remainingTicketLimit": 9
181 }
182 {{/code}}
183
184
185 === Schema ===
186
187 {{success}}
188 GetFlightDateOptionsResponse{
189 availableDates   [
190 nullable: true
191 FlightBlockAvailability{
192 departureDate   string($date-time)
193 remainingTickets   integer($int32)
194 }]
195 remainingTicketLimit   integer($int32)
196 }
197 {{/success}}
198
199
200
201 ==== URL Parameters ====
202
203
204 (% class="table-bordered" %)
205 |=Parameter|=example|=Description
206 |CityUID|f0ba6324-f337-405c-8cc7-23d62cf664e8|Example of Uid of the Departure City Almaty
207 |CountryCode|AE|Example of the Direction
208 |Year|2024|Identificator of the year, for this example 2024
209 |Month|10|Number of month, for this example November
210
211 ==== Response parameters ====
212
213
214 (% class="table-bordered" %)
215 |=Field|=example|=Description
216 |departureDate|"departureDate": "2024-10-01T00:00:00.000",|Flights info for this date, it means there is a available flight
217 |remainingTickets|"remainingTickets": 27|available tickets number