> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flyskye.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel a booking

> Send `{}` for a refund quote without cancelling. Send `{ "confirm": true }` to cancel; Skye cancels with the airline and refunds the traveller to the original payment method. Scope `book`.



## OpenAPI

````yaml /api-reference/openapi.yaml post /bookings/{ref}/cancel
openapi: 3.1.0
info:
  title: Skye Flights API
  version: '1.0'
  description: Search and book real flights for your users. Skye is the Merchant of Record.
servers:
  - url: https://api.flyskye.ai/v1
security:
  - accessToken: []
tags:
  - name: Authentication
  - name: Flights
  - name: Booking sessions
  - name: Payments
  - name: Bookings
paths:
  /bookings/{ref}/cancel:
    post:
      tags:
        - Bookings
      summary: Cancel a booking
      description: >-
        Send `{}` for a refund quote without cancelling. Send `{ "confirm": true
        }` to cancel; Skye cancels with the airline and refunds the traveller to
        the original payment method. Scope `book`.
      parameters:
        - $ref: '#/components/parameters/BookingRef'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                confirm:
                  type: boolean
                  default: false
      responses:
        '200':
          description: A refund quote, or the cancellation result.
          content:
            application/json:
              schema:
                oneOf:
                  - title: Quote
                    type: object
                    properties:
                      quote:
                        type: object
                        properties:
                          refund:
                            type: number
                          nonRefundable:
                            type: number
                          currency:
                            type: string
                          refundUnknown:
                            type: boolean
                  - title: Cancelled
                    type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - cancelled
                          - refunded
                      refund:
                        type: number
                      refunded:
                        type: boolean
                      alreadyDone:
                        type: boolean
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
components:
  parameters:
    BookingRef:
      name: ref
      in: path
      required: true
      description: The Skye booking id or the PNR.
      schema:
        type: string
  responses:
    NotFound:
      description: No such session or booking for your account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: >-
        The session or booking is not in a state that allows this. See the error
        code.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: invalid_request
            message:
              type: string
              example: departDate cannot be in the past
            field:
              type: string
              example: departDate
  securitySchemes:
    accessToken:
      type: http
      scheme: bearer
      description: An access token (`sat_...`) from `POST /token`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.