| 1 | # openapi.api.FlightApi |
| 2 | |
| 3 | ## Load the API package |
| 4 | ```dart |
| 5 | import 'package:openapi/api.dart'; |
| 6 | ``` |
| 7 | |
| 8 | All URIs are relative to *http://localhost* |
| 9 | |
| 10 | Method | HTTP request | Description |
| 11 | ------------- | ------------- | ------------- |
| 12 | [**flightControllerCreateFlightBookingV1**](FlightApi.md#flightcontrollercreateflightbookingv1) | **POST** /v1/flight/booking | Create a flight booking |
| 13 | [**flightControllerDeleteFlightBookingV1**](FlightApi.md#flightcontrollerdeleteflightbookingv1) | **DELETE** /v1/flight/booking/{bookingId} | Delete a flight booking |
| 14 | [**flightControllerGetFlightBookingV1**](FlightApi.md#flightcontrollergetflightbookingv1) | **GET** /v1/flight/booking/{bookingId} | Get a flight booking |
| 15 | [**flightControllerGetFlightBookingsByFlightIdV1**](FlightApi.md#flightcontrollergetflightbookingsbyflightidv1) | **GET** /v1/flight/booking/flight/{flightId} | Get all bookings for a flight |
| 16 | [**flightControllerGetFlightTrackV1**](FlightApi.md#flightcontrollergetflighttrackv1) | **GET** /v1/flight/track | Get flight track/path |
| 17 | [**flightControllerGetFlightV1**](FlightApi.md#flightcontrollergetflightv1) | **GET** /v1/flight | Get flight details |
| 18 | [**flightControllerSearchFlightsV1**](FlightApi.md#flightcontrollersearchflightsv1) | **GET** /v1/flight/search | Search flights |
| 19 | [**flightControllerUpdateFlightBookingV1**](FlightApi.md#flightcontrollerupdateflightbookingv1) | **PUT** /v1/flight/booking/{bookingId} | Update a flight booking |
| 20 | |
| 21 | |
| 22 | # **flightControllerCreateFlightBookingV1** |
| 23 | > FlightBookingEntity flightControllerCreateFlightBookingV1(createFlightBookingDTO) |
| 24 | |
| 25 | Create a flight booking |
| 26 | |
| 27 | Create a new booking for a flight with booking details |
| 28 | |
| 29 | ### Example |
| 30 | ```dart |
| 31 | import 'package:openapi/api.dart'; |
| 32 | |
| 33 | final api = Openapi().getFlightApi(); |
| 34 | final CreateFlightBookingDTO createFlightBookingDTO = ; // CreateFlightBookingDTO | |
| 35 | |
| 36 | try { |
| 37 | final response = api.flightControllerCreateFlightBookingV1(createFlightBookingDTO); |
| 38 | print(response); |
| 39 | } catch on DioException (e) { |
| 40 | print('Exception when calling FlightApi->flightControllerCreateFlightBookingV1: $e\n'); |
| 41 | } |
| 42 | ``` |
| 43 | |
| 44 | ### Parameters |
| 45 | |
| 46 | Name | Type | Description | Notes |
| 47 | ------------- | ------------- | ------------- | ------------- |
| 48 | **createFlightBookingDTO** | [**CreateFlightBookingDTO**](CreateFlightBookingDTO.md)| | |
| 49 | |
| 50 | ### Return type |
| 51 | |
| 52 | [**FlightBookingEntity**](FlightBookingEntity.md) |
| 53 | |
| 54 | ### Authorization |
| 55 | |
| 56 | [JWT-auth](../README.md#JWT-auth) |
| 57 | |
| 58 | ### HTTP request headers |
| 59 | |
| 60 | - **Content-Type**: application/json |
| 61 | - **Accept**: application/json |
| 62 | |
| 63 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) |
| 64 | |
| 65 | # **flightControllerDeleteFlightBookingV1** |
| 66 | > FlightControllerDeleteFlightBookingV1200Response flightControllerDeleteFlightBookingV1(bookingId) |
| 67 | |
| 68 | Delete a flight booking |
| 69 | |
| 70 | Delete a flight booking |
| 71 | |
| 72 | ### Example |
| 73 | ```dart |
| 74 | import 'package:openapi/api.dart'; |
| 75 | |
| 76 | final api = Openapi().getFlightApi(); |
| 77 | final String bookingId = booking_abc123; // String | ID of the booking to delete |
| 78 | |
| 79 | try { |
| 80 | final response = api.flightControllerDeleteFlightBookingV1(bookingId); |
| 81 | print(response); |
| 82 | } catch on DioException (e) { |
| 83 | print('Exception when calling FlightApi->flightControllerDeleteFlightBookingV1: $e\n'); |
| 84 | } |
| 85 | ``` |
| 86 | |
| 87 | ### Parameters |
| 88 | |
| 89 | Name | Type | Description | Notes |
| 90 | ------------- | ------------- | ------------- | ------------- |
| 91 | **bookingId** | **String**| ID of the booking to delete | |
| 92 | |
| 93 | ### Return type |
| 94 | |
| 95 | [**FlightControllerDeleteFlightBookingV1200Response**](FlightControllerDeleteFlightBookingV1200Response.md) |
| 96 | |
| 97 | ### Authorization |
| 98 | |
| 99 | [JWT-auth](../README.md#JWT-auth) |
| 100 | |
| 101 | ### HTTP request headers |
| 102 | |
| 103 | - **Content-Type**: Not defined |
| 104 | - **Accept**: application/json |
| 105 | |
| 106 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) |
| 107 | |
| 108 | # **flightControllerGetFlightBookingV1** |
| 109 | > FlightBookingEntity flightControllerGetFlightBookingV1(bookingId) |
| 110 | |
| 111 | Get a flight booking |
| 112 | |
| 113 | Get details of a specific flight booking |
| 114 | |
| 115 | ### Example |
| 116 | ```dart |
| 117 | import 'package:openapi/api.dart'; |
| 118 | |
| 119 | final api = Openapi().getFlightApi(); |
| 120 | final String bookingId = booking_abc123; // String | ID of the booking to retrieve |
| 121 | |
| 122 | try { |
| 123 | final response = api.flightControllerGetFlightBookingV1(bookingId); |
| 124 | print(response); |
| 125 | } catch on DioException (e) { |
| 126 | print('Exception when calling FlightApi->flightControllerGetFlightBookingV1: $e\n'); |
| 127 | } |
| 128 | ``` |
| 129 | |
| 130 | ### Parameters |
| 131 | |
| 132 | Name | Type | Description | Notes |
| 133 | ------------- | ------------- | ------------- | ------------- |
| 134 | **bookingId** | **String**| ID of the booking to retrieve | |
| 135 | |
| 136 | ### Return type |
| 137 | |
| 138 | [**FlightBookingEntity**](FlightBookingEntity.md) |
| 139 | |
| 140 | ### Authorization |
| 141 | |
| 142 | [JWT-auth](../README.md#JWT-auth) |
| 143 | |
| 144 | ### HTTP request headers |
| 145 | |
| 146 | - **Content-Type**: Not defined |
| 147 | - **Accept**: application/json |
| 148 | |
| 149 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) |
| 150 | |
| 151 | # **flightControllerGetFlightBookingsByFlightIdV1** |
| 152 | > BuiltList<FlightBookingEntity> flightControllerGetFlightBookingsByFlightIdV1(flightId) |
| 153 | |
| 154 | Get all bookings for a flight |
| 155 | |
| 156 | Get all bookings associated with a specific flight |
| 157 | |
| 158 | ### Example |
| 159 | ```dart |
| 160 | import 'package:openapi/api.dart'; |
| 161 | |
| 162 | final api = Openapi().getFlightApi(); |
| 163 | final String flightId = flight_abc123; // String | ID of the flight |
| 164 | |
| 165 | try { |
| 166 | final response = api.flightControllerGetFlightBookingsByFlightIdV1(flightId); |
| 167 | print(response); |
| 168 | } catch on DioException (e) { |
| 169 | print('Exception when calling FlightApi->flightControllerGetFlightBookingsByFlightIdV1: $e\n'); |
| 170 | } |
| 171 | ``` |
| 172 | |
| 173 | ### Parameters |
| 174 | |
| 175 | Name | Type | Description | Notes |
| 176 | ------------- | ------------- | ------------- | ------------- |
| 177 | **flightId** | **String**| ID of the flight | |
| 178 | |
| 179 | ### Return type |
| 180 | |
| 181 | [**BuiltList<FlightBookingEntity>**](FlightBookingEntity.md) |
| 182 | |
| 183 | ### Authorization |
| 184 | |
| 185 | [JWT-auth](../README.md#JWT-auth) |
| 186 | |
| 187 | ### HTTP request headers |
| 188 | |
| 189 | - **Content-Type**: Not defined |
| 190 | - **Accept**: application/json |
| 191 | |
| 192 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) |
| 193 | |
| 194 | # **flightControllerGetFlightTrackV1** |
| 195 | > FlightTrackResponseEntity flightControllerGetFlightTrackV1(iata, icao, timezone, date) |
| 196 | |
| 197 | Get flight track/path |
| 198 | |
| 199 | Get the flight path with all position data points for a specific flight |
| 200 | |
| 201 | ### Example |
| 202 | ```dart |
| 203 | import 'package:openapi/api.dart'; |
| 204 | |
| 205 | final api = Openapi().getFlightApi(); |
| 206 | final String iata = UA123; // String | IATA flight number |
| 207 | final String icao = UAL123; // String | ICAO flight number |
| 208 | final String timezone = IST; // String | The timezone from which the request is being made. |
| 209 | final String date = 2024-03-20; // String | Flight date (ISO format). Defaults to current date if not provided |
| 210 | |
| 211 | try { |
| 212 | final response = api.flightControllerGetFlightTrackV1(iata, icao, timezone, date); |
| 213 | print(response); |
| 214 | } catch on DioException (e) { |
| 215 | print('Exception when calling FlightApi->flightControllerGetFlightTrackV1: $e\n'); |
| 216 | } |
| 217 | ``` |
| 218 | |
| 219 | ### Parameters |
| 220 | |
| 221 | Name | Type | Description | Notes |
| 222 | ------------- | ------------- | ------------- | ------------- |
| 223 | **iata** | **String**| IATA flight number | |
| 224 | **icao** | **String**| ICAO flight number | |
| 225 | **timezone** | **String**| The timezone from which the request is being made. | |
| 226 | **date** | **String**| Flight date (ISO format). Defaults to current date if not provided | [optional] |
| 227 | |
| 228 | ### Return type |
| 229 | |
| 230 | [**FlightTrackResponseEntity**](FlightTrackResponseEntity.md) |
| 231 | |
| 232 | ### Authorization |
| 233 | |
| 234 | [JWT-auth](../README.md#JWT-auth) |
| 235 | |
| 236 | ### HTTP request headers |
| 237 | |
| 238 | - **Content-Type**: Not defined |
| 239 | - **Accept**: application/json |
| 240 | |
| 241 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) |
| 242 | |
| 243 | # **flightControllerGetFlightV1** |
| 244 | > FlightResponseEntity flightControllerGetFlightV1(iata, icao, timezone, date, forceUpdate, faFlightId) |
| 245 | |
| 246 | Get flight details |
| 247 | |
| 248 | Get detailed information about a specific flight including real-time tracking data. Use faFlightId to fetch a specific flight after searching. |
| 249 | |
| 250 | ### Example |
| 251 | ```dart |
| 252 | import 'package:openapi/api.dart'; |
| 253 | |
| 254 | final api = Openapi().getFlightApi(); |
| 255 | final String iata = UA123; // String | IATA flight number |
| 256 | final String icao = UAL123; // String | ICAO flight number |
| 257 | final String timezone = timezone_example; // String | The timezone from which the request is being made. |
| 258 | final String date = 2024-03-20; // String | Flight date (ISO format). Defaults to current date if not provided |
| 259 | final bool forceUpdate = true; // bool | Force update the flight data(used to refresh the flight data) |
| 260 | final String faFlightId = faFlightId_example; // String | FlightAware flight ID to fetch a specific flight. Use this after searching for flights to get details of a selected flight. |
| 261 | |
| 262 | try { |
| 263 | final response = api.flightControllerGetFlightV1(iata, icao, timezone, date, forceUpdate, faFlightId); |
| 264 | print(response); |
| 265 | } catch on DioException (e) { |
| 266 | print('Exception when calling FlightApi->flightControllerGetFlightV1: $e\n'); |
| 267 | } |
| 268 | ``` |
| 269 | |
| 270 | ### Parameters |
| 271 | |
| 272 | Name | Type | Description | Notes |
| 273 | ------------- | ------------- | ------------- | ------------- |
| 274 | **iata** | **String**| IATA flight number | |
| 275 | **icao** | **String**| ICAO flight number | |
| 276 | **timezone** | **String**| The timezone from which the request is being made. | |
| 277 | **date** | **String**| Flight date (ISO format). Defaults to current date if not provided | [optional] |
| 278 | **forceUpdate** | **bool**| Force update the flight data(used to refresh the flight data) | [optional] [default to false] |
| 279 | **faFlightId** | **String**| FlightAware flight ID to fetch a specific flight. Use this after searching for flights to get details of a selected flight. | [optional] |
| 280 | |
| 281 | ### Return type |
| 282 | |
| 283 | [**FlightResponseEntity**](FlightResponseEntity.md) |
| 284 | |
| 285 | ### Authorization |
| 286 | |
| 287 | [JWT-auth](../README.md#JWT-auth) |
| 288 | |
| 289 | ### HTTP request headers |
| 290 | |
| 291 | - **Content-Type**: Not defined |
| 292 | - **Accept**: application/json |
| 293 | |
| 294 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) |
| 295 | |
| 296 | # **flightControllerSearchFlightsV1** |
| 297 | > FlightSearchResponseEntity flightControllerSearchFlightsV1(iata, icao, timezone, date) |
| 298 | |
| 299 | Search flights |
| 300 | |
| 301 | Search for flights by identifier and optional date. Returns lightweight flight summaries for selection. |
| 302 | |
| 303 | ### Example |
| 304 | ```dart |
| 305 | import 'package:openapi/api.dart'; |
| 306 | |
| 307 | final api = Openapi().getFlightApi(); |
| 308 | final String iata = UA123; // String | IATA flight number |
| 309 | final String icao = UAL123; // String | ICAO flight number |
| 310 | final String timezone = timezone_example; // String | The timezone from which the request is being made. |
| 311 | final String date = 2024-03-20; // String | Flight date (ISO format). Filters flights by date if provided |
| 312 | |
| 313 | try { |
| 314 | final response = api.flightControllerSearchFlightsV1(iata, icao, timezone, date); |
| 315 | print(response); |
| 316 | } catch on DioException (e) { |
| 317 | print('Exception when calling FlightApi->flightControllerSearchFlightsV1: $e\n'); |
| 318 | } |
| 319 | ``` |
| 320 | |
| 321 | ### Parameters |
| 322 | |
| 323 | Name | Type | Description | Notes |
| 324 | ------------- | ------------- | ------------- | ------------- |
| 325 | **iata** | **String**| IATA flight number | |
| 326 | **icao** | **String**| ICAO flight number | |
| 327 | **timezone** | **String**| The timezone from which the request is being made. | |
| 328 | **date** | **String**| Flight date (ISO format). Filters flights by date if provided | [optional] |
| 329 | |
| 330 | ### Return type |
| 331 | |
| 332 | [**FlightSearchResponseEntity**](FlightSearchResponseEntity.md) |
| 333 | |
| 334 | ### Authorization |
| 335 | |
| 336 | [JWT-auth](../README.md#JWT-auth) |
| 337 | |
| 338 | ### HTTP request headers |
| 339 | |
| 340 | - **Content-Type**: Not defined |
| 341 | - **Accept**: application/json |
| 342 | |
| 343 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) |
| 344 | |
| 345 | # **flightControllerUpdateFlightBookingV1** |
| 346 | > FlightBookingEntity flightControllerUpdateFlightBookingV1(bookingId, updateFlightBookingDTO) |
| 347 | |
| 348 | Update a flight booking |
| 349 | |
| 350 | Update an existing flight booking |
| 351 | |
| 352 | ### Example |
| 353 | ```dart |
| 354 | import 'package:openapi/api.dart'; |
| 355 | |
| 356 | final api = Openapi().getFlightApi(); |
| 357 | final String bookingId = booking_abc123; // String | ID of the booking to update |
| 358 | final UpdateFlightBookingDTO updateFlightBookingDTO = ; // UpdateFlightBookingDTO | |
| 359 | |
| 360 | try { |
| 361 | final response = api.flightControllerUpdateFlightBookingV1(bookingId, updateFlightBookingDTO); |
| 362 | print(response); |
| 363 | } catch on DioException (e) { |
| 364 | print('Exception when calling FlightApi->flightControllerUpdateFlightBookingV1: $e\n'); |
| 365 | } |
| 366 | ``` |
| 367 | |
| 368 | ### Parameters |
| 369 | |
| 370 | Name | Type | Description | Notes |
| 371 | ------------- | ------------- | ------------- | ------------- |
| 372 | **bookingId** | **String**| ID of the booking to update | |
| 373 | **updateFlightBookingDTO** | [**UpdateFlightBookingDTO**](UpdateFlightBookingDTO.md)| | |
| 374 | |
| 375 | ### Return type |
| 376 | |
| 377 | [**FlightBookingEntity**](FlightBookingEntity.md) |
| 378 | |
| 379 | ### Authorization |
| 380 | |
| 381 | [JWT-auth](../README.md#JWT-auth) |
| 382 | |
| 383 | ### HTTP request headers |
| 384 | |
| 385 | - **Content-Type**: application/json |
| 386 | - **Accept**: application/json |
| 387 | |
| 388 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) |
| 389 | |