Create a new table
POSThttps://api.staging.powerapi.com/api/v2/tables
Create a new table and link it to a floor plan
Request
- application/json
Body
required
Human-friendly identifier of the table
Number of seats the table has
X position of the table in the floor plan
Y position of the table in the floor plan
Rotation of the table in the floor plan
Possible values: [round
, square
, rectangular
]
Shape of the table in the floor plan
ID of the floor plan to associate
Responses
- 201
- 400
- 401
- 403
- 404
- 422
- 500
- application/json
- Schema
- Example (from schema)
Schema
Unique ID of the table
ID of the floor plan that the table belongs to
Human-friendly identifier of the table
Number of seats the table has
X position of the table in the floor plan
Y position of the table in the floor plan
Rotation of the table in the floor plan
Possible values: [round
, square
, rectangular
]
Shape of the table in the floor plan
{
"id": "120c50ab-24ae-48f9-8860-ec0e9adea9ec",
"floor_plan_id": "762031eb-9c0f-4b22-919e-514b50f9613e",
"number": "Table 1",
"number_of_seats": 4,
"position_x": 100,
"position_y": 100,
"rotation": 0,
"shape": "round"
}
- application/json
- Schema
- Example (from schema)
Schema
HTTP status code
Error message
Error name
{
"statusCode": 404,
"message": "Cannot find item",
"error": "Not Found"
}
- application/json
- Schema
- Example (from schema)
Schema
HTTP status code
Error message
Error name
{
"statusCode": 404,
"message": "Cannot find item",
"error": "Not Found"
}
- application/json
- Schema
- Example (from schema)
Schema
HTTP status code
Error message
Error name
{
"statusCode": 404,
"message": "Cannot find item",
"error": "Not Found"
}
- application/json
- Schema
- Example (from schema)
Schema
HTTP status code
Error message
Error name
{
"statusCode": 404,
"message": "Cannot find item",
"error": "Not Found"
}
- application/json
- Schema
- Example (from schema)
Schema
HTTP status code
Error message
Possible values: [query
, body
, response
, param
]
Where in the request the error occurred
errors
object[]
required
{
"statusCode": 404,
"message": "Cannot find item",
"location": "query",
"errors": [
{
"path": "business.id",
"constraints": {
"object_required_property": "Required property"
}
}
]
}
- application/json
- Schema
- Example (from schema)
Schema
HTTP status code
Error message
Error name
{
"statusCode": 404,
"message": "Cannot find item",
"error": "Not Found"
}
- curl
- python
- go
- nodejs
- ruby
- java
- powershell
- CURL
curl -L 'https://api.staging.powerapi.com/api/v2/tables' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"number": "Table 1",
"number_of_seats": 4,
"position_x": 100,
"position_y": 100,
"rotation": 0,
"shape": "round",
"floor_plan_id": "762031eb-9c0f-4b22-919e-514b50f9613e"
}'