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

# Get a booking's extension options

> Returns the extra time that can be added to the end of the booking, each option with its price for the whole party.
At most three options are offered, in steps of the venue's time slot length.
When `can_extend` is `false`, `options` is empty, `reason` holds a reason code and `reason_label` says why in words that can be shown to the guest.
To take an option, send its `added_minutes` and `new_end` to `POST /bookings/{id}/extend`.

**Who can call it:** Any staff role with access to the venue. Also the machine key.



## OpenAPI

````yaml /openapi.yaml get /bookings/{id}/extend-options
openapi: 3.1.0
info:
  description: >-
    Authenticated endpoints need a bearer token: `Authorization: Bearer
    <token>`.

    Each endpoint says whether it needs one. Public endpoints need none.

    A person sends the token they signed in with. A machine, such as a Billy Q
    box, sends its machine key the same way.

    Each endpoint ends with who can call it, and "Who can call what" lists every
    endpoint against every role.


    Every response is wrapped the same way: `status` is always present
    (`success` or `error`),

    `message` carries text that is safe to show a user, and `data` holds the
    payload on success.

    One exception: a 410 for a session that has ended carries the status
    `ended`.


    Money is in minor units (pence). Timestamps are RFC 3339 in UTC. Dates are
    `YYYY-MM-DD`.
  title: CueBridge API
  version: 0.1.0
servers:
  - description: Pre-production
    url: https://api.preprod.poolhouse.dev/api
security: []
tags:
  - description: Confirmed bookings at a venue.
    name: Bookings
  - description: A booking's time at its tables, from check-in to the end of play.
    name: Sessions
  - description: The players checked in to a session.
    name: Session players
  - description: Games played during a session, and the game types a venue offers.
    name: Games
  - description: Shots recorded during a game, and the ratings derived from them.
    name: Game shots
  - description: Per-player statistics and the stat types they are measured in.
    name: Stats
  - description: A venue's pool tables.
    name: Pool tables
  - description: The items placed on a venue's floor plan.
    name: Floor plan
  - description: Achievements players have earned.
    name: Achievements
paths:
  /bookings/{id}/extend-options:
    get:
      tags:
        - Bookings
      summary: Get a booking's extension options
      description: >-
        Returns the extra time that can be added to the end of the booking, each
        option with its price for the whole party.

        At most three options are offered, in steps of the venue's time slot
        length.

        When `can_extend` is `false`, `options` is empty, `reason` holds a
        reason code and `reason_label` says why in words that can be shown to
        the guest.

        To take an option, send its `added_minutes` and `new_end` to `POST
        /bookings/{id}/extend`.


        **Who can call it:** Any staff role with access to the venue. Also the
        machine key.
      operationId: getBookingExtendOptions
      parameters:
        - description: Booking id
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/api.ResponseOf-handlers_kioskExtendOptionsResponse
          description: The options on offer.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.Response'
          description: The id is not a UUID.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.Response'
          description: The bearer token is missing, invalid or expired.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.Response'
          description: The caller may not read bookings at this venue.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.Response'
          description: No booking has this id.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.Response'
          description: Something went wrong on our side.
      security:
        - BearerAuth: []
components:
  schemas:
    api.ResponseOf-handlers_kioskExtendOptionsResponse:
      properties:
        data:
          allOf:
            - $ref: '#/components/schemas/handlers.kioskExtendOptionsResponse'
          description: The payload. Left out when there is none.
        message:
          description: Text that is safe to show a user. Left out when there is none.
          type: string
        status:
          allOf:
            - $ref: '#/components/schemas/api.Status'
          description: >-
            `success` or `error`. A 410 for a session that has ended says
            `ended` instead.
      type: object
    api.Response:
      properties:
        data:
          description: The payload. Left out when there is none.
        message:
          description: Text that is safe to show a user. Left out when there is none.
          type: string
        status:
          allOf:
            - $ref: '#/components/schemas/api.Status'
          description: >-
            `success` or `error`. A 410 for a session that has ended says
            `ended` instead.
      type: object
    handlers.kioskExtendOptionsResponse:
      properties:
        can_extend:
          type: boolean
        current_end:
          description: When the booking ends now, RFC 3339 in UTC.
          format: date-time
          type: string
        current_end_label:
          description: >-
            The same time in the venue's own time zone, ready to display, such
            as "21:00".
          type: string
        guest_count:
          type: integer
        options:
          items:
            $ref: '#/components/schemas/handlers.kioskExtendOption'
          type: array
        reason:
          description: >-
            Why the booking cannot be extended, as a code. Left out when
            `can_extend` is `true`.

            `POST /bookings/{id}/extend` sends the same codes in `data.reason`
            when it answers 409.


            - `venue_disabled`: extensions are switched off at this venue.

            - `not_confirmed`: the booking is not confirmed.

            - `missing_times`: the booking has no start or end time.

            - `multi_table`: the booking does not have exactly one table.

            - `table_locked`: the booking's table is locked.

            - `bar_booking`: the booking is on a bar table.

            - `session_not_started`: nobody is at the table yet.

            - `session_ended`: the visit is over.

            - `no_open_check`: the till has no open bill for the session to add
            the time to.

            - `pool_inclusive`: a package already covers the pool, so extra time
            cannot be sold here.

            - `no_tail`: no time is free on the table after the booking.


            Four more are only sent with the 409, when the extension is being
            saved:


            - `tail_gone`: someone took the time after the options were fetched.

            - `end_moved`: the booking's end changed after the options were
            fetched.

            - `table_conflict`: the table turned out to be taken.

            - `relocation_failed`: the booking after this one could not be moved
            out of the way.
          type: string
        reason_label:
          description: The same reason in words that can be shown to the guest.
          type: string
      type: object
    api.Status:
      enum:
        - success
        - error
        - ended
      type: string
      x-enum-varnames:
        - StatusSuccess
        - StatusError
        - StatusEnded
    handlers.kioskExtendOption:
      properties:
        added_minutes:
          type: integer
        new_end:
          description: >-
            The end time this option gives the booking, RFC 3339 in UTC. Send it
            back unchanged as `new_end` to choose the option.
          format: date-time
          type: string
        new_end_label:
          description: >-
            The same time in the venue's own time zone, ready to display, such
            as "21:40".
          type: string
        price_label:
          description: The price ready to display, such as "£20.00".
          type: string
        price_pence:
          description: What the option adds to the bill, in pence.
          type: integer
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````

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