iRetail PRO hub 1.0.0-m5: stores
19 operations
← All documentation · Source: contracts openapi/hub-v1.yaml at 8000474.
The chain's stores and their prices.
Operations
GET
/v1/stores
The chain's stores with the state of their nodes.
Each store's node only for a caller holding node.manage, null otherwise (spec/SYNC.md, Who sees a node).
operationId
listStores · 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
POST
/v1/stores
Add a store; its node registers with a token made for it.
operationId
createStore · Permission store.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). |
Idempotency-Key
|
header | string |
spec/API.md, Idempotency. |
Request body required
application/jsonStoreCreate
Responses
GET
/v1/stores/{id}
One store with the state of its node.
Each store's node only for a caller holding node.manage, null otherwise (spec/SYNC.md, Who sees a node).
operationId
getHubStore · Permission store.read
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required
|
path | string (uuid) |
|
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
PATCH
/v1/stores/{id}
Change a store's settings; they reach its node as a record.
operationId
patchHubStore · Permission store.manage
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required
|
path | string (uuid) |
|
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. |
Request body required
application/jsonStorePatch
Responses
GET
/v1/stores/{id}/tax-rates
A store's tax codes (spec/TAX.md).
operationId
listStoreTaxRates · Permission store.read
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required
|
path | string (uuid) |
|
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
PUT
/v1/stores/{id}/tax-rates/{code}
Create or change one store's tax code; it reaches the store as a record.
operationId
putStoreTaxRate · Permission store.manage
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required
|
path | string (uuid) |
|
code required
|
path | string |
Tax code. |
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). |
Request body required
application/jsonTaxRatePut
Responses
DELETE
/v1/stores/{id}/tax-rates/{code}
Delete a store's tax code that no item of the store uses.
operationId
deleteStoreTaxRate · Permission store.manage
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required
|
path | string (uuid) |
|
code required
|
path | string |
Tax code. |
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
GET
/v1/stores/{id}/tax-provider
Where a store's tax rates come from, and how the last sync went (spec/TAX.md).
operationId
getStoreTaxProvider · Permission store.read
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required
|
path | string (uuid) |
|
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
-
200OKTaxProvider -
401Error (spec/API.md).Error -
403Error (spec/API.md).Error -
404Error (spec/API.md).Error
PUT
/v1/stores/{id}/tax-provider
Set the tax service that fills a store's rates; the key is only named.
operationId
putStoreTaxProvider · Permission store.manage
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required
|
path | string (uuid) |
|
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). |
Request body required
application/jsonTaxProviderPut
Responses
-
200OKTaxProvider -
400Error (spec/API.md).Error -
401Error (spec/API.md).Error -
403Error (spec/API.md).Error -
404Error (spec/API.md).Error
POST
/v1/stores/{id}/tax-provider/sync
Ask the tax service for a store's rates now; answers the status after the attempt.
operationId
syncStoreTaxProvider · Permission store.manage
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required
|
path | string (uuid) |
|
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
-
200OKTaxProvider -
401Error (spec/API.md).Error -
403Error (spec/API.md).Error -
404Error (spec/API.md).Error -
409Error (spec/API.md).Error
GET
/v1/stores/{id}/deposits
A store's container deposits (spec/TAX.md).
operationId
listStoreDeposits · Permission store.read
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required
|
path | string (uuid) |
|
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
PUT
/v1/stores/{id}/deposits/{code}
Create or change one store's container deposit; it reaches the store as a record.
operationId
putStoreDeposit · Permission store.manage
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required
|
path | string (uuid) |
|
code required
|
path | string |
Deposit code. |
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). |
Request body required
application/jsonDepositPut
Responses
DELETE
/v1/stores/{id}/deposits/{code}
Delete a store's deposit that no item names.
operationId
deleteStoreDeposit · Permission store.manage
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required
|
path | string (uuid) |
|
code required
|
path | string |
Deposit code. |
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
GET
/v1/stores/{id}/prices
A store's prices by item.
operationId
listStorePrices · Permission item.read
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required
|
path | string (uuid) |
|
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). |
limit
|
query | integer |
|
after
|
query | string |
The cursor of the previous page. |
Responses
PUT
/v1/stores/{id}/prices/{item_id}
Set an item's price in one store; it reaches the store as a record.
operationId
putStorePrice · Permission price.edit
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required
|
path | string (uuid) |
|
item_id required
|
path | string (uuid) |
|
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). |
Request body required
application/jsonPricePut
Responses
GET
/v1/transfers
The chain's transfers with both documents (spec/STOCK.md, Transfers).
operationId
listHubTransfers · Permission document.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). |
store_id
|
query | string (uuid) |
One store's. |
state
|
query | "draft" | "in_transit" | "received" | "canceled" |
State. |
limit
|
query | integer |
Page size, 1–200. |
after
|
query | string |
Cursor from the previous page. |
Responses
-
200OKHubTransferPage -
401Error (spec/API.md).Error -
403Error (spec/API.md).Error
GET
/v1/transfers/{id}
One transfer of the chain.
operationId
getHubTransfer · Permission document.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). |
id required
|
path | string (uuid) |
Id. |
Responses
-
200OKHubTransfer -
401Error (spec/API.md).Error -
403Error (spec/API.md).Error -
404Error (spec/API.md).Error
GET
/v1/stock/in-transit
Every line in transit between the chain's stores.
operationId
listHubInTransit · Permission stock.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). |
store_id
|
query | string (uuid) |
One store's. |
Responses
-
200OKarray of HubInTransitLine -
401Error (spec/API.md).Error -
403Error (spec/API.md).Error
Schemas
StoreCreate object
code required
|
string |
|
name required
|
LocalizedText |
|
country required
|
string |
|
country_pack required
|
"none" | "us" |
The country pack whose rules the new store follows (spec/COUNTRY_PACKS.md, data/country-packs.json); it is never changed afterwards. |
currency required
|
string |
|
unit_system required
|
"metric" | "us_customary" |
|
tax_mode required
|
"exclusive" | "inclusive" |
|
timezone required
|
string |
|
receipt_language
|
string |
|
register_share
|
integer |
Registers given to the store (spec/LICENSE.md); one, or none when no register is left, if absent. |
tax_by_category
|
boolean |
Resolve tax codes by item category (spec/TAX.md); true by default for the us pack, false otherwise. |
profile
|
StoreProfile |
HubStore object
A store as the hub keeps it, with its node's state (null before a node registers).
Node object
id required
|
string (uuid) |
|
store_id required
|
string (uuid) |
|
status required
|
"active" | "revoked" |
|
version required
|
string |
The node's version at its last exchange. |
connected required
|
boolean |
An exchange is open now. |
last_seen_at required
|
string (date-time) | null |
|
hub_cursor required
|
integer (int64) |
The last hub seq the store applied. |
hub_head required
|
integer (int64) |
The hub's newest seq for this store; hub_head − hub_cursor is how far behind the store is. |
store_ack required
|
integer (int64) |
The last store seq the hub applied. |
store_head required
|
integer (int64) |
The store's newest seq at its last exchange; store_head − store_ack is what waits to arrive. |
certificate_expires_at required
|
string (date-time) |
|
registered_at required
|
string (date-time) |
|
health required
|
NodeHealth | null |
The store's last health report (spec/HEALTH.md), or null before the first. |
compatibility required
|
Compatibility | null |
Why the hub refuses this node at the exchange (spec/RELEASES.md, Compatibility), until it connects; null otherwise. |
NodeHealth object
reported_at required
|
string (date-time) |
|
started_at required
|
string (date-time) |
|
shifts_open required
|
integer |
|
oldest_shift_opened_at required
|
string (date-time) | null |
|
journal_pending required
|
integer (int64) |
|
search_queue required
|
integer (int64) |
|
redis_ok required
|
boolean |
|
tunnel_state required
|
"off" | "up" | "down" | null |
The store's tunnel to the hub (spec/NETWORK.md); null from a node that does not report it. |
audit_head required
|
object | null |
The head of the store's audit chain from its last report (spec/AUDIT.md, Anchors); null from a node that does not report it. |
update required
|
NodeUpdate | null |
The store's update from its last report (spec/RELEASES.md); null from a node that does not report it. |
apps required
|
array of AppVersionCount |
Per app, platform and version, how many of the store's devices run it, failed it and are silent, from its last report (spec/RELEASES.md, Reporting); empty from a node that does not report them. |
app_offers required
|
array of AppOffer |
The store's offers of the release it runs (spec/RELEASES.md, One device first). |
ItemPrice object
item_id required
|
string (uuid) |
|
store_id required
|
string (uuid) |
|
price required
|
StorePrice |
|
version required
|
integer (int64) |
HubTransfer @store:Transfer
HubTransferPage object
items required
|
array of HubTransfer |
|
next required
|
string | null |
HubInTransitLine @store:InTransitLine
NodeUpdate object
The update fields of a store's last health report (spec/HEALTH.md, spec/RELEASES.md).
running_version required
|
string |
|
previous_version required
|
string | null |
|
target_version required
|
string | null |
|
target_record_version required
|
integer (int64) |
|
state required
|
UpdateState |
|
state_since required
|
string (date-time) | null |
|
step required
|
UpdateStep | null |
|
error required
|
string | null |
|
healthz required
|
"ok" | "failing" | null |
|
backup required
|
UpdateBackup | null |
The pre-update archive of the target's attempt; null before it or from a node that does not report it. |
rehearsal required
|
UpdateRehearsal | null |
|
background_tasks_running required
|
integer |
The store's background tasks pending or running (spec/RELEASES.md, Migrations). |
background_tasks_failed required
|
integer |