iRetail PRO store node 1.0.0-m1: floor
8 операций
← Вся документация · Источник: контракты, openapi/store-v1.yaml на коммите 8000474.
Справочники на английском — на языке контрактов, из которых они созданы.
← iRetail PRO store node 1.0.0-m1
Операции
GET
/v1/floor
The floor's areas and tables with their live state (spec/RESTAURANT.md, The floor), with check.use or floor.manage; QR tokens only with floor.manage.
Without the restaurant license module, tables past the store's first three by id are marked locked (spec/LICENSE.md, The restaurant's three places).
operationId
getFloor · Право check.use
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
IRetail-App
|
header | string |
Which app sends the request, at which version: <app>/<version>, optionally a space and (<platform>), as cashier/1.2.0 (windows-x64) or manager/1.2.0 (web). The register (cashier), the back office and the console (manager) and the device gateway (gateway) send it on every request; a request without it is not one of the apps and is served as the current API, and a device token of an app's kind without it is an app of an unknown version; a header that does not parse counts as absent. The node may refuse an app 426 app_update_required by it, except on the operations marked x-app-update-exempt. Not a security boundary (spec/API.md, Transport; spec/RELEASES.md, Who is asking). |
Ответы
POST
/v1/areas
Add an area (a room) to the floor.
operationId
createArea · Право floor.manage
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
IRetail-App
|
header | string |
Which app sends the request, at which version: <app>/<version>, optionally a space and (<platform>), as cashier/1.2.0 (windows-x64) or manager/1.2.0 (web). The register (cashier), the back office and the console (manager) and the device gateway (gateway) send it on every request; a request without it is not one of the apps and is served as the current API, and a device token of an app's kind without it is an app of an unknown version; a header that does not parse counts as absent. The node may refuse an app 426 app_update_required by it, except on the operations marked x-app-update-exempt. Not a security boundary (spec/API.md, Transport; spec/RELEASES.md, Who is asking). |
Idempotency-Key
|
header | string |
spec/API.md, Idempotency. |
Тело запроса обязательный
application/jsonAreaWrite
Ответы
PATCH
/v1/areas/{id}
Rename or reorder an area.
operationId
updateArea · Право floor.manage
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
IRetail-App
|
header | string |
Which app sends the request, at which version: <app>/<version>, optionally a space and (<platform>), as cashier/1.2.0 (windows-x64) or manager/1.2.0 (web). The register (cashier), the back office and the console (manager) and the device gateway (gateway) send it on every request; a request without it is not one of the apps and is served as the current API, and a device token of an app's kind without it is an app of an unknown version; a header that does not parse counts as absent. The node may refuse an app 426 app_update_required by it, except on the operations marked x-app-update-exempt. Not a security boundary (spec/API.md, Transport; spec/RELEASES.md, Who is asking). |
id обязательный
|
path | string (uuid) |
Id. |
If-Match
|
header | string |
The version the change is based on. |
Тело запроса обязательный
application/jsonAreaPatch
Ответы
DELETE
/v1/areas/{id}
Delete an area with no tables (409 area_not_empty otherwise).
operationId
deleteArea · Право floor.manage
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
IRetail-App
|
header | string |
Which app sends the request, at which version: <app>/<version>, optionally a space and (<platform>), as cashier/1.2.0 (windows-x64) or manager/1.2.0 (web). The register (cashier), the back office and the console (manager) and the device gateway (gateway) send it on every request; a request without it is not one of the apps and is served as the current API, and a device token of an app's kind without it is an app of an unknown version; a header that does not parse counts as absent. The node may refuse an app 426 app_update_required by it, except on the operations marked x-app-update-exempt. Not a security boundary (spec/API.md, Transport; spec/RELEASES.md, Who is asking). |
id обязательный
|
path | string (uuid) |
Id. |
Ответы
POST
/v1/tables
Draw a table on an area's grid; it gets its QR token.
Without the restaurant license module a store has three places, each table and each open or billed tab taking one; a table past them is 409 license_limit with details tables 3 (spec/LICENSE.md, The restaurant's three places).
operationId
createTable · Право floor.manage
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
IRetail-App
|
header | string |
Which app sends the request, at which version: <app>/<version>, optionally a space and (<platform>), as cashier/1.2.0 (windows-x64) or manager/1.2.0 (web). The register (cashier), the back office and the console (manager) and the device gateway (gateway) send it on every request; a request without it is not one of the apps and is served as the current API, and a device token of an app's kind without it is an app of an unknown version; a header that does not parse counts as absent. The node may refuse an app 426 app_update_required by it, except on the operations marked x-app-update-exempt. Not a security boundary (spec/API.md, Transport; spec/RELEASES.md, Who is asking). |
Idempotency-Key
|
header | string |
spec/API.md, Idempotency. |
Тело запроса обязательный
application/jsonTableWrite
Ответы
PATCH
/v1/tables/{id}
Move, resize, rotate, rename a table or change its seats or area.
operationId
updateTable · Право floor.manage
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
IRetail-App
|
header | string |
Which app sends the request, at which version: <app>/<version>, optionally a space and (<platform>), as cashier/1.2.0 (windows-x64) or manager/1.2.0 (web). The register (cashier), the back office and the console (manager) and the device gateway (gateway) send it on every request; a request without it is not one of the apps and is served as the current API, and a device token of an app's kind without it is an app of an unknown version; a header that does not parse counts as absent. The node may refuse an app 426 app_update_required by it, except on the operations marked x-app-update-exempt. Not a security boundary (spec/API.md, Transport; spec/RELEASES.md, Who is asking). |
id обязательный
|
path | string (uuid) |
Id. |
If-Match
|
header | string |
The version the change is based on. |
Тело запроса обязательный
application/jsonTablePatch
Ответы
DELETE
/v1/tables/{id}
Delete a table with no open or billed check (409 table_in_use otherwise).
operationId
deleteTable · Право floor.manage
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
IRetail-App
|
header | string |
Which app sends the request, at which version: <app>/<version>, optionally a space and (<platform>), as cashier/1.2.0 (windows-x64) or manager/1.2.0 (web). The register (cashier), the back office and the console (manager) and the device gateway (gateway) send it on every request; a request without it is not one of the apps and is served as the current API, and a device token of an app's kind without it is an app of an unknown version; a header that does not parse counts as absent. The node may refuse an app 426 app_update_required by it, except on the operations marked x-app-update-exempt. Not a security boundary (spec/API.md, Transport; spec/RELEASES.md, Who is asking). |
id обязательный
|
path | string (uuid) |
Id. |
Ответы
POST
/v1/tables/{id}/token
Draw a new QR token for a table; the old one is retired and answers 404 to guests from now on.
operationId
regenerateTableToken · Право floor.manage
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
IRetail-App
|
header | string |
Which app sends the request, at which version: <app>/<version>, optionally a space and (<platform>), as cashier/1.2.0 (windows-x64) or manager/1.2.0 (web). The register (cashier), the back office and the console (manager) and the device gateway (gateway) send it on every request; a request without it is not one of the apps and is served as the current API, and a device token of an app's kind without it is an app of an unknown version; a header that does not parse counts as absent. The node may refuse an app 426 app_update_required by it, except on the operations marked x-app-update-exempt. Not a security boundary (spec/API.md, Transport; spec/RELEASES.md, Who is asking). |
id обязательный
|
path | string (uuid) |
Id. |
If-Match
|
header | string |
The version the change is based on. |
Ответы
Схемы
Error object
Every error response.
error обязательный
|
string |
Stable code, see spec/API.md. |
message обязательный
|
string |
English text for logs. |
details
|
object |
LocalizedText map of string
Text by language code; the organization's default language must be present.
Area object
A room of the floor (spec/RESTAURANT.md, The floor).
id обязательный
|
string (uuid) |
|
name обязательный
|
LocalizedText |
|
position обязательный
|
integer |
The area's order among the floor's tabs. |
version обязательный
|
integer (int64) |
AreaWrite object
name обязательный
|
LocalizedText |
|
position
|
integer |
The area's order among the floor's tabs. |
AreaPatch object
name
|
LocalizedText |
|
position
|
integer |
The area's order among the floor's tabs. |
TableShape "rect" | "circle"
rect · circle
Table object
A table on its area's grid (spec/RESTAURANT.md, The floor).
id обязательный
|
string (uuid) |
|
area_id обязательный
|
string (uuid) |
|
name обязательный
|
string |
|
shape обязательный
|
TableShape |
|
x обязательный
|
integer |
|
y обязательный
|
integer |
|
w обязательный
|
integer |
|
h обязательный
|
integer |
|
rotation обязательный
|
0 | 90 | 180 | 270 |
|
seats обязательный
|
integer |
|
qr_token обязательный
|
string | null |
128 random bits in lower-case base32 for the table's QR code; null unless the caller holds floor.manage. |
version обязательный
|
integer (int64) |
TableWrite object
area_id обязательный
|
string (uuid) |
|
name обязательный
|
string |
|
shape обязательный
|
TableShape |
|
x обязательный
|
integer |
|
y обязательный
|
integer |
|
w обязательный
|
integer |
|
h обязательный
|
integer |
|
rotation
|
0 | 90 | 180 | 270 |
|
seats обязательный
|
integer |
TablePatch object
area_id
|
string (uuid) |
|
name
|
string |
|
shape
|
TableShape |
|
x
|
integer |
|
y
|
integer |
|
w
|
integer |
|
h
|
integer |
|
rotation
|
0 | 90 | 180 | 270 |
|
seats
|
integer |
CheckState "open" | "billed" | "closed" | "canceled"
open · billed · closed · canceled
CheckSummary object
A check as the floor and the agents see it, without its lines.
id обязательный
|
string (uuid) |
|
number обязательный
|
integer (int64) |
|
kind обязательный
|
"table" | "tab" |
|
table_id обязательный
|
string (uuid) | null |
|
table_name обязательный
|
string | null |
|
name обязательный
|
string | null |
A tab's name; null for a check on a table. |
waiter_id обязательный
|
string (uuid) |
|
waiter_name обязательный
|
string |
The waiter's name as the staff list has it, the same a kitchen ticket prints (spec/RESTAURANT.md, The floor). |
covers обязательный
|
integer |
|
state обязательный
|
CheckState |
|
total_minor обязательный
|
integer (int64) |
|
opened_at обязательный
|
string (date-time) |
|
version обязательный
|
integer (int64) |
FloorTable object
table обязательный
|
Table |
|
checks обязательный
|
array of CheckSummary |
The table's open and billed checks, oldest first. |
guest_orders_pending обязательный
|
integer |
|
locked обязательный
|
boolean |
True when the store lacks the restaurant license module and this table is past its first three by id; no new check opens on it, the checks already on it go on, and its QR code answers guests 404 (spec/LICENSE.md, The restaurant's three places). |
Floor object
areas обязательный
|
array of Area |
|
tables обязательный
|
array of FloorTable |
|
tabs обязательный
|
array of CheckSummary |
Open and billed tabs, oldest first. |