iRetail PRO hub 1.0.0-m5: change-requests

3 операции

← Вся документация · Источник: контракты, openapi/hub-v1.yaml на коммите 8000474.

Справочники на английском — на языке контрактов, из которых они созданы.

Stores' requests for hub-owned changes.

← iRetail PRO hub 1.0.0-m5

Операции

GET /v1/change-requests Stores' change requests, pending first.

operationId listHubChangeRequests · Право request.resolve

Параметры

Имя Где Тип Описание
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.

Ответы

  • 200 OK object
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
POST /v1/change-requests/{id}/approve Make the proposed record the hub's (same id); it reaches every store it concerns.

operationId approveChangeRequest · Право request.resolve

Параметры

Имя Где Тип Описание
id обязательный 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.

Ответы

POST /v1/change-requests/{id}/refuse Refuse a request with a reason the store sees.

operationId refuseChangeRequest · Право request.resolve

Параметры

Имя Где Тип Описание
id обязательный 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.

Тело запроса обязательный

  • application/json object

Ответы

Схемы

ChangeRequestStatus "pending" | "approved" | "refused"

pending · approved · refused

ChangeRequest object

id обязательный string (uuid)
store_id обязательный string (uuid)
kind обязательный "item" | "price"
record_id обязательный string (uuid) The proposed record's id, kept if approved.
proposed обязательный object The proposed record (an Item without its price, or a StorePrice with item_id).
reason обязательный string
status обязательный ChangeRequestStatus
resolution_reason обязательный string | null
created_by обязательный string (uuid) The store employee who asked.
created_at обязательный string (date-time)
resolved_by обязательный string (uuid) | null
resolved_at обязательный string (date-time) | null
version обязательный integer (int64)