Flight Planning
Plan flights, manage status and update delay information.
Flight Object
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
| id | integer | Optional | Unique flight ID |
| flight_number | string | Pflicht | ICAO flight numberz.B. LH1234 |
| origin | string | Pflicht | Departure airport (IATA)z.B. FRA |
| destination | string | Pflicht | Destination airport (IATA)z.B. JFK |
| departure_utc | datetime | Pflicht | Scheduled departure time (UTC, ISO 8601) |
| arrival_utc | datetime | Pflicht | Scheduled arrival time (UTC, ISO 8601) |
| aircraft_id | string | Pflicht | Aircraft ID (registration)z.B. D-AIMK |
| status | enum | Optional | scheduled | delayed | departed | arrived | cancelled | diverted |
| delay_minutes | integer|null | Optional | Delay in minutes |
| delay_reason | string|null | Optional | IATA delay codez.B. 93 (ATC) |
| gate | string|null | Optional | Gate numberz.B. B42 |
| remarks | string|null | Optional | Internal remarks |
| created_at | datetime | Optional | Creation timestamp |
| updated_at | datetime | Optional | Last modified |
Status Workflow
scheduled → departed → arrived scheduled → delayed → departed → arrived scheduled → cancelled departed → diverted → arrived
GET /flights — List Flights
GEThttps://api.aeroselect.io/api/v1/aeroops/flights
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
| date | string | Optional | Filter by date (YYYY-MM-DD, UTC) |
| status | string | Optional | Filter by status |
| origin | string | Optional | Filter by departure airport (IATA) |
| destination | string | Optional | Filter by destination airport (IATA) |
| aircraft_id | string | Optional | Filter by registration |
cURLBash
curl "https://api.aeroselect.io/api/v1/aeroops/flights?date=2026-05-22&status=scheduled" \
-H "X-API-Key: ak_live_YOUR_KEY"Response 200JSON
{
"data": [
{
"id": 5001,
"flight_number": "LH1234",
"origin": "FRA",
"destination": "JFK",
"departure_utc": "2026-05-22T06:00:00Z",
"arrival_utc": "2026-05-22T14:45:00Z",
"aircraft_id": "D-AIMK",
"status": "scheduled",
"delay_minutes": null,
"delay_reason": null,
"gate": "B42"
}
],
"meta": { "total": 14, "page": 1, "per_page": 25 }
}POST /flights — Schedule Flight
POSThttps://api.aeroselect.io/api/v1/aeroops/flights
cURLBash
curl -X POST "https://api.aeroselect.io/api/v1/aeroops/flights" \
-H "X-API-Key: ak_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"flight_number": "AE0815",
"origin": "MUC",
"destination": "DXB",
"departure_utc": "2026-06-01T14:30:00Z",
"arrival_utc": "2026-06-01T22:15:00Z",
"aircraft_id": "D-AXYZ"
}'PATCH /flights/{id}/status — Update Status
PATCHhttps://api.aeroselect.io/api/v1/aeroops/flights/{id}/status
cURLBash
curl -X PATCH "https://api.aeroselect.io/api/v1/aeroops/flights/5001/status" \
-H "X-API-Key: ak_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "delayed",
"delay_minutes": 45,
"delay_reason": "93"
}'IATA Delay Codes
AeroOps uses the standardized IATA delay codes. Commonly used codes: 11 (Late Aircraft), 14 (Boarding), 42 (Technical), 93 (ATC), 96 (Weather).
Node.js — Get daily flight schedule
daily-roster.jsJavaScript
const today = new Date().toISOString().slice(0, 10);
const response = await fetch(
`https://api.aeroselect.io/api/v1/aeroops/flights?date=${today}`,
{ headers: { "X-API-Key": process.env.AEROSELECT_API_KEY } }
);
const { data: flights } = await response.json();
const delayed = flights.filter((f) => f.status === "delayed");
console.log(`${delayed.length} flights delayed today`);