flightIdstringrequired
Get flight details
Retrieve details of a specific flight.
get
https://api.example.com/v1/flights/{flightId}
Path Parameters
Response
200 application/json
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
Body
application/json
BookingRequest
flightIdstring
passengerobject
Show Child Parameters
Response
201 application/json
Response
201 application/json
Booking confirmed
BookingResponse
bookingIdstring
flightobject
Show Child Parameters
passengerobject
Show Child Parameters
statusstring
Allowed values:confirmedpendingcanceled
201 application/json
Get booking details
Retrieve details of a specific booking.
get
https://api.example.com/v1/bookings/{bookingId}
Path Parameters
bookingIdstringrequired
Response
200 application/json
Response
200 application/json
Booking details
BookingResponse
bookingIdstring
flightobject
Show Child Parameters
passengerobject
Show Child Parameters
statusstring
Allowed values:confirmedpendingcanceled
200 application/json
Flight
objectidstring
airlinestring
flight_numberstring
originstring
destinationstring
departure_timestring(date-time)
arrival_timestring(date-time)
pricenumber(float)
Example
BookingRequest
objectflightIdstring
passengerobject
Show Child Parameters
Example