Beer API
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
post/bookings
Body
{}
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
get/bookings/{bookingId}
Path Parameters
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
BookingResponse
objectbookingIdstring
flightobject
Show Child Parameters
passengerobject
Show Child Parameters
statusstring
Allowed values:confirmedpendingcanceled
Example