iRetail PRO store node 1.0.0-m1: guest-orders

3 операции

← Вся документация · Источник: контракты, openapi/store-v1.yaml на коммите 8000474.

Справочники на английском — на языке контрактов, из которых они созданы.

← iRetail PRO store node 1.0.0-m1

Операции

GET /v1/guest-orders Guests' orders, pending first, oldest first within each state (spec/RESTAURANT.md, The guest listener).

operationId listGuestOrders · Право 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).
state query GuestOrderState Only this state.
table_id query string (uuid) Only this table's orders.
limit query integer Page size, 1–200.
after query string Cursor from the previous page.

Ответы

POST /v1/guest-orders/{id}/confirm Add a pending guest order's lines to a check of its table, or to a new check the caller opens.

Without the restaurant license module, a new check on a locked table is 403 module_disabled with details module restaurant; an open check already on it takes the lines (spec/LICENSE.md, The restaurant's three places).

operationId confirmGuestOrder · Право guest_order.confirm

Параметры

Имя Где Тип Описание
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.

Тело запроса обязательный

Ответы

  • 200 OK GuestOrder
  • 400 Error (spec/API.md). Error
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 404 Error (spec/API.md). Error
  • 409 Error (spec/API.md). Error
  • 412 Error (spec/API.md). Error
POST /v1/guest-orders/{id}/refuse Refuse a pending guest order with a reason the guest sees.

operationId refuseGuestOrder · Право guest_order.confirm

Параметры

Имя Где Тип Описание
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.

Тело запроса обязательный

Ответы

  • 200 OK GuestOrder
  • 400 Error (spec/API.md). Error
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 404 Error (spec/API.md). Error
  • 409 Error (spec/API.md). Error
  • 412 Error (spec/API.md). Error

Схемы

Error object

Every error response.

error обязательный string Stable code, see spec/API.md.
message обязательный string English text for logs.
details object

Reason object

reason обязательный string

GuestOrderState "pending" | "confirmed" | "refused" | "expired"

pending · confirmed · refused · expired

GuestOrderLine object

item_id обязательный string (uuid)
name обязательный string
quantity_milli обязательный integer (int64)
modifiers обязательный array of string
unit_price_minor обязательный integer (int64)
amount_minor обязательный integer (int64)

GuestOrder object

An order a guest sent from a table's menu, waiting for a person (spec/RESTAURANT.md, The guest listener).

id обязательный string (uuid)
table_id обязательный string (uuid)
table_name обязательный string
state обязательный GuestOrderState
lines обязательный array of GuestOrderLine
estimate_minor обязательный integer (int64)
created_at обязательный string (date-time)
check_id обязательный string (uuid) | null
reason обязательный string | null A refusal's reason, which the guest sees.
resolved_by обязательный string (uuid) | null
resolved_at обязательный string (date-time) | null
version обязательный integer (int64)

GuestOrderPage object

items обязательный array of GuestOrder
next обязательный string | null

GuestOrderConfirm object

check_id, an open check of the order's table; or none, for a new check on it the caller opens.

check_id string (uuid) | null
check_version integer (int64)
covers integer