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

# Cancel a booking

> Auth: optional. This endpoint allows a customer to cancel a booking either anonymously via the access token or via customer login.



## OpenAPI

````yaml /developers/openapi/customer.openapi.json get /api/v1/bookings/{booking_id}/cancel
openapi: 3.1.0
info:
  title: customer-api
  version: '1.0'
  contact:
    name: anny GmbH
    url: anny.co
    email: support@anny.co
  description: >-
    The Customer API is the **public booking surface** for end-user facing
    applications. It covers everything a customer can see and do — searching
    availability, placing bookings, managing their account, and more.


    ---


    ## When to use the Customer API


    Use the Customer API when you are **building something your customers
    interact with directly**:


    - **Custom booking flow** — embed a fully branded booking experience inside
    your own app or website instead of redirecting to anny

    - **Headless checkout** — drive the cart, checkout, and payment steps
    entirely from your own frontend

    - **Custom confirmation pages** — retrieve booking and order details after
    checkout to render a tailored confirmation

    - **Opening hours and availability on public pages** — display live schedule
    data on your website with no authentication required

    - **White-label experiences** — build lobby screens, kiosks, or mobile apps
    on top of the Customer API


    Many endpoints work **without any authentication**. For a custom OAuth2
    client to authenticate your own users, contact
    [support@anny.co](mailto:support@anny.co) with your use case.


    ---


    ## Authentication — Optional Auth


    Most Customer API endpoints work without a token. Providing a customer
    bearer token unlocks personal data and additional actions:


    | Auth state | What's accessible |

    |---|---|

    | Anonymous | Availability, public resource/service info, booking lookup by
    number, checkout |

    | Customer token | Own bookings, account data, communities, passes, queue
    tickets |


    ```

    Authorization: Bearer {customer_access_token}

    ```


    To authenticate your own users, you need a custom OAuth2 client — contact
    [support@anny.co](mailto:support@anny.co). See the [Authentication
    guide](/developers/guides/authentication) for the full token flow.


    ---


    ## Customer API vs Admin API


    | Feature | Customer API | Admin API |

    |---|---|---|

    | **Use case** | End-user apps, booking widgets | Server-side automation,
    backend tooling |

    | **Auth** | Optional — many endpoints work without a token | Required — API
    token or OAuth2 |

    | **Identifiers** | Slugs, booking numbers, order numbers | Immutable UUIDs
    and integer IDs |

    | **Access** | Public and customer-owned data only | Full read/write |


    → [Go to the Admin API](/developers/api-reference/admin)


    ---


    ## Resource Identifiers


    The Customer API uses **human-readable identifiers** that appear in booking
    URLs:


    | Entity | Identifier | Example |

    |---|---|---|

    | Resources | Slug | `conference-room-berlin` |

    | Services | Slug | `hourly-desk-booking` |

    | Organizations | Slug | `acme-gmbh` |

    | Bookings | Booking number | `BB123456789` |

    | Orders | Order number | `BO123456789` |


    Use the Admin API if you need immutable internal IDs for storage in external
    systems.


    ---


    ## Starting Points


    | Guide | What it covers |

    |---|---|

    | [Getting Started](/developers) | First steps and quickstart |

    | [JSON:API Conventions](/developers/guides/json-api-conventions) | Request
    and response format |

    | [Authentication](/developers/guides/authentication) | Customer token flow,
    OAuth2, anonymous access |

    | [Availability & Booking Search](/developers/guides/availability) | Search
    open slots, filter by service and resource |

    | [Customer Booking
    Lifecycle](/developers/guides/customer/booking-lifecycle) | View, modify,
    and cancel bookings |

    | [Order & Checkout Flow](/developers/guides/customer/checkout) | Cart,
    checkout steps, payment |

    | [Plans & Subscriptions](/developers/guides/customer/plans-subscriptions) |
    Membership plans and recurring billing |

    | [Communities & Access Control](/developers/guides/customer/communities) |
    Community membership and access gates |

    | [Waitlist](/developers/guides/customer/waitlist) | Join and manage
    waitlists |


    ---


    ## Base URLs


    | Environment | URL |

    |---|---|

    | Production | `https://b.anny.co` |

    | Gov-Cloud | `https://b.anny.eu` |
  termsOfService: https://anny.co/terms-of-use
  x-logo:
    url: https://cdn.anny.co/cms/anny_logo_main_colour_blue_4865e76654.svg
    altText: anny logo
    href: https://anny.co
servers:
  - url: https://b.anny.co
    description: Production
  - url: https://b.anny.eu
    description: Gov-Cloud
security: []
tags:
  - name: Account Passes
  - name: Account Skills
  - name: Addresses
  - name: Availability
  - name: Booking Bundles
  - name: Booking Passes
  - name: Booking Quota Grants
  - name: Bookings
  - name: Communities
  - name: Community Accounts
  - name: Community Invites
  - name: Customer Accounts
  - name: Favorites
  - name: Orders
  - name: Organizations
  - name: Plan Subscriptions
  - name: Properties
  - name: Queues
  - name: Queue Tickets
  - name: Resources
  - name: Services
  - name: Waitlist
paths:
  /api/v1/bookings/{booking_id}/cancel:
    parameters:
      - schema:
          type: string
        name: booking_id
        in: path
        required: true
        description: id of the booking
    get:
      tags:
        - Bookings
      summary: Cancel a booking
      description: >-
        Auth: optional. This endpoint allows a customer to cancel a booking
        either anonymously via the access token or via customer login.
      operationId: get-bookings-record-cancel
      parameters:
        - schema:
            type: string
          in: query
          name: access_token
          description: Access token of the accociated order
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/bookings.v1'
              examples:
                default:
                  value:
                    data:
                      type: bookings
                      id: '3718496'
                      attributes:
                        number: BB29997477
                        status: canceled
                        is_blocker: false
                        start_date: '2021-10-08T07:00:00+00:00'
                        end_date: '2021-10-08T11:00:00+00:00'
                        blocker_start_date: '2021-10-08T07:00:00+00:00'
                        blocker_end_date: '2021-10-08T11:00:00+00:00'
                        description: >-
                          Max Mustermann - Coaching: Leadership - Empower Your
                          Employees
                        charged_duration: 240
                        weight: 1
                        currency: EUR
                        total: 287
                        code: pZuhVSjhKdCUhI7f
                        subtotal: 249
                        charged_total: 0
                        charged_subtotal: 0
                        starting_fee: 0
                        customer_note: null
                        created_at: '2021-09-24T14:41:31+00:00'
                        canceled_at: '2021-09-27T10:01:51+00:00'
                        check_in_date: null
                        check_out_date: null
                        custom_entry_map:
                          55536678-2266-4bb0-99f5-206348244ad2:
                            value: COO
                            formatted_value: COO
                            label: Position
                      links:
                        self: https://b.anny.co/api/v1/bookings/3718496
                      meta: []
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      security: []
components:
  schemas:
    bookings.v1:
      $schema: https://json-schema.org/draft/2020-12/schema
      x-version: 1.1.0
      title: Booking
      type: object
      description: >-
        A booking blocks the related resource from `start_date` until its
        `end_date` while its status is `reserved`, `requested` or `accepted`.


        **Status values:**

        - `reserved` — booking is reserved until order expiration

        - `requested` — needs manual acceptance by admin

        - `accepted` — accepted (automatically or manually)

        - `rejected` — rejected by admin before fulfillment; always yields a
        100% refund when payment exists

        - `canceled` — canceled by customer or admin; refund follows the
        configured cancellation policy conditions

        - `expired` — booking expired because the check-in time passed without
        check-in
      x-tags:
        - Models
      properties:
        id:
          type: string
        type:
          type: string
          default: bookings
        attributes:
          type: object
          properties:
            number:
              type:
                - string
                - 'null'
              description: Booking number
            status:
              type: string
              enum:
                - reserved
                - requested
                - accepted
                - rejected
                - canceled
                - expired
              description: Current booking status
            is_blocker:
              type: boolean
              description: Whether this booking blocks the resource time slot
            start_date:
              type: string
              description: Start date in ISO 8601 format
            end_date:
              type: string
              description: End date in ISO 8601 format
            blocker_start_date:
              type: string
              description: Blocker interval start (includes buffer time)
            blocker_end_date:
              type: string
              description: Blocker interval end (includes buffer time)
            description:
              type:
                - string
                - 'null'
              description: Auto-generated description
              x-visibility: admin
            charged_duration:
              type: integer
              description: Duration in minutes that is charged
            weight:
              type: integer
              description: How many slots this booking occupies
            is_sequence:
              type: boolean
              description: Whether this booking is part of a sequence
            price_hidden:
              type: boolean
              description: Whether prices are hidden for this booking
            visible_for_customer:
              type: boolean
              description: Whether this booking is visible for the customer
            can_edit:
              type: boolean
              description: Whether the customer can edit this booking
            is_own:
              type: boolean
              description: Whether the authenticated customer owns this booking
            currency:
              type:
                - string
                - 'null'
              description: ISO 4217 currency code
              x-visibility: authenticated
            tax_rate:
              type: number
              description: Tax rate applied
              x-visibility: authenticated
            total:
              type: number
              description: Total amount including tax
              x-visibility: authenticated
            is_net_total:
              type: boolean
              description: Whether total is net (before tax)
              x-visibility: authenticated
            code:
              type:
                - string
                - 'null'
              description: Unique booking code for check-in
              x-visibility: authenticated
            subtotal:
              type: number
              description: Subtotal before tax
              x-visibility: authenticated
            charged_total:
              type: number
              description: Total charged amount
              x-visibility: authenticated
            charged_subtotal:
              type: number
              description: Charged subtotal
              x-visibility: authenticated
            starting_fee:
              type: number
              description: Starting fee amount
              x-visibility: authenticated
            customer_note:
              type:
                - string
                - 'null'
              description: Note from the customer
              x-visibility: authenticated
            created_at:
              type: string
              description: Creation timestamp
              x-visibility: authenticated
            canceled_at:
              type:
                - string
                - 'null'
              description: Cancellation timestamp
              x-visibility: authenticated
            check_in_date:
              type:
                - string
                - 'null'
              description: Check-in timestamp
              x-visibility: authenticated
            check_out_date:
              type:
                - string
                - 'null'
              description: Check-out timestamp
              x-visibility: authenticated
            custom_entry_map:
              type: object
              description: Custom field entries as key-value map
              x-visibility: authenticated
            is_series:
              type: boolean
              description: Whether this booking belongs to a series
              x-visibility: authenticated
            is_series_master:
              type: boolean
              description: Whether this is the master booking of a series
              x-visibility: authenticated
            series_id:
              type:
                - string
                - 'null'
              description: ID of the series this booking belongs to
              x-visibility: authenticated
            series_type:
              type:
                - string
                - 'null'
              description: Type of the series
              x-visibility: authenticated
            note:
              type:
                - string
                - 'null'
              description: Internal admin note
              x-visibility: admin
            manually_created:
              type: boolean
              description: Whether booking was created manually by admin
              x-visibility: admin
            is_sub_booking:
              type: boolean
              description: Whether this is a sub-booking
              x-visibility: admin
            external_uuid:
              type:
                - string
                - 'null'
              description: External UUID for integrations
              x-visibility: admin
            has_payment:
              type: boolean
              description: Whether a payment is associated
              x-visibility: admin
            is_editable:
              type: boolean
              description: Whether the booking can be edited
              x-visibility: admin
            status_reason:
              type:
                - string
                - 'null'
              description: Reason for status change
              x-visibility: admin
            updated_at:
              type: string
              description: Last update timestamp
              x-visibility: admin
        links:
          $ref: '#/components/schemas/links.v1'
        relationships:
          type: object
          properties:
            resource:
              type: object
              description: The booked resource
              properties:
                data:
                  type:
                    - object
                    - 'null'
                  properties:
                    type:
                      type: string
                    id:
                      type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            service:
              type: object
              description: The booked service
              properties:
                data:
                  type:
                    - object
                    - 'null'
                  properties:
                    type:
                      type: string
                    id:
                      type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            order:
              type: object
              description: The associated order
              properties:
                data:
                  type:
                    - object
                    - 'null'
                  properties:
                    type:
                      type: string
                    id:
                      type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            customer:
              type: object
              description: The booking customer
              properties:
                data:
                  type:
                    - object
                    - 'null'
                  properties:
                    type:
                      type: string
                    id:
                      type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            organization:
              type: object
              description: The organization
              properties:
                data:
                  type:
                    - object
                    - 'null'
                  properties:
                    type:
                      type: string
                    id:
                      type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            super_booking:
              type: object
              description: Parent booking if this is a sub-booking
              properties:
                data:
                  type:
                    - object
                    - 'null'
                  properties:
                    type:
                      type: string
                    id:
                      type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            sub_bookings:
              type: object
              description: Child sub-bookings
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                      id:
                        type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            booking_add_ons:
              type: object
              description: Add-ons attached to this booking
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                      id:
                        type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            cancellation_policy:
              type: object
              description: Applied cancellation policy
              properties:
                data:
                  type:
                    - object
                    - 'null'
                  properties:
                    type:
                      type: string
                    id:
                      type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            custom_entries:
              type: object
              description: Custom field entries
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                      id:
                        type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            model_identifiers:
              type: object
              description: QR/barcode identifiers
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                      id:
                        type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            activities:
              type: object
              description: Change log activities
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                      id:
                        type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            test_results:
              type: object
              description: Associated test results
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                      id:
                        type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            external_calendar:
              type: object
              description: Synced external calendar
              properties:
                data:
                  type:
                    - object
                    - 'null'
                  properties:
                    type:
                      type: string
                    id:
                      type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            host:
              type: object
              description: Host user for this booking
              properties:
                data:
                  type:
                    - object
                    - 'null'
                  properties:
                    type:
                      type: string
                    id:
                      type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            attendees:
              type: object
              description: Attendee customer accounts
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                      id:
                        type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            booking_participants:
              type: object
              description: Booking participants
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                      id:
                        type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            files:
              type: object
              description: Attached files
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                      id:
                        type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            access_control_grants:
              type: object
              description: Access control grants
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                      id:
                        type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            sync_sources:
              type: object
              description: Integration sync sources
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                      id:
                        type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            reminders:
              type: object
              description: Scheduled reminders
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                      id:
                        type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            sequence:
              type: object
              description: Sequence parent booking
              properties:
                data:
                  type:
                    - object
                    - 'null'
                  properties:
                    type:
                      type: string
                    id:
                      type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            sequenced_bookings:
              type: object
              description: Sequenced bookings
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                      id:
                        type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            series_bookings:
              type: object
              description: Other bookings in the series
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                      id:
                        type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            series_master:
              type: object
              description: Master booking of the series
              properties:
                data:
                  type:
                    - object
                    - 'null'
                  properties:
                    type:
                      type: string
                    id:
                      type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            booking_series:
              type: object
              description: Series configuration
              properties:
                data:
                  type:
                    - object
                    - 'null'
                  properties:
                    type:
                      type: string
                    id:
                      type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            delegated_by:
              type: object
              description: Customer account that delegated this booking
              properties:
                data:
                  type:
                    - object
                    - 'null'
                  properties:
                    type:
                      type: string
                    id:
                      type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            queue_ticket:
              type: object
              description: Associated queue ticket
              properties:
                data:
                  type:
                    - object
                    - 'null'
                  properties:
                    type:
                      type: string
                    id:
                      type: string
                links:
                  $ref: '#/components/schemas/links.v1'
    links.v1:
      $schema: https://json-schema.org/draft/2020-12/schema
      x-version: 1.1.0
      title: ResourceLinks
      x-tags:
        - Models
      type: object
      description: JSON:API self-link object
      properties:
        self:
          type: string
          format: uri

````