---
title: "Flight API"
url: "https://kiwi.arashsheyda.me/apis/arararar/versions/f2375a9b-daf0-4b30-9711-91f5db3fe905"
---

# Flight API

OpenAPI specification document.

```json
{"openapi":"3.0.3","info":{"title":"Flight API","description":"API for searching, booking, and managing flights.","version":"1.0.0"},"servers":[{"url":"https://api.example.com/v1"}],"paths":{"/flights":{"get":{"summary":"Search flights","description":"Retrieve a list of available flights based on criteria.","parameters":[{"name":"origin","in":"query","required":true,"schema":{"type":"string"}},{"name":"destination","in":"query","required":true,"schema":{"type":"string"}},{"name":"departure_date","in":"query","required":true,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"A list of available flights","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Flight"}}}}}}}},"/flights/{flightId}":{"get":{"summary":"Get flight details","description":"Retrieve details of a specific flight.","parameters":[{"name":"flightId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Flight details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Flight"}}}}}}},"/bookings":{"post":{"summary":"Book a flight","description":"Create a booking for a flight.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingRequest"}}}},"responses":{"201":{"description":"Booking confirmed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingResponse"}}}}}}},"/bookings/{bookingId}":{"get":{"summary":"Get booking details","description":"Retrieve details of a specific booking.","parameters":[{"name":"bookingId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Booking details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingResponse"}}}}}}}},"components":{"schemas":{"Flight":{"type":"object","properties":{"id":{"type":"string"},"airline":{"type":"string"},"flight_number":{"type":"string"},"origin":{"type":"string"},"destination":{"type":"string"},"departure_time":{"type":"string","format":"date-time"},"arrival_time":{"type":"string","format":"date-time"},"price":{"type":"number","format":"float"}}},"BookingRequest":{"type":"object","properties":{"flightId":{"type":"string"},"passenger":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"}}}}},"BookingResponse":{"type":"object","properties":{"bookingId":{"type":"string"},"flight":{"$ref":"#/components/schemas/Flight"},"passenger":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"}}},"status":{"type":"string","enum":["confirmed","pending","canceled"]}}}}}}
```
