---
title: "Flight LLM Booking API"
url: "https://kongair.terwilligar.com/apis/llm-flight-booking-assistant-1-0-0/versions/76f089d9-b12c-4dd8-a400-e4c611faf544"
---

# Flight LLM Booking API

OpenAPI specification document.

```json
{"openapi":"3.1.0","info":{"title":"Flight LLM Booking API","summary":"Kitchen-sink OpenAPI spec for a fictional LLM-powered flight booking service.","description":"This mega large super huge specification demonstrates nearly every feature of the OpenAPI Specification v3.1.\nIt is **not** meant to be fully functional, but rather to serve as an exhaustive reference implementation.\n","termsOfService":"https://example.com/terms","contact":{"name":"API Support","url":"https://example.com/support","email":"support@example.com"},"license":{"name":"Apache 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0.html"},"version":"1.0.0"},"jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","externalDocs":{"description":"Full documentation","url":"https://docs.example.com"},"servers":[{"url":"https://api.example.com/v1","description":"Production server","variables":{"version":{"enum":["v1","v2"],"default":"v1"},"region":{"enum":["us","eu","asia"],"default":"us","description":"Geographic region"}}},{"url":"https://sandbox.example.com/{version}","description":"Sandbox server","variables":{"version":{"default":"v1"}}}],"tags":[{"name":"flights","description":"Flight search and booking operations","externalDocs":{"description":"More about flights","url":"https://docs.example.com/flights"}},{"name":"auth","description":"Authentication and authorization"},{"name":"admin","description":"Administrative endpoints (requires elevated privileges)"}],"security":[{"OAuth2Auth":["flight.read","flight.write"]},{"ApiKeyAuth":[]}],"paths":{"/flights/search":{"get":{"tags":["flights"],"summary":"Search for available flights","description":"Returns a list of available flights matching the criteria.","operationId":"searchFlights","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"},{"$ref":"#/components/parameters/CorrelationId"},{"in":"query","name":"origin","required":true,"schema":{"$ref":"#/components/schemas/IATACode"},"description":"IATA code of origin airport"},{"in":"query","name":"destination","required":true,"schema":{"$ref":"#/components/schemas/IATACode"}},{"in":"query","name":"departureDate","required":true,"schema":{"type":"string","format":"date"}},{"in":"query","name":"returnDate","schema":{"type":"string","format":"date"}},{"in":"query","name":"cabinClass","schema":{"type":"string","enum":["economy","premium_economy","business","first"]}},{"$ref":"#/components/parameters/PageLimit"},{"$ref":"#/components/parameters/PageOffset"},{"$ref":"#/components/parameters/SessionIdCookie"}],"responses":{"200":{"description":"Successful search","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"Set-Cookie":{"description":"Session cookie","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlightSearchResponse"},"examples":{"default":{"$ref":"#/components/examples/FlightSearchResponseExample"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalError"}},"callbacks":{"flightStatusCallback":{"$ref":"#/components/callbacks/FlightStatusCallback"}},"security":[{"OAuth2Auth":["flight.read"]}],"deprecated":false,"servers":[{"url":"https://api.example.com/{version}/flights","variables":{"version":{"default":"v1"}}}]}},"/flights/book":{"post":{"tags":["flights"],"summary":"Book a flight","description":"Books a flight and returns booking confirmation.\n","operationId":"bookFlight","parameters":[{"$ref":"#/components/parameters/CorrelationId"}],"requestBody":{"$ref":"#/components/requestBodies/BookingRequestBody"},"responses":{"201":{"description":"Booking created","headers":{"Location":{"description":"URL of the created booking","schema":{"type":"string","format":"uri"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingResponse"},"examples":{"default":{"$ref":"#/components/examples/BookingResponseExample"}}}},"links":{"GetBookingById":{"$ref":"#/components/links/GetBookingById"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"409":{"$ref":"#/components/responses/Conflict"},"500":{"$ref":"#/components/responses/InternalError"}},"security":[{"OAuth2Auth":["flight.write"]},{"ApiKeyAuth":[]}],"deprecated":false}},"/flights/{bookingId}":{"parameters":[{"$ref":"#/components/parameters/bookingId"}],"get":{"tags":["flights"],"summary":"Retrieve booking details","operationId":"getBooking","responses":{"200":{"description":"Booking details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingResponse"}}}},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"OAuth2Auth":["flight.read"]}]},"patch":{"tags":["flights"],"summary":"Modify booking","operationId":"updateBooking","requestBody":{"$ref":"#/components/requestBodies/BookingPatchRequestBody"},"responses":{"200":{"description":"Booking updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"OAuth2Auth":["flight.write"]}]},"delete":{"tags":["flights"],"summary":"Cancel booking","operationId":"cancelBooking","responses":{"204":{"description":"Booking cancelled"},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"OAuth2Auth":["flight.write"]}]}},"/auth/login":{"post":{"tags":["auth"],"summary":"User login","operationId":"login","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string"},"password":{"type":"string","format":"password"}}}}}},"responses":{"200":{"description":"Login successful","headers":{"Set-Cookie":{"description":"Session cookie","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"expiresIn":{"type":"integer","format":"int32"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}}},"webhooks":{"flightStatus":{"post":{"summary":"Receive flight status updates","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlightStatusUpdate"}}}},"responses":{"204":{"description":"Status received"}}}}},"components":{"schemas":{"IATACode":{"type":"string","pattern":"^[A-Z]{3}$","description":"IATA airport code","examples":["DEN"]},"Flight":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"airline":{"type":"string"},"flightNumber":{"type":"string"},"origin":{"$ref":"#/components/schemas/Airport"},"destination":{"$ref":"#/components/schemas/Airport"},"departureTime":{"type":"string","format":"date-time"},"arrivalTime":{"type":"string","format":"date-time"},"durationMinutes":{"type":"integer","minimum":0},"aircraft":{"type":"string"},"seatsAvailable":{"type":"integer"}},"required":["id","airline","flightNumber","origin","destination","departureTime","arrivalTime"],"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}},"Airport":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/IATACode"},"name":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"}}},"Passenger":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"dateOfBirth":{"type":"string","format":"date"},"passportNumber":{"type":"string"},"nationality":{"type":"string"}},"required":["firstName","lastName","dateOfBirth"]},"FlightSearchRequest":{"type":"object","properties":{"origin":{"$ref":"#/components/schemas/IATACode"},"destination":{"$ref":"#/components/schemas/IATACode"},"departureDate":{"type":"string","format":"date"},"returnDate":{"type":"string","format":"date"},"passengers":{"type":"integer","minimum":1},"cabinClass":{"type":"string","enum":["economy","premium_economy","business","first"]}},"required":["origin","destination","departureDate","passengers"]},"FlightSearchResponse":{"type":"object","properties":{"flights":{"type":"array","items":{"$ref":"#/components/schemas/Flight"}},"pagination":{"type":"object","properties":{"limit":{"type":"integer"},"offset":{"type":"integer"},"total":{"type":"integer"}}}},"required":["flights"]},"BookingRequest":{"type":"object","properties":{"flightId":{"type":"string","format":"uuid"},"passengers":{"type":"array","items":{"$ref":"#/components/schemas/Passenger"}},"payment":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["flightId","passengers","payment"]},"BookingPatchRequest":{"type":"object","properties":{"addPassenger":{"$ref":"#/components/schemas/Passenger"},"removePassengerId":{"type":"string","format":"uuid"}}},"BookingResponse":{"allOf":[{"$ref":"#/components/schemas/BookingRequest"},{"type":"object","properties":{"bookingId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","confirmed","cancelled"]},"totalPrice":{"$ref":"#/components/schemas/Price"}},"required":["bookingId","status"]}]},"Price":{"type":"object","properties":{"amount":{"type":"number","format":"float"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount","currency"]},"PaymentMethod":{"type":"object","discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CreditCard"},{"$ref":"#/components/schemas/PayPal"}]},"CreditCard":{"type":"object","properties":{"type":{"type":"string","enum":["credit_card"]},"cardNumber":{"type":"string"},"expiryMonth":{"type":"integer","minimum":1,"maximum":12},"expiryYear":{"type":"integer","minimum":2025},"cvv":{"type":"string"}},"required":["type","cardNumber","expiryMonth","expiryYear","cvv"]},"PayPal":{"type":"object","properties":{"type":{"type":"string","enum":["paypal"]},"email":{"type":"string","format":"email"}},"required":["type","email"]},"FlightStatusUpdate":{"type":"object","properties":{"flightId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["scheduled","boarding","departed","delayed","arrived","cancelled"]},"timestamp":{"type":"string","format":"date-time"}},"required":["flightId","status","timestamp"]},"Error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}},"required":["code","message"]}},"parameters":{"bookingId":{"name":"bookingId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},"AcceptLanguage":{"name":"Accept-Language","in":"header","description":"Preferred language for response","schema":{"type":"string"}},"CorrelationId":{"name":"X-Correlation-ID","in":"header","description":"Correlation identifier for tracing","schema":{"type":"string","format":"uuid"}},"PageLimit":{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"Page size"},"PageOffset":{"name":"offset","in":"query","schema":{"type":"integer","minimum":0},"description":"Pagination offset"},"SessionIdCookie":{"name":"session_id","in":"cookie","schema":{"type":"string"},"description":"Session identifier"}},"requestBodies":{"FlightSearchBody":{"description":"Flight search request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlightSearchRequest"},"examples":{"default":{"$ref":"#/components/examples/FlightSearchRequestExample"}}}}},"BookingRequestBody":{"description":"Booking request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingRequest"}}}},"BookingPatchRequestBody":{"description":"Booking patch request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingPatchRequest"}}}}},"responses":{"BadRequest":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"PaymentRequired":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"headers":{"RateLimitLimit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"RateLimitRemaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}}},"examples":{"FlightSearchRequestExample":{"summary":"Example flight search request","value":{"origin":"DEN","destination":"LAX","departureDate":"2025-06-01","passengers":1,"cabinClass":"economy"}},"FlightSearchResponseExample":{"summary":"Example flight search response","value":{"flights":[{"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}],"pagination":{"limit":10,"offset":0,"total":1}}},"BookingResponseExample":{"summary":"Example booking response","value":{"bookingId":"b1234567-89ab-cdef-0123-456789abcdef","flightId":"f7d5d7c8-9b3e-4a0e-93e0-3bb08f75df0f","passengers":[{"firstName":"John","lastName":"Doe","dateOfBirth":"1990-01-01"}],"status":"confirmed","totalPrice":{"amount":199.99,"currency":"USD"}}}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key"},"BasicAuth":{"type":"http","scheme":"basic"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"OAuth2Auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://example.com/oauth/authorize","tokenUrl":"https://example.com/oauth/token","scopes":{"flight.read":"Read flight data","flight.write":"Modify flight data"}},"clientCredentials":{"tokenUrl":"https://example.com/oauth/token","scopes":{"flight.admin":"Administrative access"}},"implicit":{"authorizationUrl":"https://example.com/oauth/authorize","scopes":{"flight.read":"Read flight data"}},"password":{"tokenUrl":"https://example.com/oauth/token","scopes":{"flight.read":"Read flight data","flight.write":"Modify flight data"}}}},"OpenIdConnectAuth":{"type":"openIdConnect","openIdConnectUrl":"https://example.com/.well-known/openid-configuration"},"MutualTLSAuth":{"type":"mutualTLS"}},"links":{"GetBookingById":{"operationId":"getBooking","parameters":{"bookingId":"$response.body#/bookingId"},"description":"Get the newly created booking using its ID"}},"callbacks":{"FlightStatusCallback":{"{$request.body#/callbackUrl}":{"post":{"summary":"Flight status update","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlightStatusUpdate"}}}},"responses":{"204":{"description":"Received"}}}}}}},"x-logo":{"url":"https://example.com/logo.png"},"x-api-id":"flight-llm"}
```
