Tickets
API | Description |
---|---|
PUT api/tickets/{ticketId}/cancel |
Cancels a ticket by setting its client assignment and payment information to null, if the flight has not already departed or is imminent. |
GET api/tickets/availableByFlightAndSeat?flightId={flightId}&seatId={seatId} |
Gets an available ticket for a given flight and seat that is not assigned to any client. |
GET api/Tickets |
Gets the full list of tickets registered in the database. |
GET api/Tickets/{id} |
Gets a specific ticket by its ID. |
PUT api/Tickets/{id} |
Updates an existing ticket with the provided information. |
Airplanes
API | Description |
---|---|
GET api/airplanes/{id}/seats |
Gets all seats associated with a specific airplane. |
GET api/Airplanes |
Gets the full list of airplanes registered in the database. |
GET api/Airplanes/{id} |
Gets a specific airplane by its ID. |
POST api/Airplanes |
Creates a new airplane and automatically generates its seats. |
PUT api/Airplanes/{id} |
Updates an existing airplane's details. If seat capacity changes, associated seats and tickets are regenerated, preserving sold tickets. |
DELETE api/Airplanes/{id} |
Deletes an airplane if it has never been used in any flights. |
Flights
API | Description |
---|---|
GET api/flights/tickets |
Gets all flights with tickets. |
GET api/flights/{flightId}/tickets |
Gets all tickets associated with a specific flight. |
GET api/flights/{flightId}/clients |
Gets all clients who have purchased tickets for a specific flight. |
GET api/Flights |
Gets all flights. |
GET api/Flights/{id} |
Gets the details of a specific flight by its ID. |
POST api/Flights |
Creates a new flight and automatically generates tickets for each seat in the associated airplane. |
PUT api/Flights/{id} |
Updates the flight information for the specified flight ID. |
DELETE api/Flights/{id} |
Deletes a flight by its ID. |
Clients
API | Description |
---|---|
GET api/Clients |
Gets the list of all clients. |
GET api/Clients/{id} |
Gets a single client by its ID. |
POST api/Clients |
Creates a new client. |
PUT api/Clients/{id} |
Updates an existing client. |
DELETE api/Clients/{id} |
Deletes a client by its ID. |
Airports
API | Description |
---|---|
GET api/Airports |
Gets the list of all airports. |
GET api/Airports/{id} |
Gets a single airport by its ID. |
POST api/Airports |
Creates a new airport. |
PUT api/Airports/{id} |
Updates an existing airport. |
DELETE api/Airports/{id} |
Deletes an airport by its identifier. |