Cancel flight
POST
/api/v1/flights/{flight_id}/cancel
const url = 'https://app.ayna.com/api/v1/flights/example/cancel';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"reason":"Weather conditions deteriorated"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.ayna.com/api/v1/flights/example/cancel \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "reason": "Weather conditions deteriorated" }'Cancel a flight.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”flight_id
required
Flight Id
string
Request Body
Section titled “Request Body”Media typeapplication/json
Any of:
FlightCancelRequest
Request to cancel a flight.
Example
{ "reason": "Weather conditions deteriorated"}null
Responses
Section titled “Responses”OK
Media typeapplication/json
Response
object
key
additional properties
any
Example generated
{}