PUT api/Flights/{id}
Updates the flight information for the specified flight ID.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
id |
The ID of the flight to be updated. |
integer |
Required |
Body Parameters
A flight object containing the updated flight data.
FlightName | Description | Type | Additional information |
---|---|---|---|
Id | integer |
None. |
|
FlightNumber | string |
None. |
|
AirplaneId | integer |
None. |
|
OriginAirportId | integer |
None. |
|
DestinationAirportId | integer |
None. |
|
DepartureDate | date |
None. |
|
DepartureTime | time interval |
None. |
|
Duration | time interval |
None. |
|
ExecutivePrice | decimal number |
None. |
|
EconomicPrice | decimal number |
None. |
Request Formats
application/json, text/json
Sample:
{ "Id": 1, "FlightNumber": "sample string 2", "AirplaneId": 1, "OriginAirportId": 1, "DestinationAirportId": 1, "DepartureDate": "2025-06-16T12:29:49.4804435Z", "DepartureTime": "00:00:00.1234567", "Duration": "00:00:00.1234567", "ExecutivePrice": 9.0, "EconomicPrice": 10.0 }
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
Returns the HTTP response indicating success or failure
IHttpActionResultNone.
Response Formats
application/json, text/json
Sample:
Sample not available.