iRetail PRO hub 1.0.0-m5: change-requests
3 operations
← All documentation · Source: contracts openapi/hub-v1.yaml at 8000474.
Stores' requests for hub-owned changes.
Operations
GET
/v1/change-requests
Stores' change requests, pending first.
operationId
listHubChangeRequests · Permission request.resolve
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). |
status
|
query | ChangeRequestStatus |
|
store_id
|
query | string (uuid) |
|
limit
|
query | integer |
|
after
|
query | string |
The cursor of the previous page. |
Responses
POST
/v1/change-requests/{id}/approve
Make the proposed record the hub's (same id); it reaches every store it concerns.
operationId
approveChangeRequest · Permission request.resolve
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. |
Responses
POST
/v1/change-requests/{id}/refuse
Refuse a request with a reason the store sees.
operationId
refuseChangeRequest · Permission request.resolve
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/jsonobject
Responses
Schemas
ChangeRequestStatus "pending" | "approved" | "refused"
pending · approved · refused
ChangeRequest object
id required
|
string (uuid) |
|
store_id required
|
string (uuid) |
|
kind required
|
"item" | "price" |
|
record_id required
|
string (uuid) |
The proposed record's id, kept if approved. |
proposed required
|
object |
The proposed record (an Item without its price, or a StorePrice with item_id). |
reason required
|
string |
|
status required
|
ChangeRequestStatus |
|
resolution_reason required
|
string | null |
|
created_by required
|
string (uuid) |
The store employee who asked. |
created_at required
|
string (date-time) |
|
resolved_by required
|
string (uuid) | null |
|
resolved_at required
|
string (date-time) | null |
|
version required
|
integer (int64) |