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

# GET /Bookings/tables

> Retrieve available tables for a given date and duration.

Retrieve available tables for a given date and duration.

<ParamField header="X-API-KEY" type="string" required>Your API key</ParamField>

<ParamField query="Date" type="string">Date to check availability. Formats: `yyyy-MM-dd` or `yyyy-MM-ddTHH:mm:ss.fffZ`</ParamField>
<ParamField query="Duration" type="integer">Availability duration in minutes. Default: `90`</ParamField>

<CodeGroup>
  ```shell curl theme={null}
  curl --location '[BASE_URL]/Bookings/tables?Date=2024-03-20&Duration=90' \
  --header 'X-API-KEY: your_api_key_here'
  ```
</CodeGroup>

Response is an array of section objects, each containing a list of tables.

**Section object**

| Field         | Type   | Description                      |
| ------------- | ------ | -------------------------------- |
| `sectionName` | string | Section name                     |
| `sectionId`   | string | Section ID                       |
| `layoutId`    | string | Layout ID                        |
| `layoutName`  | string | Layout name                      |
| `tables`      | array  | Available tables in this section |

**Table object**

| Field         | Type    | Description                                       |
| ------------- | ------- | ------------------------------------------------- |
| `_id`         | string  | Table ID — use when creating or updating bookings |
| `name`        | string  | Table name                                        |
| `capacity`    | integer | Maximum guests                                    |
| `minCapacity` | integer | Minimum guests                                    |
| `shared`      | boolean | Can be shared between bookings                    |
| `online`      | boolean | Available for online bookings                     |
| `walkinOnly`  | boolean | Walk-in only table                                |
| `sectionId`   | string  | Parent section ID                                 |
| `sectionName` | string  | Parent section name                               |

**Example 200 Response**

```json theme={null}
[
  {
    "sectionName": "Main",
    "sectionId": "sec-1",
    "layoutId": "lay-1",
    "layoutName": "Main Layout",
    "tables": [
      {
        "_id": "tbl-5",
        "name": "Table 5",
        "capacity": 6,
        "minCapacity": 2,
        "shared": false,
        "online": true,
        "walkinOnly": false,
        "sectionId": "sec-1",
        "sectionName": "Main"
      }
    ]
  }
]
```

| Status | Description                         |
| ------ | ----------------------------------- |
| `200`  | Tables returned                     |
| `400`  | API key not associated with a venue |
| `400`  | `No Venue Subscribed to your App.`  |
| `400`  | `Invalid Date passed.`              |
| `401`  | X-API-KEY missing or invalid        |
| `429`  | Rate limit exceeded                 |


## OpenAPI

````yaml GET /Bookings/tables
openapi: 3.0.4
info:
  title: NowBookIt IPOS Partner API
  description: >-
    REST API for integrating your POS or external system with NowBookIt's
    reservation, sales, and gift card platform.
  version: v1
  contact:
    email: platform.integrations@nowbookit.com
servers:
  - url: https://ipos.dev.nowbookit.com
    description: Development
  - url: https://ipos.nowbookit.com
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /Bookings/tables:
    get:
      tags:
        - Bookings
      summary: Get Bookable Tables
      operationId: getBookableTables
      parameters:
        - name: Date
          in: query
          description: >-
            The Date on which table should be available. Valid Date formats
            ['yyyy-MM-dd', 'yyyy-MM-ddTHH:MM:SS.fffZ']
          schema:
            type: string
        - name: Duration
          in: query
          description: >-
            The Duration required for table to be available for. Default 90
            minutes.
          schema:
            type: integer
            format: int32
        - name: X-API-KEY
          in: header
          description: API Key authentication header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Get List of Available Tables open.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SectionTable'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    SectionTable:
      type: object
      properties:
        sectionName:
          type: string
          nullable: true
        sectionId:
          type: string
          nullable: true
        layoutId:
          type: string
          nullable: true
        layoutName:
          type: string
          nullable: true
        tables:
          type: array
          items:
            $ref: '#/components/schemas/NbiTable'
          nullable: true
      additionalProperties: false
    NbiTable:
      type: object
      properties:
        _id:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        shared:
          type: boolean
        online:
          type: boolean
        walkinOnly:
          type: boolean
        capacity:
          type: integer
          format: int32
        minCapacity:
          type: integer
          format: int32
        sectionId:
          type: string
          nullable: true
        sectionName:
          type: string
          nullable: true
      additionalProperties: false
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````