iRetail PRO store node 1.0.0-m1

266 operations

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

REST API of the node in the store role. Conventions: spec/API.md; permissions: spec/RBAC.md (each operation names its permission in x-permission); stock rules: spec/STOCK.md; amounts: spec/RECEIPT_MATH.md. Every request from an app carries IRetail-App (components/parameters/IRetailApp, on every path an app calls), and the node may refuse an app 426 app_update_required by it except on an operation marked x-app-update-exempt; a property added to a schema after 1.0 carries x-since (spec/RELEASES.md, Apps and the gateway).

health 1 operations

receipts 5 operations

auth 2 operations

me 2 operations

  • GET /v1/me The caller and its effective permissions in its context.
  • PUT /v1/me/pin Set a new PIN for the signed-in employee, giving the current one (spec/RBAC.md, PINs).

approvals 1 operations

  • POST /v1/approvals A senior employee's one-time approval for a permission in this context (spec/RBAC.md).

store 2 operations

tax-rates 9 operations

devices 4 operations

network 4 operations

integrations 3 operations

roles 2 operations

employees 6 operations

groups 2 operations

tags 3 operations

change-requests 2 operations

  • GET /v1/change-requests This store's requests to its hub for hub-owned changes (spec/SYNC.md), newest first.
  • POST /v1/change-requests Ask the hub for a new item or a price now; the proposal is usable in the store while pending (item.edit, or price.edit for a price).

promotions 4 operations

items 11 operations

stock 4 operations

holds 4 operations

documents 14 operations

shifts 6 operations

kitchen 4 operations

pharmacy 2 operations

events 2 operations

license 2 operations

audit 3 operations

reports 12 operations

pricing 6 operations

imports 10 operations

proposals 4 operations

assistant 8 operations

stores 1 operations

  • GET /v1/store-directory The chain's stores, each by id, code and name only (spec/SYNC.md); empty in a store with no hub.

catalog 4 operations

loyalty 31 operations

floor 8 operations

checks 22 operations

guest-orders 3 operations

menus 15 operations

updates 13 operations

  • GET /v1/update This store's update (spec/RELEASES.md, The store's update) — the running and previous release, the target, its state, the backup's and rehearsal's outcomes, background tasks, the hub's refusal if the exchange is refused, and its apps' versions and offers.
  • PUT /v1/update A store with no hub sets its own update target (spec/RELEASES.md, A store with no hub), which its updater applies. 409 owned_by_hub in a store of a chain; 400 bad_version, 400 bad_request (action, window); 404 for a version not held; 409 release_not_verified; 422 release_refused (downgrade).
  • GET /v1/app-update What an app or the gateway should run, by the release the node runs, one device of the store first (spec/RELEASES.md, The apps); the installer comes from this node.
  • POST /v1/app-update/report An app or the gateway reports where its update stands (spec/RELEASES.md, Reporting); kept as the device's Device.app.
  • POST /v1/app-update/clear Clear the store's hold of a release for an app and platform after its first device failed it (spec/RELEASES.md, One device first); the next device to ask becomes the first again. 404 when nothing is held.
  • GET /v1/releases The releases a store with no hub holds, the latest version first (spec/RELEASES.md, A store with no hub); 409 owned_by_hub in a store of a chain.
  • GET /v1/releases/available What the source (IRETAIL_RELEASES_URL) offers as its latest release, and whether this store holds it. 409 owned_by_hub in a store of a chain, 409 release_source_missing with downloading off, 503 release_source_unreachable.
  • POST /v1/releases/download A store with no hub downloads a release from its source, as the hub does; the manifest is verified before answering (422 release_refused), the artifacts it keeps (roles with store) follow. 409 owned_by_hub in a store of a chain, 409 release_storage_missing without IRETAIL_RELEASES_DIR.
  • POST /v1/releases/import A store with no hub imports a release bundle (the raw body, a POSIX tar), verified as it streams, as the hub does; it keeps the artifacts whose roles hold store. 409 owned_by_hub in a store of a chain.
  • GET /v1/releases/{version} One release a store with no hub holds, with its signed manifest; 409 owned_by_hub in a store of a chain.
  • DELETE /v1/releases/{version} Remove a release and its files; 409 release_in_use while the store runs it, ran it before or its own target names it; 409 owned_by_hub in a store of a chain.
  • GET /v1/releases/{version}/manifest The signed manifest of a release this node holds (the one it runs, ran before or is given; at a store with no hub, any it holds verified); for the updater (its token), devices and employees. The caller verifies it with its own embedded keys.
  • GET /v1/releases/{version}/artifacts/{name} A file of a release this node holds, verified when it arrived; Range resumes a broken download. The caller checks its size and SHA-256 against the manifest.

updater 2 operations

  • GET /v1/updater/target The updater reads its node's target (spec/RELEASES.md, The updater's API); 404 when the node has no updater token.
  • POST /v1/updater/report The updater reports its state for the target's record version; a report for an older record version is ignored.

brand 5 operations

  • GET /v1/brand The effective brand of the caller's store: the brand overlaid with the store's banner, or the default (spec/BRANDS.md, What the apps get); 304 for a matching If-None-Match.
  • PUT /v1/brand Set the organization's brand: checked as spec/BRANDS.md says (422 invalid_brand, 422 brand_contrast); 403 module_disabled without white_label; 409 owned_by_hub at a store of a chain.
  • GET /v1/brand/settings The organization's brand as kept, served whether or not the key holds white_label; 404 when there is none.
  • POST /v1/brand/images Upload a PNG of at most 128 KiB for a brand or a banner to name; only its header is read (422 invalid_brand, reason not_png). Its id is the SHA-256 of its bytes, so uploading the same bytes again answers the same image.
  • GET /v1/brand/images/{id} An image of the brand or a banner, its bytes never changing; 304 for a matching If-None-Match.

customer-app 4 operations

  • GET /v1/customer-app The customer app's setting (spec/PUBLIC_API.md, The listener): at the hub, or a store with no hub; 409 owned_by_hub at a store of a chain.
  • PUT /v1/customer-app Set the customer app at the setting's version; 422 invalid_customer_app with field and reason, checked in spec/PUBLIC_API.md's order. Audited (customer_app.set).
  • POST /v1/customer-app/card-key Make a new card key; every card token made with the old one stops being taken at once. Audited (customer_app.card_key_renewed); the key itself is never answered, shown or logged.
  • POST /v1/customer-app/pushes Send a promotion push to the customers who take promotions, allow marketing and had none today; 422 pushes_unavailable when no push account is set. Audited (customer_app.push_sent); no agent tool reaches it.

preorders 6 operations

  • GET /v1/preorders The store's preorders by their effective state (spec/PREORDERS.md), soonest window first; at the hub every store's, store_id filtering.
  • GET /v1/preorders/{id} One preorder with its lines, window, payment and effective state.
  • POST /v1/preorders/{id}/ready Mark an accepted preorder picked; the customer gets preorder_ready (409 preorder_state otherwise).
  • POST /v1/preorders/{id}/cancel Cancel a preorder with a reason: its holds are given back, an authorization released, and the customer gets preorder_canceled. At the hub the cancel crosses to the store; 409 preorder_state for a final one.
  • POST /v1/preorders/{id}/payment/capture Capture a preorder's online payment for the receipt that hands it over (spec/PAYMENTS_ONLINE.md, Capture): served by the owner, which a store of a chain forwards it to; the store's node calls it while recording the receipt, the register never. 409 capture_failed, 422 payment_refused (provider_code).
  • POST /v1/preorders/{id}/payment/refund Refund part of a captured online payment for a refund or void receipt (spec/PAYMENTS_ONLINE.md, Refunds); served by the owner, forwarded by a store of a chain. 422 refund_exceeds_payment (remaining), payment_refused.