iRetail PRO store node 1.0.0-m1: guest-orders

3 operations

← All documentation · Source: contracts openapi/store-v1.yaml at 8000474.

← iRetail PRO store node 1.0.0-m1

Operations

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

operationId listGuestOrders · Permission check.use

Parameters

Name In Type Description
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.

Responses

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 · Permission guest_order.confirm

Parameters

Name In Type Description
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 required path string (uuid) Id.
If-Match header string The version the change is based on.

Request body required

Responses

  • 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 · Permission guest_order.confirm

Parameters

Name In Type Description
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 required path string (uuid) Id.
If-Match header string The version the change is based on.

Request body required

Responses

  • 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

Schemas

Error object

Every error response.

error required string Stable code, see spec/API.md.
message required string English text for logs.
details object

Reason object

reason required string

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

pending · confirmed · refused · expired

GuestOrderLine object

item_id required string (uuid)
name required string
quantity_milli required integer (int64)
modifiers required array of string
unit_price_minor required integer (int64)
amount_minor required 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 required string (uuid)
table_id required string (uuid)
table_name required string
state required GuestOrderState
lines required array of GuestOrderLine
estimate_minor required integer (int64)
created_at required string (date-time)
check_id required string (uuid) | null
reason required string | null A refusal's reason, which the guest sees.
resolved_by required string (uuid) | null
resolved_at required string (date-time) | null
version required integer (int64)

GuestOrderPage object

items required array of GuestOrder
next required 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