Book seats on four questionable flights. Practice 409 seat conflicts and overbooking, a booking state machine (confirmed → checked-in → cancelled), 410 Gone for cancelled bookings, If-Match concurrency and idempotent booking.
The Airline API sells seats, which means it is built to be contended: two bookings for the same seat conflict, and flights that have departed are gone rather than merely missing. It is the catalog's only source of 410 Gone, the status most clients treat as a 404 and should not.
Base URL: https://funapi.dev/api/airline/v1 · 9 endpoints · OpenAPI 3.1 spec and Postman collection available. New here? Read the getting started guide.
where the planes pretend to go
GET /airline/v1/flights — List flights, filter by routeGET /airline/v1/flights/{id} — Get one flightGET /airline/v1/flights/{id}/seats — Seat map with availabilityGET /airline/v1/flights/{id}/status — Live-ish flight status (random delays)a state machine with conflicts
POST /airline/v1/bookings — Book a seat (409 on conflicts & overbooking) (requires Bearer auth)GET /airline/v1/bookings/{id} — Get a booking (410 if cancelled) (requires Bearer auth)PUT /airline/v1/bookings/{id}/seat — Change seat (If-Match concurrency) (requires Bearer auth)POST /airline/v1/bookings/{id}/checkin — Check in (state machine) (requires Bearer auth)DELETE /airline/v1/bookings/{id} — Cancel a booking (admin only, then 410) (requires Bearer auth)