POST api/Flight/Save
Save or Update Flight Data
Request Information
URI Parameters
None.
Body Parameters
This endpoint takes a parameter representing the model for Flight
FlightModel| Name | Description | Type | Additional information |
|---|---|---|---|
| Id | integer |
None. |
|
| AirlineId | integer |
Required |
|
| FlightNumber | string |
Required |
|
| DepartureAirportId | integer |
Required |
|
| DestinationAirportId | integer |
Required |
|
| IsLocal | boolean |
Required |
|
| Active | boolean |
Required |
|
| FlightDays | Collection of FlightDaysModel |
None. |
Request Formats
application/json, text/json
Sample:
{
"Id": 1,
"AirlineId": 2,
"FlightNumber": "A0554",
"DepartureAirportId": 1,
"DestinationAirportId": 1,
"IsLocal": true,
"Active": true,
"FlightDays": [
{
"Id": 1,
"FlightId": 1,
"DayId": 2
},
{
"Id": 1,
"FlightId": 1,
"DayId": 2
}
]
}
Response Information
Resource Description
Flight Saved or Updated!
IHttpActionResultNone.
Response Formats
application/json, text/json
Sample:
Sample not available.