API

Table

A table in a store, for reservations.

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /v1/stores/{storeId}/reservations/tables create Created
GET /v1/stores/{storeId}/reservations/tables list OK

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

tables, err := client.Table(nil).List(map[string]any{"store_id": "example", "date": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(tables)
created, err := client.Table(nil).Create(map[string]any{"store_id": "example", "capacity": 1, "name": "example", "shape": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)

Lua

Construct client as shown in the Lua setup, then call the operations:

local tables, err = client:Table():list({ store_id = "example", date = "example" })
local created, err = client:Table():create({ store_id = "example", capacity = 1, name = "example", shape = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$tables = $client->Table()->list(["store_id" => "example", "date" => "example"]);
$created = $client->Table()->create(["store_id" => "example", "capacity" => 1, "name" => "example", "shape" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

tables = client.Table().list({"store_id": "example", "date": "example"})
created = client.Table().create({ "store_id": "example", "capacity": 1, "name": "example", "shape": "example" })

Ruby

Construct client as shown in the Ruby setup, then call the operations:

tables = client.Table.list({ "store_id" => "example", "date" => "example" })
created = client.Table.create({ "store_id" => "example", "capacity" => 1, "name" => "example", "shape" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const tables = await client.Table().list({ store_id: "example", date: "example" })
const created = await client.Table().create({ store_id: "example", capacity: 1, name: "example", shape: "example" })

Fields

Field Type Required Description
capacity integer Yes Number of covers the table seats.
floor_id integer No Optional.
name string Yes Display name of the table.
shape string Yes Table shape.
table_id integer Yes Unique identifier of the table

create

POST /v1/stores/{storeId}/reservations/tables

Operation ID: POST/v1/stores/{storeId}/reservations/tables.

Authentication: oauth2 (AccessToken).

Parameters

Parameter In Type Required Description
storeId path string Yes Store Identifier

Request body

application/json

Property Type Required Description
capacity integer Yes Number of covers the table seats. Required.
floor_id integer No Optional. Floor the table belongs to (id from GET /reservations/floors). Defaults to the store's most recent floor.
name string Yes Display name of the table. Required.
shape enum: SQUARE, RECTANGLE, CIRCLE, ROUND, OVAL Yes Table shape. Required.

Responses

201: Created

application/json

Property Type Required Description
data object No Table Entity
data.capacity integer No Number of covers the table seats (null if not set)
data.name string Yes Display name of the table
data.table_id integer Yes Unique identifier of the table
400: Bad Request

application/json

Property Type Required Description
error string Yes 400 Bad Request is the status code that indicates the server cannot or will not process the request due to something that is perceived to be a client error
401: Unauthorized

application/json

Property Type Required Description
error string Yes 401 Unauthorized is the status code to return when the client provides no credentials or invalid credentials.
403: Forbidden

application/json

Property Type Required Description
error string Yes 403 Forbidden is the status code to return when a client has valid credentials but not enough privileges to perform an action on a resource.
429: Too Many Requests

application/json

Property Type Required Description
error string Yes 429 Too Many Requests is the status code that indicates the client application has surpassed its rate limit, or number of requests they can send in a given period of time

list

GET /v1/stores/{storeId}/reservations/tables

Operation ID: GET/v1/stores/{storeId}/reservations/tables.

Authentication: oauth2 (AccessToken).

Parameters

Parameter In Type Required Description
storeId path string Yes Store Identifier
date query string Yes Required. Calendar day (YYYY-MM-DD) to evaluate table availability.

Responses

200: OK

application/json

Property Type Required Description
data array of object No
data[].capacity integer No Number of covers the table seats (null if not set)
data[].name string Yes Display name of the table
data[].table_id integer Yes Unique identifier of the table
400: Bad Request

application/json

Property Type Required Description
error string Yes 400 Bad Request is the status code that indicates the server cannot or will not process the request due to something that is perceived to be a client error
401: Unauthorized

application/json

Property Type Required Description
error string Yes 401 Unauthorized is the status code to return when the client provides no credentials or invalid credentials.
403: Forbidden

application/json

Property Type Required Description
error string Yes 403 Forbidden is the status code to return when a client has valid credentials but not enough privileges to perform an action on a resource.
429: Too Many Requests

application/json

Property Type Required Description
error string Yes 429 Too Many Requests is the status code that indicates the client application has surpassed its rate limit, or number of requests they can send in a given period of time