# Table API

The API allows the APP and POS to send and receive information about tables. Currently the API supports creating, updating and retrieving tables.


Version: 1.0

## Servers

Production
```
https://api.tyro.com/connect
```

## Security

### JWT

Type: openIdConnect
OpenID Connect URL: https://auth.connect.tyro.com/.well-known/openid-configuration

## Download OpenAPI description

[Table API](https://docs.connect.tyro.com/_bundle/app/apis/tables/1.0/index.yaml)

## Other

### Create Table

 - [POST /tables](https://docs.connect.tyro.com/app/apis/tables/1.0/other/create-table-request.md): This endpoint is used to create a table within Tyro Connect.

The id that is returned as a part of the response should be used to identify the table for subsequent events or retrieving the details.

### List Tables

 - [GET /tables](https://docs.connect.tyro.com/app/apis/tables/1.0/other/list-tables.md): This endpoint returns all the tables of a given location. It is possible to apply filters to the tables being fetched.

## Filtering
The following locationId=tc-cool-3000&openSales=true will return all tables with open sales for location tc-cool-3000.

### Get Table

 - [GET /tables/{tableId}](https://docs.connect.tyro.com/app/apis/tables/1.0/other/get-table.md): This endpoint is for fetching the details of a table.

### Update Table

 - [PATCH /tables/{tableId}](https://docs.connect.tyro.com/app/apis/tables/1.0/other/patch-table.md): This endpoint is for updating a table. Please note table update will not be allowed if the table has open sales.

### Delete Table

 - [DELETE /tables/{tableId}](https://docs.connect.tyro.com/app/apis/tables/1.0/other/delete-table.md): This endpoint is for deleting a table. Please note table delete will not be allowed if the table has open sales.

