iRetail PRO store node 1.0.0-m1: menus
15 операций
← Вся документация · Источник: контракты, openapi/store-v1.yaml на коммите 8000474.
Справочники на английском — на языке контрактов, из которых они созданы.
← iRetail PRO store node 1.0.0-m1
Операции
GET
/v1/guest-listener
Whether the guest listener is on and the origin guests use (spec/RESTAURANT.md, The guest listener).
operationId
getGuestListener · Право store.read
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
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). |
Ответы
-
200OKGuestListener -
401Error (spec/API.md).Error -
403Error (spec/API.md).Error
GET
/v1/menus
The guest menus in position order (spec/RESTAURANT.md, The guest menu).
operationId
listMenus · Право item.read
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
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/menus
Make a guest menu (at most 10 a store).
operationId
createMenu · Право menu.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/jsonMenuWrite
Ответы
GET
/v1/menus/{id}
One guest menu.
operationId
getMenu · Право item.read
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
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. |
Ответы
PUT
/v1/menus/{id}
Replace a guest menu's name, areas and sections.
operationId
putMenu · Право menu.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/jsonMenuWrite
Ответы
DELETE
/v1/menus/{id}
Delete a guest menu.
operationId
deleteMenu · Право menu.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. |
Ответы
GET
/v1/menu-theme
The guest menu's theme.
operationId
getMenuTheme · Право item.read
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
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). |
Ответы
PUT
/v1/menu-theme
Set the theme; colors are checked for WCAG 2.2 contrast (422 theme_contrast).
operationId
putMenuTheme · Право menu.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). |
If-Match
|
header | string |
The version the change is based on. |
Тело запроса обязательный
application/jsonMenuThemePut
Ответы
GET
/v1/menu-photos
The store's menu photos.
operationId
listMenuPhotos · Право item.read
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
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/menu-photos
Keep a JPEG or WebP photo of at most 512 KB, its EXIF and XMP removed.
operationId
uploadMenuPhoto · Право menu.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. |
Тело запроса обязательный
image/jpegstring (binary)image/webpstring (binary)
Ответы
GET
/v1/menu-photos/{id}
A photo's bytes with its ETag; 304 for a matching If-None-Match.
operationId
getMenuPhoto · Право item.read
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
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-None-Match
|
header | string |
The ETag the caller holds. |
Ответы
DELETE
/v1/menu-photos/{id}
Delete a photo no menu or theme uses (409 photo_in_use otherwise).
operationId
deleteMenuPhoto · Право menu.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. |
Ответы
GET
/v1/stop-list
Items temporarily not served (spec/RESTAURANT.md, The guest menu).
operationId
getStopList · Право item.read
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
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). |
Ответы
-
200OKarray of StopListEntry -
401Error (spec/API.md).Error -
403Error (spec/API.md).Error
PUT
/v1/stop-list/{item_id}
Put an item on the stop list, until a time or until it is taken off; refused to guests and at the register alike.
operationId
stopItem · Право stop_list.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). |
item_id обязательный
|
path | string (uuid) |
The item. |
Тело запроса обязательный
application/jsonStopListPut
Ответы
-
200OKStopListEntry -
400Error (spec/API.md).Error -
401Error (spec/API.md).Error -
403Error (spec/API.md).Error -
404Error (spec/API.md).Error
DELETE
/v1/stop-list/{item_id}
Take an item off the stop list.
operationId
unstopItem · Право stop_list.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). |
item_id обязательный
|
path | string (uuid) |
The item. |
Ответы
Схемы
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.
GuestListener object
enabled обязательный
|
boolean |
Whether IRETAIL_GUEST_LISTEN is set. |
origin обязательный
|
string (uri) | null |
IRETAIL_GUEST_ORIGIN, the origin printed in the tables' QR codes; null when not set. |
DietTag "vegetarian" | "vegan" | "halal" | "kosher" | "gluten_free" | "lactose_free" | "spicy"
vegetarian · vegan · halal · kosher · gluten_free · lactose_free · spicy
Allergen "celery" | "crustaceans" | "eggs" | "fish" | "gluten" | "lupin" | "milk" | "mollusks" | "mustard" | "peanuts" | "sesame" | "soy" | "sulfites" | "tree_nuts" | "wheat"
celery · crustaceans · eggs · fish · gluten · lupin · milk · mollusks · mustard · peanuts · sesame · soy · sulfites · tree_nuts · wheat
MenuEntry object
item_id обязательный
|
string (uuid) |
|
description обязательный
|
LocalizedText |
Up to 500 characters a language. |
photo_id обязательный
|
string (uuid) | null |
|
diet обязательный
|
array of DietTag |
|
allergens обязательный
|
array of Allergen |
MenuSection object
id обязательный
|
string |
|
name обязательный
|
LocalizedText |
|
entries обязательный
|
array of MenuEntry |
MenuWrite object
name обязательный
|
LocalizedText |
|
position
|
integer |
|
active обязательный
|
boolean |
|
area_ids обязательный
|
array of string (uuid) |
The areas it is shown in; empty for every area. |
sections обязательный
|
array of MenuSection |
Menu object
A guest menu (spec/RESTAURANT.md, The guest menu).
id обязательный
|
string (uuid) |
|
name обязательный
|
LocalizedText |
|
position обязательный
|
integer |
|
active обязательный
|
boolean |
|
area_ids обязательный
|
array of string (uuid) |
|
sections обязательный
|
array of MenuSection |
|
version обязательный
|
integer (int64) |
MenuPhoto object
id обязательный
|
string (uuid) |
|
content_type обязательный
|
"image/jpeg" | "image/webp" |
|
bytes обязательный
|
integer |
|
width обязательный
|
integer |
|
height обязательный
|
integer |
|
etag обязательный
|
string |
|
created_at обязательный
|
string (date-time) |
ThemeColor string
MenuThemePut object
logo_photo_id
|
string (uuid) | null |
|
background обязательный
|
ThemeColor |
|
text обязательный
|
ThemeColor |
|
secondary_text обязательный
|
ThemeColor |
|
accent обязательный
|
ThemeColor |
|
on_accent обязательный
|
ThemeColor |
|
font обязательный
|
"inter" | "noto_serif" | "noto_sans_armenian" |
|
layout обязательный
|
"list" | "grid" |
|
languages обязательный
|
array of "en" | "ru" | "de" | "es" | "fr" | "pl" | "hy" | "ky" | "kk" | "pt-BR" |
MenuTheme object
The guest menu's look; its colors reach WCAG 2.2 contrast (spec/RESTAURANT.md, The guest menu).
logo_photo_id обязательный
|
string (uuid) | null |
|
background обязательный
|
ThemeColor |
|
text обязательный
|
ThemeColor |
|
secondary_text обязательный
|
ThemeColor |
|
accent обязательный
|
ThemeColor |
|
on_accent обязательный
|
ThemeColor |
|
font обязательный
|
"inter" | "noto_serif" | "noto_sans_armenian" |
|
layout обязательный
|
"list" | "grid" |
|
languages обязательный
|
array of "en" | "ru" | "de" | "es" | "fr" | "pl" | "hy" | "ky" | "kk" | "pt-BR" |
|
version обязательный
|
integer (int64) |
StopListEntry object
item_id обязательный
|
string (uuid) |
|
until обязательный
|
string (date-time) | null |
|
reason обязательный
|
string | null |
|
by обязательный
|
string (uuid) |
|
at обязательный
|
string (date-time) |
StopListPut object
until
|
string (date-time) | null |
|
reason
|
string | null |