APIFlight

Create or update a flight

Create a new flight or update an existing one. If the id field is present, the flight will be updated. Otherwise, a new flight will be created.

POST
/flight/save
AuthorizationBearer <token>

Go to Settings -> Security and create a new API key. Use the generated key as the bearer token.

In: header

fromstring

The departure airport code (ICAO or IATA).

tostring

The arrival airport code (ICAO or IATA).

departurestring

The departure date anchor. Accepts either a date-only string (YYYY-MM-DD) or a full ISO 8601 datetime. For partial dates, send January 1st for year-only flights and the first day of the month for month-only flights.

datePrecision?string

How precise the canonical flight date anchor is. Partial dates apply only to the departure-side anchor.

Default"day"
Value in"day" | "month" | "year"
departureTime?string

The departure time in local airport time. 24- and 12-hour formats are supported.

arrival?string|null

The arrival date or datetime. Partial-date flights do not support a separate arrival anchor, so omit this or send null unless datePrecision is day.

arrivalTime?string

The arrival time in local airport time. 24- and 12-hour formats are supported.

seats

The seats on the flight. Each seat must have either a userId or a guestName, and at least one seat must have a userId.

Items1 <= items
airline?string

The ICAO code of the airline.

flightNumber?string

The flight number.

aircraft?string

The ICAO code of the aircraft.

aircraftReg?string

The registration of the aircraft.

flightReason?string

The reason for the flight.

Value in"leisure" | "business" | "crew" | "other"
notes?string

Additional notes about the flight.

customFields?

Custom field values keyed by custom field key. Values must match the configured field type.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://your-instance.com/api/flight/save" \  -H "Content-Type: application/json" \  -d '{    "from": "KJFK",    "to": "EGLL",    "departure": "2022-01-01",    "seats": [      {        "userId": "<USER_ID>"      }    ]  }'
{
  "success": true
}
{
  "success": true,
  "id": 1
}
{
  "success": false,
  "errors": [
    "string"
  ]
}
{
  "success": "false",
  "message": "Unauthorized"
}
{
  "success": "false",
  "message": "Forbidden"
}
{
  "success": "false",
  "message": "string"
}
Edit on GitHub

Last updated on