iRetail PRO store node 1.0.0-m1: devices

4 operations

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

← iRetail PRO store node 1.0.0-m1

Operations

GET /v1/devices Registered devices (workplaces).

operationId listDevices · Permission device.manage

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).

Responses

  • 200 OK array of Device
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
POST /v1/devices Register a device; the token is shown once.

operationId createDevice · Permission device.manage

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).
Approval-Token header string One-time approval from POST /v1/approvals for this operation's permission.

Request body required

Responses

PUT /v1/devices/{id}/fiscal Set a register's fiscal back ends (spec/FISCAL.md).

operationId setDeviceFiscal · Permission device.manage

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.

Request body required

Responses

  • 200 OK Device
  • 400 Error (spec/API.md). Error
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 404 Error (spec/API.md). Error
DELETE /v1/devices/{id} Revoke a device and its token.

operationId revokeDevice · Permission device.manage

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.
Approval-Token header string One-time approval from POST /v1/approvals for this operation's permission.

Responses

  • 204 Done
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 404 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

Device object

A workplace and its device token.

id required string (uuid)
store_id required string (uuid)
kind required "register" | "handheld" | "back_office" | "kitchen_display" | "gateway" A gateway device holds store.read alone, for the device gateway's own update (spec/RBAC.md, Principals; spec/RELEASES.md, The gateway).
name required string
created_at required string (date-time)
revoked_at required string (date-time) | null
wg_address required string | null The device's address in the private network, null without a peer (spec/NETWORK.md).
wg_public_key required string | null The device's WireGuard public key, null without a peer.
fiscal required FiscalSetup | null A register's fiscal back ends; null for other devices and for a register without one (spec/FISCAL.md).
app required DeviceApp | null The device's last update report (spec/RELEASES.md, Reporting); null before its first. It never crosses to the hub with the device record.

DeviceCreate object

kind required "register" | "handheld" | "back_office" | "kitchen_display" | "gateway"
name required string

DeviceCreated object

device required Device
token required string Shown once.

FiscalSetup object

A register's fiscal back ends (spec/FISCAL.md, Back ends).

mode required "none" | "required"
backends required array of object

ReleasePlatform "linux-x64" | "linux-arm64" | "windows-x64" | "macos-universal"

A platform a release ships for (spec/RELEASES.md).

linux-x64 · linux-arm64 · windows-x64 · macos-universal

AppId "cashier" | "manager" | "gateway"

An app that updates itself from its node (spec/RELEASES.md, The apps, The gateway); the manifest's component.

cashier · manager · gateway

AppUpdateState "idle" | "downloading" | "ready" | "waiting" | "installing" | "installed" | "failed" | "rolled_back"

Where an app's update stands (spec/RELEASES.md, Reporting).

idle · downloading · ready · waiting · installing · installed · failed · rolled_back

AppUpdateStep "download" | "verify" | "migrate" | "install" | "start"

The step a failed or rolled back app update stopped at.

download · verify · migrate · install · start

AppUpdateError "malformed" | "unsupported_format" | "unknown_key" | "bad_signature" | "downgrade" | "missing_artifact" | "size_mismatch" | "sha256_mismatch" | "unknown_artifact" | "install_marker" | "source_unreachable" | "storage_failed" | "install_failed" | "start_failed"

Why an app update stopped, one code, never text from outside (spec/RELEASES.md, Reporting).

malformed · unsupported_format · unknown_key · bad_signature · downgrade · missing_artifact · size_mismatch · sha256_mismatch · unknown_artifact · install_marker · source_unreachable · storage_failed · install_failed · start_failed

DeviceApp object

A device's last accepted update report, with when its state last changed and when the node took it.

app required AppId
platform required ReleasePlatform
version required string
previous_version required string | null
target_version required string | null
state required AppUpdateState
step required AppUpdateStep | null
error required AppUpdateError | null
since required string (date-time)
reported_at required string (date-time)