LLM Flight Booking Assistant

Flight LLM Booking API

1.0.0OAS 3.1

This mega large super huge specification demonstrates nearly every feature of the OpenAPI Specification v3.1.
It is not meant to be fully functional, but rather to serve as an exhaustive reference implementation.

API Base URL
  • Server 1:https://api.example.com/{version}/flights
    Variables
    version:
Security
ApiKeyAuth (apiKey)

An API key is a token that you provide when making API calls. Include the token in a header parameter called X-API-Key.

Example: X-API-Key: 123

BasicAuth (http)

Basic authentication is a simple authentication scheme built into the HTTP protocol.
To use it, send your HTTP requests with an Authorization header that contains the word Basic
followed by a space and a base64-encoded string username:password.

Example: Authorization: Basic ZGVtbzpwQDU1dzByZA==

BearerAuth (http)

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer 123

OAuth2Auth (oauth2)

Password OAuth Flow

Token URL: https://example.com/oauth/token

Scopes:

  • flight.read - Read flight data
  • flight.write - Modify flight data

Implicit OAuth Flow

Authorize URL: https://example.com/oauth/authorize

Scopes:

  • flight.read - Read flight data

Authorization Code OAuth Flow

Authorize URL: https://example.com/oauth/authorize

Token URL: https://example.com/oauth/token

Scopes:

  • flight.read - Read flight data
  • flight.write - Modify flight data

Client Credentials OAuth Flow

Token URL: https://example.com/oauth/token

Scopes:

  • flight.admin - Administrative access
OpenIdConnectAuth (openIdConnect)
MutualTLSAuth (mutualTLS)

flights

Flight search and booking operations

Search for available flights

Returns a list of available flights matching the criteria.

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

Query Parameters

originstringrequired

IATA airport code

Match pattern:^[A-Z]{3}$

Example:DEN

destinationstringrequired

IATA airport code

Match pattern:^[A-Z]{3}$

Example:DEN

departureDatestring(date)required
returnDatestring(date)
cabinClassstring

Allowed values:economypremium_economybusinessfirst

limitinteger

Page size

>= 1<= 100

offsetinteger

Pagination offset

>= 0

Headers

Accept-Languagestring

Preferred language for response

X-Correlation-IDstring(uuid)

Correlation identifier for tracing

Response

application/json

Successful search

FlightSearchResponse

flightsarray[object]required

Example:{"id":"f7d5d7c8-9b3e-4a0e-93e0-3bb08f75df0f","airline":"Example Air","flightNumber":"EA123","origin":{"code":"DEN","name":"Denver International Airport","city":"Denver","country":"USA"},"destination":{"code":"LAX","name":"Los Angeles International Airport","city":"Los Angeles","country":"USA"},"departureTime":"2025-06-01T08:00:00Z","arrivalTime":"2025-06-01T10:00:00Z","durationMinutes":120,"aircraft":"Boeing 737","seatsAvailable":42}

Show Child Parameters
paginationobject
Show Child Parameters

Callbacks

post
{$request.body#/callbackUrl}

Callback Response

204

Received

get/flights/search
 
application/json
callback sample
Callback Body
Callback Response
204

Book a flight

Books a flight and returns booking confirmation.

post
https://api.example.com/v1/flights/flights/book

Headers

X-Correlation-IDstring(uuid)

Correlation identifier for tracing

Body

application/json

Booking request body

BookingRequest

flightIdstring(uuid)required
passengersarray[object]required
Show Child Parameters
paymentOne Of
objectrequired
CreditCardobject
Show Child Parameters

Response

application/json

Booking created

BookingResponse

flightIdstring(uuid)required
passengersarray[object]required
Show Child Parameters
paymentOne Of
required
CreditCardobject
Show Child Parameters
bookingIdstring(uuid)required
statusstringrequired

Allowed values:pendingconfirmedcancelled

totalPriceobject
Show Child Parameters
post/flights/book

Body

{ "flightId": "flightId", "passengers": [ { "firstName": "firstName", "lastName": "lastName", "dateOfBirth": "dateOfBirth" } ], "payment": {} }
 
application/json

Retrieve booking details

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

Path Parameters

bookingIdstring(uuid)required

Response

application/json

Booking details

BookingResponse

flightIdstring(uuid)required
passengersarray[object]required
Show Child Parameters
paymentOne Of
required
CreditCardobject
Show Child Parameters
bookingIdstring(uuid)required
statusstringrequired

Allowed values:pendingconfirmedcancelled

totalPriceobject
Show Child Parameters
get/flights/{bookingId}
 
application/json