---
title: "Cancel booking"
url: "https://kongair.terwilligar.com/apis/llm-flight-booking-assistant-1-0-0/versions/76f089d9-b12c-4dd8-a400-e4c611faf544/operations/cancelBooking"
---

> Full API specification: https://kongair.terwilligar.com/apis/llm-flight-booking-assistant-1-0-0/versions/76f089d9-b12c-4dd8-a400-e4c611faf544.md

# Cancel booking

`DELETE` `/flights/{bookingId}`

Operation ID: `cancelBooking`

## Path parameters

- `bookingId` (string, uuid, required)

## Responses

- `204` - Booking cancelled
- `404` - Resource not found

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: Flight LLM Booking API
  version: 1.0.0
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
paths:
  /flights/{bookingId}:
    parameters:
      - $ref: "#/components/parameters/bookingId"
    delete:
      tags:
        - flights
      summary: Cancel booking
      operationId: cancelBooking
      responses:
        "204":
          description: Booking cancelled
        "404":
          $ref: "#/components/responses/NotFound"
      security:
        - OAuth2Auth:
            - flight.write
security:
  - OAuth2Auth:
      - flight.write
components:
  parameters:
    bookingId:
      name: bookingId
      in: path
      required: true
      schema:
        type: string
        format: uuid
  responses:
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
  schemas:
    Error:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        details:
          type: array
          items:
            type: string
      required:
        - code
        - message
  securitySchemes:
    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
```
