---
openapi: 3.0.1
info:
  title: GoTable API V1
  version: v1
  description: The API that can be used to build integrations for GoTable.
tags:
- name: Meta
  description: Starting point for the API itself.
- name: Restaurant
  description: Endpoints for retrieving restaurant information.
- name: Account
  description: Endpoints for retrieving information about a restaurant's accounts.
- name: Reservation
  description: Endpoints for retrieving and updating existing reservation information,
    or creating new reservations.
- name: Offer
  description: Endpoints for retrieving information about a restaurant's offers.
- name: Guest
  description: Endpoints for retrieving information about a restaurant's guests.
- name: Note
  description: Endpoints for retrieving information about a restaurant's notes.
- name: Table
  description: Endpoints for retrieving information about a restaurant's tables.
- name: Combination
  description: Endpoints for retrieving information about a restaurant's table combinations.
    A combination is a group of tables that can be seated together as one larger table.
- name: Webhook
  description: |-
    Endpoints for managing native outbound webhooks that fire on reservation lifecycle events. Deliveries follow the [Standard Webhooks](https://www.standardwebhooks.com/) specification, so you can verify them with any compatible client library.

    ### Available events

    #### Reservation

    - `reservation.created` — A new reservation has been created.
    - `reservation.updated` — An existing reservation has been changed in any way. This fires alongside any workflow event below, since workflow transitions also update the record.
    - `reservation.confirmed` — A reservation transitioned to the `confirmed` state (e.g. accepted by the restaurant or auto-confirmed by the realtime engine).
    - `reservation.cancelled` — A reservation was cancelled, either by the guest or by the restaurant.
    - `reservation.rejected` — A reservation request was rejected.
    - `reservation.checked_in` — A guest was marked as checked in.
    - `reservation.checked_out` — A guest was marked as checked out.
    - `reservation.no_show` — A reservation was marked as a no-show.

    #### Restaurant

    - `restaurant.updated` — Restaurant settings or details have been changed.

    #### Offer

    - `offer.created` — A new offer has been added to the restaurant's catalogue.
    - `offer.updated` — An existing offer was edited.
    - `offer.deleted` — An offer has been removed.

    #### Guest

    - `guest.created` — A new guest profile has been created.
    - `guest.updated` — An existing guest profile was edited.
    - `guest.deleted` — A guest profile has been removed.

    #### Note

    Notes are attached to a reservation or to a restaurant. The `data.noteable` field on the payload identifies which.

    - `note.created` — A new note has been added.
    - `note.updated` — An existing note was edited.
    - `note.deleted` — A note has been removed.

    #### Table

    - `table.created` — A new table has been added to the floor plan.
    - `table.updated` — A table's label, section, or capacity has been changed.
    - `table.deleted` — A table has been removed.

    #### Combination

    A combination is a group of tables that can be seated together as one larger table.

    - `combination.created` — A new table combination has been defined.
    - `combination.updated` — A table combination's settings have changed.
    - `combination.deleted` — A table combination has been removed.
paths:
  "/api/v1/restaurants/{restaurant_id}/accounts":
    get:
      summary: Retrieve a paginated list of accounts that have access to the restaurant
      tags:
      - Account
      security:
      - bearerAuth: []
      parameters:
      - name: restaurant_id
        in: path
        required: true
        schema:
          type: integer
      - name: page
        in: query
        example: 1
        required: false
        description: Current page number
        schema:
          type: integer
      - name: per_page
        in: query
        example: 20
        required: false
        description: Number of results per page (max 100)
        schema:
          type: integer
      responses:
        '200':
          description: With a valid API token
          content:
            application/json:
              schema:
                type: object
                properties:
                  accounts:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Account"
                  meta:
                    "$ref": "#/components/schemas/Pagination"
        '403':
          description: With an unauthorized API token
        '401':
          description: With an invalid API token
        '404':
          description: With a non-existant Restaurant ID
  "/api/v1/restaurants/{restaurant_id}/availability":
    get:
      summary: Retrieve availability for the given restaurant
      tags:
      - Restaurant
      description: Retrieve the availability for a specific restaurant over a given
        date range.
      security:
      - bearerAuth: []
      parameters:
      - name: restaurant_id
        in: path
        required: true
        schema:
          type: integer
      - name: from
        in: query
        example: '2026-06-01'
        required: false
        description: 'Start date for availability (format: YYYY-MM-DD)'
        schema:
          type: string
      - name: till
        in: query
        example: '2026-06-30'
        required: false
        description: 'End date for availability (format: YYYY-MM-DD)'
        schema:
          type: string
      responses:
        '200':
          description: With a valid API token
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Availability"
        '403':
          description: With an unauthorized API token
        '401':
          description: With an invalid API token
        '404':
          description: With a non-existant Restaurant ID
  "/api/v1/restaurants/{restaurant_id}/offers/{offer_id}/availability":
    get:
      summary: Retrieve availability for the given offer
      tags:
      - Offer
      description: Retrieve the availability for a restaurant's offer over a given
        date range.
      security:
      - bearerAuth: []
      parameters:
      - name: restaurant_id
        in: path
        required: true
        schema:
          type: integer
      - name: offer_id
        in: path
        required: true
        schema:
          type: integer
      - name: from
        in: query
        example: '2026-06-01'
        required: false
        description: 'Start date for availability (format: YYYY-MM-DD)'
        schema:
          type: string
      - name: till
        in: query
        example: '2026-06-30'
        required: false
        description: 'End date for availability (format: YYYY-MM-DD)'
        schema:
          type: string
      responses:
        '200':
          description: With a valid API token
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Availability"
        '403':
          description: With an unauthorized API token
        '401':
          description: With an invalid API token
        '404':
          description: With a non-existant Offer ID
  "/api/v1/restaurants/{restaurant_id}/combinations":
    get:
      summary: Retrieve a paginated list of a restaurant's table combinations
      tags:
      - Combination
      security:
      - bearerAuth: []
      parameters:
      - name: restaurant_id
        in: path
        required: true
        schema:
          type: integer
      - name: page
        in: query
        example: 1
        required: false
        description: Current page number
        schema:
          type: integer
      - name: per_page
        in: query
        example: 20
        required: false
        description: Number of results per page (max 100)
        schema:
          type: integer
      responses:
        '200':
          description: With a valid API token
          content:
            application/json:
              schema:
                type: object
                properties:
                  combinations:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Combination"
                  meta:
                    "$ref": "#/components/schemas/Pagination"
        '403':
          description: With an unauthorized API token
        '401':
          description: With an invalid API token
        '404':
          description: With a non-existant Restaurant ID
  "/api/v1/restaurants/{restaurant_id}/combinations/{combination_id}":
    get:
      summary: Find a table combination by ID
      tags:
      - Combination
      security:
      - bearerAuth: []
      parameters:
      - name: restaurant_id
        in: path
        required: true
        schema:
          type: integer
      - name: combination_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: With a valid API token
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Combination"
        '403':
          description: With an unauthorized API token
        '401':
          description: With an invalid API token
        '404':
          description: With a non-existant Combination ID
  "/api/v1/restaurants/{restaurant_id}/guests":
    get:
      summary: Retrieve a paginated list of guests
      tags:
      - Guest
      security:
      - bearerAuth: []
      parameters:
      - name: restaurant_id
        in: path
        required: true
        schema:
          type: integer
      - name: page
        in: query
        example: 1
        required: false
        description: Current page number
        schema:
          type: integer
      - name: per_page
        in: query
        example: 20
        required: false
        description: Number of results per page (max 100)
        schema:
          type: integer
      - name: query
        in: query
        required: false
        description: |
          Search guests by a combination of query and operators to filter.

          List of fields you can filter by:

          - **name:** The guest's name.
          - **email:** The guest's email.
          - **telephone:** The guest's telephone.
          - **last_visit:** The date of the guest's last visit.
          - **visits:** The number of visits the guest has made.
          - **reservations:** The number of reservations the guest has made.

          List of comparison functions you can use with these fields:

          - `<=` **less than or equal to**
          - `<` **less than**
          - `>=` **greater than or equal to**
          - `>` **greater than**
          - `!=` **not_equal_to**
          - `=`, `==` **equal_to**
          - `!:`, `!~` **does not contain**
          - `:`, `~` **contains**

          For example, _"John last_visit>=2026-05-25"_ to find all guests matching the keyword "John" that last visited on any date equal to or in the future of 2026-05-25.
        examples:
          combination_of_query_and_filters:
            summary: Combination of query and filters
            value: John last_visit>=2026-05-25
          search_in_results:
            summary: Fuzzy search (case-insensitive)
            value: Barry
          filter_by_last_visit_comparison:
            summary: Filter by last visit comparison
            value: last_visit>=2026-05-25
          filter_by_exact_status:
            summary: Filter by exact number of visits
            value: visits=10
          filter_by_name_wildcard:
            summary: Filter by name containing
            value: name~John
        schema:
          type: string
      responses:
        '200':
          description: With a valid API token
          content:
            application/json:
              schema:
                type: object
                properties:
                  guests:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Guest"
                  meta:
                    "$ref": "#/components/schemas/Pagination"
        '403':
          description: With an unauthorized API token
        '401':
          description: With an invalid API token
        '404':
          description: With a non-existant Restaurant ID
  "/api/v1/restaurants/{restaurant_id}/guests/{guest_id}":
    get:
      summary: Find a guest by ID
      tags:
      - Guest
      security:
      - bearerAuth: []
      parameters:
      - name: restaurant_id
        in: path
        required: true
        schema:
          type: integer
      - name: guest_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: With a valid API token
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Guest"
        '403':
          description: With an unauthorized API token
        '401':
          description: With an invalid API token
        '404':
          description: With a non-existant Guest ID
  "/api/v1":
    get:
      summary: Meta information about the API and its documentation
      tags:
      - Meta
      security:
      - bearerAuth: []
      responses:
        '200':
          description: With a valid API token
        '401':
          description: With an invalid API token
  "/api/v1/restaurants/{restaurant_id}/reservations/{reservation_id}/notes":
    get:
      summary: Retrieve a list of reservation notes
      tags:
      - Note
      security:
      - bearerAuth: []
      parameters:
      - name: restaurant_id
        in: path
        required: true
        schema:
          type: integer
      - name: reservation_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: With a valid API token
          content:
            application/json:
              schema:
                type: object
                properties:
                  notes:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Note"
        '403':
          description: With an unauthorized API token
        '401':
          description: With an invalid API token
        '404':
          description: With a non-existant Reservation ID
    post:
      summary: Create a new reservation note
      tags:
      - Note
      security:
      - bearerAuth: []
      parameters:
      - name: restaurant_id
        in: path
        required: true
        schema:
          type: integer
      - name: reservation_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '201':
          description: With a valid API token
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Note"
        '422':
          description: With invalid data
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                    example:
                    - Author must exist
                  note:
                    type: object
        '403':
          description: With an unauthorized API token
        '401':
          description: With an invalid API token
        '404':
          description: With a non-existant Reservation ID
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - content
              - author_id
              properties:
                content:
                  type: string
                  nullable: false
                  example: Lorem ipsum dolor sit amet.
                  description: The HTML contents of the note.
                author_id:
                  type: integer
                  nullable: false
                  example: 12345
                  description: The unique ID of an account that has access to the
                    restaurant.
  "/api/v1/restaurants/{restaurant_id}/offers":
    get:
      summary: Retrieve a paginated list of a restaurant's offers
      tags:
      - Offer
      security:
      - bearerAuth: []
      parameters:
      - name: restaurant_id
        in: path
        required: true
        schema:
          type: integer
      - name: page
        in: query
        example: 1
        required: false
        description: Current page number
        schema:
          type: integer
      - name: per_page
        in: query
        example: 20
        required: false
        description: Number of results per page (max 100)
        schema:
          type: integer
      responses:
        '200':
          description: With a valid API token
          content:
            application/json:
              schema:
                type: object
                properties:
                  offers:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Offer"
                  meta:
                    "$ref": "#/components/schemas/Pagination"
        '403':
          description: With an unauthorized API token
        '401':
          description: With an invalid API token
        '404':
          description: With a non-existant Restaurant ID
  "/api/v1/restaurants/{restaurant_id}/offers/{offer_id}":
    get:
      summary: Retrieve the information about a specific restaurant's offer
      tags:
      - Offer
      security:
      - bearerAuth: []
      parameters:
      - name: restaurant_id
        in: path
        required: true
        schema:
          type: integer
      - name: offer_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: With a valid API token
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Offer"
        '403':
          description: With an unauthorized API token
        '401':
          description: With an invalid API token
        '404':
          description: With a non-existant Offer ID
  "/api/v1/restaurants/{restaurant_id}/reservations":
    get:
      summary: Retrieve a paginated list of reservations
      tags:
      - Reservation
      security:
      - bearerAuth: []
      parameters:
      - name: restaurant_id
        in: path
        required: true
        schema:
          type: integer
      - name: page
        in: query
        example: 1
        required: false
        description: Current page number
        schema:
          type: integer
      - name: per_page
        in: query
        example: 20
        required: false
        description: Number of results per page (max 100)
        schema:
          type: integer
      - name: query
        in: query
        required: false
        description: |
          Search reservations by a combination of query and operators to filter.

          List of fields you can filter by:

          - **type:** The type of reservation (`Reservation` or `WalkIn`).
          - **offer_id:** The (optional) ID of the offer this reservation was booked for.
          - **date:** The date the reservation was booked for.
          - **time:** Time (HH:MM) of reservation.
          - **starts_at:** Datetime (ISO 8601) of the start of the reservation.
          - **ends_at:** Datetime (ISO 8601) of the end of the reservation.
          - **state:** The current state of the reservation.
          - **party_size:** Number of guests in the party.
          - **guest_name:** Primary guest's name.
          - **guest_email:** Primary guest's email.
          - **guest_telephone:** Primary guest's telephone.
          - **comments:** Primary guest's comments for the reservation.
          - **duration_in_minutes:** The duration of the reservation in minutes.

          List of comparison functions you can use with these fields:

          - `<=` **less than or equal to**
          - `<` **less than**
          - `>=` **greater than or equal to**
          - `>` **greater than**
          - `!=` **not_equal_to**
          - `=`, `==` **equal_to**
          - `!:`, `!~` **does not contain**
          - `:`, `~` **contains**

          For example, _"John date>=2026-05-25 state=confirmed party_size=2"_ to find all confirmed reservations matching the keyword "John" that are for any date equal to or in the future of 2026-05-25 and have exactly 2 guests in the party.
        examples:
          combination_of_query_and_filters:
            summary: Combination of query and filters
            value: John date>=2026-05-25 state=confirmed party_size=2
          search_in_results:
            summary: Fuzzy search (case-insensitive)
            value: Barry
          filter_by_date_comparison:
            summary: Filter by date comparison
            value: date>=2025-01-10
          filter_by_exact_status:
            summary: Filter by exact state
            value: state=confirmed
          filter_by_guest_name_wildcard:
            summary: Filter by name containing
            value: guest_name~John
        schema:
          type: string
      responses:
        '200':
          description: With a valid API token
          content:
            application/json:
              schema:
                type: object
                properties:
                  reservations:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Reservation"
                  meta:
                    "$ref": "#/components/schemas/Pagination"
        '403':
          description: With an unauthorized API token
        '401':
          description: With an invalid API token
        '404':
          description: With a non-existant Restaurant ID
    post:
      summary: Create a new reservation
      tags:
      - Reservation
      security:
      - bearerAuth: []
      parameters:
      - name: role
        in: query
        required: false
        description: |-
          The role of the creator of the reservation. This determines what kind of validation and availability checks are performed.

          * `restaurant` — (default) Create the reservation as a restaurateur, skipping most validations and availability checks.
          * `guest` — Create the reservation as a guest, including validation and availability checks.
        schema:
          type: string
          enum:
          - restaurant
          - guest
          default: restaurant
      - name: restaurant_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '201':
          description: With table_ids and table_lock
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Reservation"
        '422':
          description: With invalid data
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                    example:
                    - Customer email must be a valid email address
                  reservation:
                    type: object
        '403':
          description: With an unauthorized API token
        '401':
          description: With an invalid API token
        '404':
          description: With a non-existant Restaurant ID
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  nullable: true
                  enum:
                  - Reservation
                  - WalkIn
                  description: Set to "WalkIn" for walk-in reservations. For walk-ins,
                    date/time defaults to current if not provided.
                offer_id:
                  type: integer
                  nullable: true
                  example:
                  description: The (optional) ID of the offer we want to book this
                    reservation for.
                date:
                  type: string
                  format: date
                  nullable: true
                  description: Required for reservations without a type or "Reservation"
                    type. Can be omitted for "WalkIn" reservations.
                time:
                  type: string
                  nullable: true
                  example: '18:00'
                  description: Time (HH:MM) of reservation. Required for reservations
                    without a type or "Reservation" type.
                party_size:
                  type: integer
                  nullable: false
                  example: 2
                  description: Number of guests in the party.
                guest_name:
                  type: string
                  nullable: true
                  example: John Doe
                  description: Primary guest's name
                guest_email:
                  type: string
                  nullable: true
                  example: john.doe@example.com
                  description: Primary guest's email address
                guest_telephone:
                  type: string
                  nullable: true
                  example: "+31612345678"
                  description: Primary guest's telephone
                comments:
                  type: string
                  nullable: true
                  example: One of our guests is vegan.
                  description: Primary guest's comments for the reservation.
                duration_in_minutes:
                  type: integer
                  nullable: true
                  example: 90
                  description: The duration of the reservation in minutes
                table_ids:
                  type: array
                  nullable: true
                  items:
                    type: integer
                  example:
                  - 101
                  - 102
                  description: An array of table IDs to assign to this reservation.
                    Ignored when `role=guest`.
                table_lock:
                  type: boolean
                  nullable: true
                  example: false
                  description: Set to `true` to pin the assigned tables and prevent
                    auto-assignment. Ignored when `role=guest`.
              required:
              - party_size
  "/api/v1/restaurants/{restaurant_id}/reservations/{reservation_id}":
    get:
      summary: Find a reservation by ID
      tags:
      - Reservation
      security:
      - bearerAuth: []
      parameters:
      - name: restaurant_id
        in: path
        required: true
        schema:
          type: integer
      - name: reservation_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: With a valid API token
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Reservation"
        '403':
          description: With an unauthorized API token
        '401':
          description: With an invalid API token
        '404':
          description: With a non-existant Reservation ID
    put:
      summary: Update a reservation's details
      tags:
      - Reservation
      security:
      - bearerAuth: []
      parameters:
      - name: restaurant_id
        in: path
        required: true
        schema:
          type: integer
      - name: reservation_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: With a valid API token
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Reservation"
        '422':
          description: With invalid data
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                    example:
                    - Customer email must be a valid email address
                  reservation:
                    type: object
        '403':
          description: With an unauthorized API token
        '401':
          description: With an invalid API token
        '404':
          description: With a non-existant Reservation ID
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                date:
                  type: string
                  format: date
                  nullable: true
                  description: Required for reservations without a type or "Reservation"
                    type. Can be omitted for "WalkIn" reservations.
                time:
                  type: string
                  nullable: true
                  example: '18:00'
                  description: Time (HH:MM) of reservation. Required for reservations
                    without a type or "Reservation" type.
                party_size:
                  type: integer
                  nullable: false
                  example: 2
                  description: Number of guests in the party.
                guest_name:
                  type: string
                  nullable: true
                  example: John Doe
                  description: Primary guest's name
                guest_email:
                  type: string
                  nullable: true
                  example: john.doe@example.com
                  description: Primary guest's email address
                guest_telephone:
                  type: string
                  nullable: true
                  example: "+31612345678"
                  description: Primary guest's telephone
                comments:
                  type: string
                  nullable: true
                  example: One of our guests is vegan.
                  description: Primary guest's comments for the reservation.
                duration_in_minutes:
                  type: integer
                  nullable: true
                  example: 90
                  description: The duration of the reservation in minutes
                table_ids:
                  type: array
                  nullable: true
                  items:
                    type: integer
                  example:
                  - 101
                  - 102
                  description: IDs of tables to assign to this reservation. Any ID
                    that doesn't belong to this restaurant is silently dropped.
                table_lock:
                  type: boolean
                  nullable: true
                  example: false
                  description: Set to true to pin the assigned tables and prevent
                    auto-reassignment.
  "/api/v1/restaurants/{restaurant_id}/reservations/{reservation_id}/cancel":
    post:
      summary: Cancel a reservation
      tags:
      - Reservation
      security:
      - bearerAuth: []
      parameters:
      - name: role
        in: query
        required: false
        description: |-
          The role when cancelling the reservation. This determines what kind of communication is sent to the restaurant or guest.

          * `restaurant` — (default) Cancel the reservation as a restaurateur, sending the default communication to the guest.
          * `guest` — Cancel the reservation as a guest, sending the default communication to the restaurant.
        schema:
          type: string
          enum:
          - restaurant
          - guest
          default: restaurant
      - name: restaurant_id
        in: path
        required: true
        schema:
          type: integer
      - name: reservation_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: With a valid API token
          content:
            application/json:
              examples:
                cancelled_reservation_example:
                  value:
                    id: 98765
                    offer_id: 45678
                    restaurant_id: 12345
                    created_at: '2026-06-01T12:00:00+07:00'
                    updated_at: '2026-06-01T12:00:00+07:00'
                    date: '2026-06-01'
                    time: '18:00'
                    duration_in_minutes: 90
                    party_size: 2
                    state: cancelled
                    guest_name: John Doe
                    guest_email: john.doe@example.com
                    guest_telephone: "+31612345678"
                    invited_guests:
                    - primary: true
                      guest_id: 98765
                      name: John Doe
                      email: john.doe@example.com
                      access_token: d3d49d51bc9bdedbf2ae3fc38899c9f22a8958d68a4d5819a59756660d0aab4aa51b95df29197af6
                    links:
                    - url: https://gotable.app/api/v1/restaurants/12345/reservations/98765
                      rel: self
                      method: GET
                    - url: https://gotable.app/reservations/98765?access_token={access_token}
                      rel: guest-reservation-view
                      method: GET
                    - url: https://gotable.app/api/v1/restaurants/12345
                      rel: restaurant
                      method: GET
                    - url: https://gotable.app/api/v1/restaurants/12345/offers/45678
                      rel: offer
                      method: GET
                  summary: Cancelled Reservation
                  description: 'When a finalized reservation (<code>confirmed</code>,
                    <code>reconfirmed</code>, <code>pushed</code> stated) is cancelled,
                    it will transition to the <code>cancelled</code> state.

                    '
                rejected_reservation_example:
                  value:
                    id: 98765
                    offer_id: 45678
                    restaurant_id: 12345
                    created_at: '2026-06-01T12:00:00+07:00'
                    updated_at: '2026-06-01T12:00:00+07:00'
                    date: '2026-06-01'
                    time: '18:00'
                    duration_in_minutes: 90
                    party_size: 2
                    state: rejected
                    guest_name: John Doe
                    guest_email: john.doe@example.com
                    guest_telephone: "+31612345678"
                    invited_guests:
                    - primary: true
                      guest_id: 98765
                      name: John Doe
                      email: john.doe@example.com
                      access_token: d3d49d51bc9bdedbf2ae3fc38899c9f22a8958d68a4d5819a59756660d0aab4aa51b95df29197af6
                    links:
                    - url: https://gotable.app/api/v1/restaurants/12345/reservations/98765
                      rel: self
                      method: GET
                    - url: https://gotable.app/reservations/98765?access_token={access_token}
                      rel: guest-reservation-view
                      method: GET
                    - url: https://gotable.app/api/v1/restaurants/12345
                      rel: restaurant
                      method: GET
                    - url: https://gotable.app/api/v1/restaurants/12345/offers/45678
                      rel: offer
                      method: GET
                  summary: Rejected Reservation
                  description: 'When a <strong><code>pending</code></strong> reservation
                    is cancelled, it will transition to the <code>rejected</code>
                    state. Different messaging is used for rejections.

                    '
              schema:
                "$ref": "#/components/schemas/Reservation"
        '422':
          description: For an uncancellable reservation
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                    example:
                    - Reservation is no longer cancellable.
                  reservation:
                    "$ref": "#/components/schemas/Reservation"
        '403':
          description: With an unauthorized API token
        '401':
          description: With an invalid API token
        '404':
          description: With a non-existant Reservation ID
  "/api/v1/restaurants":
    get:
      summary: Retrieve a list of accessible restaurants
      tags:
      - Meta
      - Restaurant
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        example: 1
        required: false
        description: Current page number
        schema:
          type: integer
      - name: per_page
        in: query
        example: 20
        required: false
        description: Number of results per page (max 100)
        schema:
          type: integer
      responses:
        '200':
          description: With a valid API token
          content:
            application/json:
              schema:
                type: object
                properties:
                  restaurants:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Restaurant"
                  meta:
                    "$ref": "#/components/schemas/Pagination"
        '401':
          description: With an invalid API token
  "/api/v1/restaurants/{restaurant_id}":
    get:
      summary: Find a restaurant by ID
      tags:
      - Restaurant
      security:
      - bearerAuth: []
      parameters:
      - name: restaurant_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: With a valid API token
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Restaurant"
        '403':
          description: With an unauthorized API token
        '401':
          description: With an invalid API token
        '404':
          description: With a non-existant Restaurant ID
  "/api/v1/restaurants/{restaurant_id}/tables":
    get:
      summary: Retrieve a paginated list of a restaurant's tables
      tags:
      - Table
      security:
      - bearerAuth: []
      parameters:
      - name: restaurant_id
        in: path
        required: true
        schema:
          type: integer
      - name: page
        in: query
        example: 1
        required: false
        description: Current page number
        schema:
          type: integer
      - name: per_page
        in: query
        example: 20
        required: false
        description: Number of results per page (max 100)
        schema:
          type: integer
      responses:
        '200':
          description: With a valid API token
          content:
            application/json:
              schema:
                type: object
                properties:
                  tables:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Table"
                  meta:
                    "$ref": "#/components/schemas/Pagination"
        '403':
          description: With an unauthorized API token
        '401':
          description: With an invalid API token
        '404':
          description: With a non-existant Restaurant ID
  "/api/v1/restaurants/{restaurant_id}/tables/{table_id}":
    get:
      summary: Find a table by ID
      tags:
      - Table
      security:
      - bearerAuth: []
      parameters:
      - name: restaurant_id
        in: path
        required: true
        schema:
          type: integer
      - name: table_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: With a valid API token
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Table"
        '403':
          description: With an unauthorized API token
        '401':
          description: With an invalid API token
        '404':
          description: With a non-existant Table ID
  "/api/v1/restaurants/{restaurant_id}/webhooks":
    get:
      summary: List all webhooks for the restaurant
      tags:
      - Webhook
      security:
      - bearerAuth: []
      parameters:
      - name: restaurant_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: With a valid API token
          content:
            application/json:
              schema:
                type: object
                properties:
                  webhooks:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Webhook"
        '403':
          description: With an unauthorized API token
    post:
      summary: Create a new webhook
      tags:
      - Webhook
      security:
      - bearerAuth: []
      parameters:
      - name: restaurant_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '201':
          description: With a valid API token
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Webhook"
        '422':
          description: With invalid params
        '403':
          description: With an unauthorized API token
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  nullable: false
                  example: Our CRM
                url:
                  type: string
                  nullable: false
                  example: https://webhook.site/
                events:
                  type: array
                  items:
                    type: string
                    enum:
                    - reservation.created
                    - reservation.updated
                    - reservation.confirmed
                    - reservation.cancelled
                    - reservation.rejected
                    - reservation.checked_in
                    - reservation.checked_out
                    - reservation.no_show
                    - restaurant.updated
                    - offer.created
                    - offer.updated
                    - offer.deleted
                    - table.created
                    - table.updated
                    - table.deleted
                    - guest.created
                    - guest.updated
                    - guest.deleted
                    - combination.created
                    - combination.updated
                    - combination.deleted
                    - note.created
                    - note.updated
                    - note.deleted
                  example:
                  - reservation.created
                  - reservation.confirmed
                enabled:
                  type: boolean
                  nullable: true
                  default: true
              required:
              - name
              - url
              - events
  "/api/v1/restaurants/{restaurant_id}/webhooks/{id}":
    get:
      summary: Find a webhook by ID
      tags:
      - Webhook
      security:
      - bearerAuth: []
      parameters:
      - name: restaurant_id
        in: path
        required: true
        schema:
          type: integer
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: With a valid API token
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Webhook"
    patch:
      summary: Update a webhook
      tags:
      - Webhook
      security:
      - bearerAuth: []
      parameters:
      - name: restaurant_id
        in: path
        required: true
        schema:
          type: integer
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: With a valid update
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Webhook"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                url:
                  type: string
                events:
                  type: array
                  items:
                    type: string
                enabled:
                  type: boolean
    delete:
      summary: Delete a webhook
      tags:
      - Webhook
      security:
      - bearerAuth: []
      parameters:
      - name: restaurant_id
        in: path
        required: true
        schema:
          type: integer
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '204':
          description: With a valid API token
components:
  schemas:
    Account:
      type: object
      properties:
        id:
          type: integer
          nullable: false
          example: 12345
          description: The unique ID of the account
        name:
          type: string
          nullable: false
          example: John Doe
          description: The name of the account
        email:
          type: string
          nullable: false
          example: john.doe@example.com
          description: The e-mail address of the account
    Availability:
      type: object
      properties:
        from:
          type: string
          format: date
          description: The first date that is covered by the `dates` array
        till:
          type: string
          format: date
          description: The last date that is covered by the `dates` array
        dates:
          type: array
          description: An array of dates with information about the availability on
            that date
          items:
            type: object
            properties:
              date:
                type: string
                format: date
                example: '2026-06-01'
                description: The date with availability information
              closed:
                type: boolean
                example: false
                description: Whether or not the restaurant can receive reservations
              timeslots:
                type: array
                description: An array of timeslots for which a reservation can be
                  made
                items:
                  type: object
                  properties:
                    time:
                      type: string
                      example: '18:00'
                    minimum:
                      type: integer
                      example: 0
                      description: The minimum number of guests in a party for a new
                        realtime reservation
                    maximum:
                      type: integer
                      example: 20
                      description: The maximum number of guests in a party for a new
                        realtime reservation
      example:
        from: '2026-06-01'
        till: '2026-06-02'
        dates:
        - date: '2026-06-01'
          closed: false
          timeslots:
          - time: '18:00'
            minimum: 0
            maximum: 20
          - time: '20:00'
            minimum: 0
            maximum: 20
        - date: '2026-06-02'
          closed: true
          timeslots: []
    Restaurant:
      type: object
      properties:
        id:
          type: integer
          nullable: false
          example: 12345
          description: The unique ID of the restaurant
        created_at:
          type: string
          nullable: false
          example: '2026-06-01T12:41:39+07:00'
          description: The datetime the restaurant was created
        updated_at:
          type: string
          nullable: false
          example: '2026-06-01T12:41:39+07:00'
          description: The datetime the restaurant was last updated
        name:
          type: string
          nullable: false
          example: GoTable
          description: The name of the restaurant
        telephone:
          type: string
          nullable: true
          example: "+31 23 201 0239"
          description: The telephone number of the restaurant
        email:
          type: string
          nullable: true
          example: info@gotable.app
          description: The email address of the restaurant
        street:
          type: string
          nullable: true
          example: Groot Heiligland 26
          description: The street of the address of the restaurant
        zipcode:
          type: string
          nullable: true
          example: 2011ER
          description: The zipcode of the address of the restaurant
        city:
          type: string
          nullable: true
          example: Haarlem
          description: The city of the address of the restaurant
        time_zone:
          type: string
          nullable: true
          example: Amsterdam
          description: The timezone of the restaurant
        country_code:
          type: string
          nullable: true
          example: NL
          description: The two-letter country code of the restaurant
        currency:
          type: string
          nullable: false
          example: EUR
          description: The ISO-4217 currency used for deposits
        links:
          type: array
          description: An array of useful links for this restaurant
          items:
            "$ref": "#/components/schemas/Link"
          example:
          - url: https://gotable.app/api/v1/restaurants/12345
            rel: self
            method: GET
          - url: https://gotable.app/api/v1/restaurants/12345/reservations
            rel: reservations
            method: GET
          - url: https://gotable.app/api/v1/restaurants/12345/guests
            rel: guests
            method: GET
          - url: https://gotable.app/api/v1/restaurants/12345/offers
            rel: offers
            method: GET
          - url: https://gotable.app/api/v1/restaurants/12345/tables
            rel: tables
            method: GET
          - url: https://gotable.app/api/v1/restaurants/12345/combinations
            rel: combinations
            method: GET
    Reservation:
      type: object
      properties:
        id:
          type: integer
          nullable: false
          example: 98765
          description: The unique ID of the reservation
        offer_id:
          type: integer
          nullable: true
          example: 45678
          description: The unique ID of the offer this reservation is booked under
        restaurant_id:
          type: integer
          nullable: false
          example: 12345
          description: The unique ID of the restaurant
        created_at:
          type: string
          nullable: false
          format: datetime
          example: '2026-06-01T12:41:39+07:00'
          description: The datetime the reservation was created
        updated_at:
          type: string
          nullable: false
          format: datetime
          example: '2026-06-01T12:41:39+07:00'
          description: The datetime the reservation was last updated
        date:
          type: string
          nullable: false
          format: date
          example: '2026-06-01'
          description: Reservation date (YYYY-MM-DD)
        time:
          type: string
          nullable: false
          example: '18:00'
          description: Reservation time (HH:MM)
        duration_in_minutes:
          type: integer
          nullable: false
          example: 90
          description: The duration of the reservation in minutes
        starts_at:
          type: string
          nullable: false
          format: datetime
          example: '2026-06-01T18:00:00+07:00'
          description: The datetime of the start of the reservation in ISO 8601 format
        ends_at:
          type: string
          nullable: false
          format: datetime
          example: '2026-06-01T19:30:00+07:00'
          description: The datetime of the end of the reservation in ISO 8601 format
        party_size:
          type: integer
          nullable: false
          example: 2
          description: Number of guests in the party
        state:
          type: string
          nullable: false
          example: confirmed
          enum:
          - pending
          - rejecting
          - rejected
          - confirmed
          - checked_in
          - checked_out
          - cancelling
          - cancelled
          - expired
          - pushed
          - reconfirmed
          - skipped
          description: Current status of the reservation
        guest_name:
          type: string
          nullable: true
          example: John Doe
          description: Primary guest's name
        guest_email:
          type: string
          nullable: true
          example: john.doe@example.com
          description: Primary guest's email address
        guest_telephone:
          type: string
          nullable: true
          example: "+31612345678"
          description: Primary guest's telephone
        comments:
          type: string
          nullable: true
          example: One of our guests is vegan.
          description: Primary guest's comments for the reservation.
        tags:
          type: array
          description: An array of tags for the reservation.
          items:
            type: string
          example:
          - vip
          - soja
          - halal
        invited_guests:
          type: array
          description: An array of invited guests belonging to this reservation
          items:
            "$ref": "#/components/schemas/InvitedGuest"
        tables:
          type: array
          description: An array of tables assigned to this reservation
          items:
            "$ref": "#/components/schemas/TablePreview"
        table_ids:
          type: array
          description: An array of table IDs of the tables assigned to this reservation.
          items:
            type: integer
          example:
          - 101
          - 102
        table_lock:
          type: boolean
          nullable: false
          example: false
          description: A boolean that determines if tables for this reservation will
            be pinned. When set to true, tables will not be assigned or reassigned
            by the auto-allocation system.
        payment:
          "$ref": "#/components/schemas/Payment"
          nullable: true
        notes:
          type: array
          description: An array of notes attached to this reservation
          items:
            "$ref": "#/components/schemas/NotePreview"
        links:
          type: array
          description: An array of links useful for this reservation
          items:
            "$ref": "#/components/schemas/Link"
          example:
          - url: https://gotable.app/api/v1/restaurants/12345/reservations/98765
            rel: self
            method: GET
          - url: https://gotable.app/reservations/98765?access_token={access_token}
            rel: guest-reservation-view
            method: GET
          - url: https://gotable.app/api/v1/restaurants/12345/reservations/98765/cancel
            rel: cancel
            method: PUT
          - url: https://gotable.app/api/v1/restaurants/12345
            rel: restaurant
            method: GET
          - url: https://gotable.app/api/v1/restaurants/12345/offers/45678
            rel: offer
            method: GET
    Offer:
      type: object
      properties:
        id:
          type: integer
          nullable: false
          example: 45678
          description: The unique ID of the offer
        restaurant_id:
          type: integer
          nullable: false
          example: 12345
          description: The unique ID of the restaurant
        created_at:
          type: string
          nullable: false
          format: datetime
          example: '2026-06-01T12:41:39+07:00'
          description: The datetime the offer was created
        updated_at:
          type: string
          nullable: false
          format: datetime
          example: '2026-06-01T12:41:39+07:00'
          description: The datetime the offer was last updated
        deposit_per_guest:
          type: integer
          nullable: true
          example: 1250
          description: The deposit amount, in cents, required per guest when making
            a reservation
        visible:
          type: boolean
          nullable: false
          example: true
          description: Wether or not the offer is currently visible
        visible_from:
          type: string
          nullable: false
          format: date
          description: The date that this offer becomes visible
        available_from:
          type: string
          nullable: true
          format: date
          description: The first date that you can book this offer on
        available_till:
          type: string
          nullable: true
          format: date
          description: The last date that you can book this offer on
        images:
          type: array
          description: An array of images that can be displayed next to the offer
          items:
            type: object
            properties:
              name:
                type: string
                description: The name and/or variant of an image
              url:
                type: string
                format: uri
                description: An URL that can be used to download the image
        translations:
          type: array
          description: An array of translations containing the description of the
            offer
          items:
            type: object
            properties:
              locale:
                type: string
                description: The language code of the translated texts
              label:
                type: string
                description: The label that can be used to refer to the offer
              description_short:
                type: string
                description: A small preview that describes the offer before selection
              description_long:
                type: string
                description: A description that goes into more detail when an offer
                  is selected
        tags:
          type: array
          description: An array of tags of the offer that are automatically given
            to reservations made for it
          items:
            type: string
          example:
          - Voetballers
        links:
          type: array
          description: An array of links useful for this reservation
          items:
            "$ref": "#/components/schemas/Link"
          example:
          - url: https://gotable.app/api/v1/restaurants/12345/offers/45678
            rel: self
            method: GET
          - url: https://gotable.app/api/v1/restaurants/12345
            rel: restaurant
            method: GET
    InvitedGuest:
      type: object
      properties:
        primary:
          type: boolean
          nullable: false
          example: true
          description: Whether or not this is the owner of the reservation
        guest_id:
          type: integer
          nullable: true
          example: 98765
          description: The unique ID of the guest if a guest profile exists
        name:
          type: string
          nullable: true
          example: John Doe
          description: Invited guest's name
        email:
          type: string
          nullable: true
          example: john.doe@example.com
          description: Invited guest's email address
        access_token:
          type: string
          nullable: true
          example: d3d49d51bc9bdedbf2ae3fc38899c9f22a8958d68a4d5819a59756660d0aab4aa51b95df29197af6
          description: Access token used by invited guest to authorize access to the
            reservation
        links:
          type: array
          description: An array of links useful for this reservation
          items:
            "$ref": "#/components/schemas/Link"
          example:
          - url: https://gotable.app/api/v1/restaurants/12345/guests/98765
            rel: guest
            method: GET
          - url: https://gotable.app/reservations/98765?access_token=d3d49d51bc9bdedbf2ae3fc38899c9f22a8958d68a4d5819a59756660d0aab4aa51b95df29197af6
            rel: guest-reservation-view
            method: GET
    Guest:
      type: object
      properties:
        id:
          type: integer
          nullable: false
          example: 98765
          description: The unique ID of the guest
        restaurant_id:
          type: integer
          nullable: false
          example: 12345
          description: The unique ID of the restaurant
        name:
          type: string
          nullable: true
          example: John Doe
          description: Guest's name
        email:
          type: string
          nullable: true
          example: john.doe@example.com
          description: Guest's email address
        subscribed:
          type: boolean
          nullable: false
          example: true
          description: If the guest has subscribed to the newsletter
        telephone:
          type: string
          nullable: true
          example: "+31612345678"
          description: Guest's telephone number
        visits:
          type: integer
          nullable: false
          example: 1
          description: Guest's number of visits
        reservations:
          type: integer
          nullable: false
          example: 1
          description: Guest's number of reservations
        last_visit:
          type: string
          nullable: true
          format: date
          description: The date of the guest's last visit
        diets:
          type: array
          description: Guest's diets
          items:
            type: string
          example:
          - halal
        allergies:
          type: array
          description: Guest's allergies
          items:
            type: string
          example:
          - soja
        tags:
          type: array
          description: Guest's generic tags
          items:
            type: string
          example:
          - vip
        links:
          type: array
          description: An array of links useful for this reservation
          items:
            "$ref": "#/components/schemas/Link"
          example:
          - url: https://gotable.app/api/v1/restaurants/12345/guests/98765
            rel: self
            method: GET
          - url: https://gotable.app/api/v1/restaurants/12345
            rel: restaurant
            method: GET
    Link:
      type: object
      properties:
        href:
          type: string
          nullable: false
          example: https://gotable.app/api/v1/
          description: The URL to the related resource.
        method:
          type: string
          nullable: false
          example: GET
          enum:
          - GET
          - POST
          - PUT
          - DELETE
          description: The HTTP method that should be used to follow the link.
        rel:
          type: string
          nullable: false
          example: next
          description: The relationship of this link to the current resource.
    NotePreview:
      type: object
      properties:
        id:
          type: integer
          nullable: false
          example: 12345
          description: The unique ID of the note
        author_id:
          type: integer
          nullable: false
          example: 12345
          description: The unique Account ID of the author of the note
        author_name:
          type: string
          nullable: false
          example: John Doe
          description: The name of the author of the note
        content:
          type: string
          nullable: false
          example: John Doe
          description: The HTML content of the note
    Note:
      type: object
      properties:
        id:
          type: integer
          nullable: false
          example: 12345
          description: The unique ID of the note
        author_id:
          type: integer
          nullable: false
          example: 12345
          description: The unique Account ID of the author of the note
        author_name:
          type: string
          nullable: false
          example: John Doe
          description: The name of the author of the note
        content:
          type: string
          nullable: false
          example: John Doe
          description: The HTML content of the note
        noteable:
          type: object
          nullable: true
          description: The record this note is attached to.
          properties:
            type:
              type: string
              enum:
              - reservation
              - restaurant
              example: reservation
              description: The lowercased class name of the noteable.
            id:
              type: integer
              example: 98765
              description: The id of the noteable record.
        context:
          type: string
          nullable: true
          example: '2026-05-17'
          description: Optional context the note is scoped to. Currently used to attach
            restaurant notes to a specific date (ISO 8601).
    Pagination:
      type: object
      properties:
        current_page:
          type: integer
          example: 1
        per_page:
          type: integer
          example: 20
        total_pages:
          type: integer
          example: 1
        total_count:
          type: integer
          example: 1
        links:
          type: array
          description: An array of pagination links
          items:
            "$ref": "#/components/schemas/Link"
    Payment:
      type: object
      properties:
        amount:
          type: object
          properties:
            cents:
              type: integer
              nullable: false
              example: 4000
              description: Amount in cents
            currency_iso:
              type: string
              nullable: false
              example: EUR
              description: Currencycode for payment as defined in ISO 4217
        provider:
          type: string
          nullable: false
          example: Mollie
          description: Payment provider identifier
        state:
          type: string
          nullable: false
          example: paid
          description: Current status of the payment
    TablePreview:
      type: object
      properties:
        id:
          type: integer
          nullable: false
          example: 98765
          description: The unique ID of the table
        label:
          type: string
          nullable: false
          example: Tafel 1
          description: Indentifying human readable table name
        section:
          type: string
          nullable: true
          example: Terras
          description: Restaurant section, room or group this table belongs to
    Table:
      type: object
      properties:
        id:
          type: integer
          nullable: false
          example: 98765
          description: The unique ID of the table
        restaurant_id:
          type: integer
          nullable: false
          example: 12345
          description: The unique ID of the restaurant
        label:
          type: string
          nullable: false
          example: Tafel 1
          description: Indentifying human readable table name
        section:
          type: string
          nullable: true
          example: Terras
          description: Restaurant section, room or group this table belongs to
        minimum_party_size:
          type: integer
          nullable: true
          example: 1
          description: Smallest party size that can be seated at this table
        maximum_party_size:
          type: integer
          nullable: true
          example: 4
          description: Largest party size that can be seated at this table
        created_at:
          type: string
          nullable: false
          format: datetime
          example: '2026-06-01T12:41:39+07:00'
          description: The datetime the table was created
        updated_at:
          type: string
          nullable: false
          format: datetime
          example: '2026-06-01T12:41:39+07:00'
          description: The datetime the table was last updated
        links:
          type: array
          description: An array of useful links for this table
          items:
            "$ref": "#/components/schemas/Link"
          example:
          - url: https://gotable.app/api/v1/restaurants/12345/tables/98765
            rel: self
            method: GET
          - url: https://gotable.app/api/v1/restaurants/12345
            rel: restaurant
            method: GET
    Combination:
      type: object
      properties:
        id:
          type: integer
          nullable: false
          example: 56789
          description: The unique ID of the combination
        restaurant_id:
          type: integer
          nullable: false
          example: 12345
          description: The unique ID of the restaurant
        enabled:
          type: boolean
          nullable: false
          example: true
          description: Whether the combination is currently usable for seating
        minimum_party_size:
          type: integer
          nullable: true
          example: 2
          description: Smallest party size that can be seated at this combination
        maximum_party_size:
          type: integer
          nullable: true
          example: 8
          description: Largest party size that can be seated at this combination
        tables:
          type: array
          description: Tables included in this combination
          items:
            "$ref": "#/components/schemas/TablePreview"
        created_at:
          type: string
          nullable: false
          format: datetime
          example: '2026-06-01T12:41:39+07:00'
          description: The datetime the combination was created
        updated_at:
          type: string
          nullable: false
          format: datetime
          example: '2026-06-01T12:41:39+07:00'
          description: The datetime the combination was last updated
        links:
          type: array
          description: An array of useful links for this combination
          items:
            "$ref": "#/components/schemas/Link"
          example:
          - url: https://gotable.app/api/v1/restaurants/12345/combinations/56789
            rel: self
            method: GET
          - url: https://gotable.app/api/v1/restaurants/12345
            rel: restaurant
            method: GET
    Webhook:
      type: object
      properties:
        id:
          type: integer
          nullable: false
          example: 12345
          description: The unique ID of the webhook
        restaurant_id:
          type: integer
          nullable: false
          example: 12345
          description: The unique ID of the restaurant
        name:
          type: string
          nullable: false
          example: Our Webhook Endpoint
          description: Human-readable label for the webhook
        url:
          type: string
          nullable: false
          format: uri
          example: https://webhook.site/
          description: The HTTP(S) endpoint the webhook will POST to
        events:
          type: array
          description: Event types the webhook is subscribed to
          example:
          - reservation.created
          - reservation.confirmed
          items:
            type: string
            enum:
            - reservation.created
            - reservation.updated
            - reservation.confirmed
            - reservation.cancelled
            - reservation.rejected
            - reservation.checked_in
            - reservation.checked_out
            - reservation.no_show
            - restaurant.updated
            - offer.created
            - offer.updated
            - offer.deleted
            - table.created
            - table.updated
            - table.deleted
            - guest.created
            - guest.updated
            - guest.deleted
            - combination.created
            - combination.updated
            - combination.deleted
            - note.created
            - note.updated
            - note.deleted
        enabled:
          type: boolean
          nullable: false
          example: true
          description: Whether the webhook is currently active
        disabled_at:
          type: string
          nullable: true
          format: datetime
          example: '2026-06-01T04:41:39Z'
          description: When the webhook was auto-disabled due to consecutive failures,
            if applicable
        last_delivered_at:
          type: string
          nullable: true
          format: datetime
          example: '2026-06-01T06:41:39Z'
          description: The datetime of the last delivery attempt
        last_response_status:
          type: integer
          nullable: true
          example: 200
          description: HTTP status code of the most recent delivery attempt
        created_at:
          type: string
          nullable: false
          format: datetime
          example: '2026-06-01T12:41:39+07:00'
          description: The datetime the webhook was created
        updated_at:
          type: string
          nullable: false
          format: datetime
          example: '2026-06-01T12:41:39+07:00'
          description: The datetime the webhook was last updated
        secret:
          type: string
          nullable: true
          example: whsec_Y4cdvopAV9QB0J2VVZizE/ROAyqJ3BQ0Y2DP2RdbIKM=
          description: HMAC-SHA256 signing secret used to sign outbound deliveries
            per the [Standard Webhooks](https://www.standardwebhooks.com/) spec. Returned
            on every response. Store it server-side and use it to verify the `webhook-signature`
            header on incoming deliveries.
        links:
          type: array
          description: Hypermedia links for this webhook
          items:
            "$ref": "#/components/schemas/Link"
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Enter your API Token, e.g. "abcde12345"
servers:
- url: https://{defaultHost}
  variables:
    defaultHost:
      default: gotable.app
