iRetail PRO store node 1.0.0-m1: store

2 operations

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

← iRetail PRO store node 1.0.0-m1

Operations

GET /v1/store This store's settings.

operationId getStore · Permission store.read

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 Store
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
PATCH /v1/store Change store settings.

operationId patchStore · Permission store.edit

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).
If-Match header string The version the change is based on.
Approval-Token header string One-time approval from POST /v1/approvals for this operation's permission.

Request body required

Responses

  • 200 OK Store
  • 400 Error (spec/API.md). Error
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 412 Error (spec/API.md). Error
  • 422 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

LocalizedText map of string

Text by language code; the organization's default language must be present.

BarcodeTemplate object

pattern required string
weight_unit "kg" | "lb"
weight_decimals integer

Store object

id required string (uuid)
code required string
name required LocalizedText
country required string
country_pack required "none" | "us" The country pack whose rules the store follows (spec/COUNTRY_PACKS.md, data/country-packs.json); set when the store is made and never changed.
currency required string
currency_exponent required integer
unit_system required "metric" | "us_customary"
tax_mode required "exclusive" | "inclusive"
timezone required string
receipt_language required string
hold_ttl_seconds required integer
cash_rounding_minor required integer (int64) | null
barcode_templates required array of BarcodeTemplate
register_share required integer | null The registers the hub gives this store out of the license (spec/LICENSE.md); null without a share.
network_enabled required boolean | null The store's switch for the private network (spec/NETWORK.md); false keeps it out, null follows the organization.
network_block required integer | null The store's /24 block in the organization's subnet, set by the hub; null outside a chain.
tax_by_category required boolean Lines carry the tax codes that apply to their item's category (spec/TAX.md), not the item's own codes.
profile required StoreProfile
pse_limits required PseLimits
expired_sale required "refuse" | "approve" A unit a GS1 code shows expired is refused, or sold with a senior's approval for expired.sell (spec/BARCODES.md, GS1 codes).
voids_allowed required boolean Whether a receipt of the open shift may be voided; false where the country forbids voids, so a return is made instead (spec/FISCAL.md).
expiry_run_at required string The local time after which the day's expiry rules run, 05:00 by default (spec/PRICING.md, Expiry rules).
check_hold_minutes required integer How long a restaurant check's stock holds live after the check's last change or renewal, 240 by default (spec/RESTAURANT.md, Stock on a check).
seated_long_minutes required integer When a table counts as seated long on the floor, in whole minutes from its oldest open or billed check's opened_at, 90 by default (spec/RESTAURANT.md, The floor).
service_charges required array of ServiceCharge The store's service charges, in the order they apply; empty for none (spec/API.md, Service charges).
back_office_updates required "automatic" | "ask" Whether the store's back offices install a ready update by themselves at a safe moment after a 60-second countdown (automatic, the default) or ask the person (ask); a record from a hub before 1.1 reads as automatic (spec/RELEASES.md, Installing). Changing it needs release.manage beside the patch's own permission.
public_profile PublicProfile | null What the customer app shows of the store (spec/PUBLIC_API.md, Stores); null, the default, hides it. A record from a node or hub before 1.1 reads as null.
min_app_versions required MinAppVersions
version required integer (int64)

StorePatch object

name LocalizedText
receipt_language string
timezone string
hold_ttl_seconds integer
cash_rounding_minor integer (int64) | null
barcode_templates array of BarcodeTemplate
tax_by_category boolean
profile StoreProfile
pse_limits PseLimits
expired_sale "refuse" | "approve" A unit a GS1 code shows expired is refused, or sold with a senior's approval for expired.sell (spec/BARCODES.md, GS1 codes).
voids_allowed boolean Whether a receipt of the open shift may be voided; false where the country forbids voids, so a return is made instead (spec/FISCAL.md).
expiry_run_at string The local time after which the day's expiry rules run, 05:00 by default (spec/PRICING.md, Expiry rules).
check_hold_minutes integer How long a restaurant check's stock holds live after the check's last change or renewal, 240 by default (spec/RESTAURANT.md, Stock on a check).
seated_long_minutes integer When a table counts as seated long on the floor, in whole minutes from its oldest open or billed check's opened_at, 90 by default (spec/RESTAURANT.md, The floor).
service_charges array of ServiceChargeInput The whole list, in the order the charges apply; empty for none. A field a charge leaves out takes its default, and the store keeps every default written out (spec/API.md, Service charges).
back_office_updates "automatic" | "ask" Whether the store's back offices install a ready update by themselves at a safe moment after a 60-second countdown (automatic, the default) or ask the person (ask); a record from a hub before 1.1 reads as automatic (spec/RELEASES.md, Installing). Changing it needs release.manage beside the patch's own permission.
public_profile PublicProfile | null What the customer app shows of the store (spec/PUBLIC_API.md, Stores); the whole object, or null to hide the store.
min_app_versions MinAppVersions The whole object; an app it leaves out has no minimum, and {} removes every minimum (spec/RELEASES.md, The store's minimum). Changing it needs release.manage beside the patch's own permission.

MinAppVersions object

The oldest version of each app the store's node serves, set by a person: the only way to block an old version of an app. {}, the default, names no minimum. A request from an app below its minimum, or from a device of that app's kind that does not say its version, is refused 426 app_update_required, never an exempt operation; a minimum later than the release the node runs counts as that release. Read with store.read; changing it needs release.manage beside the patch's own permission and is audited (store.min_app_versions_changed). A version that does not parse is 400 bad_version, one later than the release the node runs (at the hub, the hub's) 422 invalid_min_app_version. A store record from an older hub without it reads as {} (spec/RELEASES.md, The store's minimum).

cashier string The register's (and the handheld's and the kitchen display's) minimum.
manager string The back office's and the console's minimum.
gateway string The device gateway's minimum.

PseLimits object

The store's pseudoephedrine limits (spec/PHARMACY.md), the federal ones by default.

daily_mg required integer
window_mg required integer
window_days required integer

StoreProfile "general" | "supermarket" | "grocery" | "pharmacy" | "coffee_shop" | "pizzeria" | "restaurant"

What kind of shop the store is; the apps' defaults follow it (spec/API.md, "Store profiles").

general · supermarket · grocery · pharmacy · coffee_shop · pizzeria · restaurant

ServiceChargeTax object | object

codes: the store's tax codes the charge carries, none for an untaxed charge, one at most in an inclusive store; follow_lines: each line's share is taxed as the line is (spec/RECEIPT_MATH.md, Service charges).

ServiceCharge object

One of a store's service charges (spec/API.md, Service charges); never a tip.

id required string
label required ServiceChargeLabel
rate_ppm required integer
min_covers required integer | null The party size from which it applies to a check; null for every check and sale.
order_types required array of "dine_in" | "take_out" | "delivery"
base required "after_discounts" | "before_discounts"
tax required ServiceChargeTax
to_staff_ppm required integer The part the business pays its staff, printed and reported for payroll; the node moves no money.
notice required map of string The store's words by language code, up to 300 characters in each, on the pre-bill, the receipt and the guest menu; {} for none.

ServiceChargeLabel map of string

What the bill, the receipt, the reports and the fiscal back end call a service charge, by language code; 1 to 40 characters in each.

ServiceChargeInput object

A service charge as StorePatch and the hub's patchHubStore write it. id, label, rate_ppm and tax are given; min_covers (null), order_types ([dine_in]), base (after_discounts), to_staff_ppm (0) and notice ({}) take their defaults when left out. The node checks the values in the service_charges suite's order and answers 422 invalid_service_charge with the index and field (a fourth charge too), so this schema holds their types only; a label or notice outside its lengths is 400 bad_request.

id required string
label required ServiceChargeLabel
rate_ppm required integer
min_covers integer | null
order_types array of string
base string
tax required object
to_staff_ppm integer
notice map of string

PublicProfile object

visible required boolean
name required LocalizedText
address required LocalizedText
phone required string | null
latitude_e7 required integer | null Degrees × 10^7; null with longitude_e7 for no position.
longitude_e7 required integer | null
hours required OpeningHours
preorders required PreorderSettings | null How the store takes preorders (spec/PREORDERS.md, Pickup windows), or null for not at all.
low_stock_milli required integer | null The storefront's low level for items without their own; null for 2000.

OpeningHours array of object

Opening periods by ISO weekday (1 Monday) in the store's time zone; a day with none is closed, and a period whose closes is not after opens is refused (422 invalid_profile, field hours).

PreorderSettings object

spec/PREORDERS.md, Pickup windows; a field left out takes its default.

slot_minutes 15 | 30 | 60 | 120
lead_minutes integer
days_ahead integer
grace_minutes integer
max_lines integer
online_payment boolean