APIFlights
Create a flight
POST
bearerAuth flight.create.ownheader
AuthorizationBearer <API key or OAuth 2.1 access token>Send Authorization: Bearer <credential>. Create API keys in AirTrail Security settings. OAuth clients use authorization code with PKCE S256 and a resource identifier matching /api/v1.
Scope: flight.create.own
application/json- body
date*stringFormat
datedatePrecision?stringDefault
"day"Value in
"day""month""year"departure?|Format
date-timearrival?|Format
date-timedepartureScheduled?|Format
date-timearrivalScheduled?|Format
date-timetakeoffScheduled?|Format
date-timetakeoffActual?|Format
date-timelandingScheduled?|Format
date-timelandingActual?|Format
date-timeduration?|Range
0 <= valuedepartureTerminal?|Length
length <= 500departureGate?|Length
length <= 500arrivalTerminal?|Length
length <= 500arrivalGate?|Length
length <= 500flightNumber?|Length
length <= 500aircraftReg?|Length
length <= 500note?|Length
length <= 10000fromId*integerRange
1 <= valuetoId*integerRange
1 <= valueaircraftId?|Range
1 <= valueairlineId?|Range
1 <= valuepassengers*array<>Items
1 <= itemstrack?|nullcustomFields?Flight created.
application/json- response
data*curl -X POST 'https://your-instance.example/api/v1/flights' \ -H 'Content-Type: application/json' \ -d '{ "date": "2019-08-24", "fromId": 1, "toId": 1, "passengers": [ {} ]}'Example Response
{ "data": { "id": "string" }}List visible flights GET
Returns flights in deterministic descending order by flight date, then descending ID. Results are cursor-paginated. Start without a cursor, then pass the returned `page.nextCursor` value unchanged as `cursor` to fetch the next page. When `page.nextCursor` is `null`, the response is the last page. Cursors are opaque and must not be decoded or constructed by clients.
Get a visible flight GET
Next Page
