Verfügbarkeit

Verfügbarkeit von Crew-Mitgliedern abrufen und aktualisieren — FTL-konform.

FTL-Grundlagen (EASA ORO.FTL)

LimitEASA-Wert
Max. Duty Time13 Stunden (erweiterbar auf 15h)
Max. Flight Duty Period13 Stunden
Mindest-Ruhezeit12 Stunden
Max. Block Hours/Jahr900 Stunden
Max. Block Hours/28 Tage100 Stunden
Max. Block Hours/7 Tage60 Stunden

Verfügbarkeits-Objekt

FeldTypPflichtBeschreibung
idintegerOptionalEindeutige Eintrag-ID
crew_member_idintegerOptionalID des Crew-Mitglieds
fromdatePflichtStartdatum des Zeitraums
todatePflichtEnddatum des Zeitraums
typeenumPflichtavailable | unavailable | annual_leave | sick_leave | standby | training
notestring|nullOptionalOptionale Anmerkung
approved_bystring|nullOptionalName/ID des Genehmigers

GET /crew/{id}/availability

GEThttps://api.aeroselect.io/api/v1/crew/crew/{id}/availability
cURLBash
curl "https://api.aeroselect.io/api/v1/crew/crew/201/availability?from=2026-06-01&to=2026-06-30" \
  -H "X-API-Key: ak_live_YOUR_KEY"
Response 200JSON
{
  "data": [
    {
      "id": 601,
      "crew_member_id": 201,
      "from": "2026-06-15",
      "to": "2026-06-22",
      "type": "annual_leave",
      "note": "Genehmigter Jahresurlaub",
      "approved_by": "[email protected]"
    }
  ]
}

PATCH /crew/{id}/availability — Verfügbarkeit aktualisieren

PATCHhttps://api.aeroselect.io/api/v1/crew/crew/{id}/availability

FTL-Validierung

Das System prüft beim Erstellen/Ändern von Verfügbarkeiten automatisch gegen FTL-Limits. Verstöße werden mit HTTP 422 und einem detaillierten Fehler abgelehnt.
cURLBash
curl -X PATCH "https://api.aeroselect.io/api/v1/crew/crew/201/availability" \
  -H "X-API-Key: ak_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "entries": [
      { "from": "2026-07-01", "to": "2026-07-14", "type": "available" },
      { "from": "2026-07-15", "to": "2026-07-21", "type": "annual_leave", "note": "Sommerurlaub" }
    ]
  }'