Create or update a flight
Deprecated
Deprecated: This endpoint will be removed in the next major AirTrail release. Migrate to POST /api/v1/flights for new flights or PUT /api/v1/flights/{id} for updates. Create a new flight or update an existing one. Creating a flight for the API-key user requires flight.create.own; creating one for other users requires flight.create.any. Updating follows the equivalent flight.update.* permissions. On an existing flight, adding, removing, or changing passengers requires the matching flight.passengers.manage.* permission.
Authorization
bearerAuth Go to Settings -> Security and create a new API key. Use the generated key as the bearer token.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/flight/save" \ -H "Content-Type: application/json" \ -d '{ "from": "string", "to": "string", "departure": "string", "passengers": [ {} ] }'{ "success": true}Get flight details GET
**Deprecated:** This endpoint will be removed in the next major AirTrail release. Migrate to `GET /api/v1/flights/{id}`. Get details of a specific flight by ID. A passenger requires `flight.read.own`; access to any flight requires `flight.read.any`.
Delete a flight POST
**Deprecated:** This endpoint will be removed in the next major AirTrail release. Migrate to `DELETE /api/v1/flights/{id}`. Delete a flight by ID. A passenger requires `flight.delete.own`; deleting any flight requires `flight.delete.any`.
