Live Tracking

Retrieve the current crew assignment for a flight and perform crew swaps.

GET /flights/{id}/crew — Retrieve Crew Assignment

GEThttps://api.aeroselect.io/api/v1/crewops/flights/{id}/crew
cURLBash
curl "https://api.aeroselect.io/api/v1/crewops/flights/5001/crew" \
  -H "X-API-Key: ak_live_YOUR_KEY"
Response 200JSON
{
  "flight_id": 5001,
  "flight_number": "LH1234",
  "departure_utc": "2026-05-22T06:00:00Z",
  "crew": [
    {
      "crew_member_id": 201,
      "name": "Thomas Bauer",
      "role": "captain",
      "status": "checked_in",
      "checked_in_at": "2026-05-22T04:45:00Z"
    },
    {
      "crew_member_id": 215,
      "name": "Sarah Klein",
      "role": "first_officer",
      "status": "en_route",
      "checked_in_at": null
    }
  ]
}

PATCH /flights/{id}/crew — Crew Swap

Replaces one crew member with another. The replacement crew member must meet all requirements:

  • Valid qualifications for the aircraft type
  • FTL-compliant availability
  • No overlapping duties
  • No medical flight ban
PATCHhttps://api.aeroselect.io/api/v1/crewops/flights/{id}/crew

Automatic Validation

The system validates all qualifications and FTL limits before the swap. An unqualified swap is rejected with HTTP 422 and a detailed reason.
cURLBash
curl -X PATCH "https://api.aeroselect.io/api/v1/crewops/flights/5001/crew" \
  -H "X-API-Key: ak_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "remove_crew_member_id": 215,
    "add_crew_member_id": 220,
    "reason": "Sick leave — Dr. Schmidt (2026-05-22)"
  }'
Response 200JSON
{
  "status": "swap_completed",
  "flight_id": 5001,
  "removed": { "crew_member_id": 215, "name": "Sarah Klein" },
  "added": { "crew_member_id": 220, "name": "Julia Werner" },
  "notifications_sent": ["email", "push"],
  "swapped_at": "2026-05-22T05:10:00Z"
}
Response 422 (Missing qualification)JSON
{
  "message": "Crew swap validation failed.",
  "errors": {
    "qualification": [
      "Crew member 220 does not hold a valid A320 Type Rating."
    ]
  }
}