Cloudflare API

Flight API

1.0.0OAS 3.0

API for searching, booking, and managing flights.

API Base URL
  • Server 1:https://api.example.com/v1

Search flights

Retrieve a list of available flights based on criteria.

get
https://api.example.com/v1/flights

Query Parameters

originstringrequired
destinationstringrequired
departure_datestring(date)required

Response

200 application/json

A list of available flights

idstring
airlinestring
flight_numberstring
originstring
destinationstring
departure_timestring(date-time)
arrival_timestring(date-time)
pricenumber(float)
 
200 application/json

Get flight details

Retrieve details of a specific flight.

get
https://api.example.com/v1/flights/{flightId}

Path Parameters

flightIdstringrequired

Response

200 application/json

Flight details

Flight

idstring
airlinestring
flight_numberstring
originstring
destinationstring
departure_timestring(date-time)
arrival_timestring(date-time)
pricenumber(float)
 
200 application/json

Book a flight

Create a booking for a flight.

post
https://api.example.com/v1/bookings

Body

application/json

BookingRequest

flightIdstring
passengerobject
Show Child Parameters

Response

201 application/json

Booking confirmed

BookingResponse

bookingIdstring
flightobject
Show Child Parameters
passengerobject
Show Child Parameters
statusstring

Allowed values:confirmedpendingcanceled

 
201 application/json