PUT api/Airplanes/{id}

Updates an existing airplane's details. If seat capacity changes, associated seats and tickets are regenerated, preserving sold tickets.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

The ID of the airplane to update.

integer

Required

Body Parameters

The updated airplane object.

Airplane
NameDescriptionTypeAdditional information
Id

integer

None.

Model

string

None.

IsActive

boolean

None.

ExecutiveSeats

integer

None.

EconomicSeats

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "Model": "sample string 2",
  "IsActive": true,
  "ExecutiveSeats": 4,
  "EconomicSeats": 5
}

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

HTTP response indicating success or failure.

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.