iRetail PRO store node 1.0.0-m1: proposals

4 операции

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

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

← iRetail PRO store node 1.0.0-m1

Операции

GET /v1/proposals Changes agents proposed that the caller asked for or may approve, newest first (spec/MCP.md).

operationId listProposals

Параметры

Имя Где Тип Описание
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 "pending" | "approved" | "refused" | "failed" Only proposals in this state.
limit query integer Page size, 1–200.
after query string Cursor from the previous page.

Ответы

GET /v1/proposals/{id} One proposal.

operationId getProposal

Параметры

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

Ответы

POST /v1/proposals/{id}/approve Carry the change out as the approver; a refusal of the domain leaves it failed with the error.

Only an employee's session token approves (403 forbidden, details principal employee, for a device's or an integration's), never the kind of principal that proposed (details reason proposer); no GraphQL mutation or MCP tool stands for this operation. The approver must hold every permission the proposal names, checked before the proposal's state (spec/MCP.md, Proposals).

operationId approveProposal

Параметры

Имя Где Тип Описание
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 обязательный path string (uuid) Id.
If-Match header string The version the change is based on.

Ответы

  • 200 OK Proposal
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 404 Error (spec/API.md). Error
  • 409 Error (spec/API.md). Error
  • 412 Error (spec/API.md). Error
POST /v1/proposals/{id}/refuse Refuse a proposal with a reason.

The refuser must hold every permission the proposal names.

operationId refuseProposal

Параметры

Имя Где Тип Описание
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 обязательный path string (uuid) Id.
If-Match header string The version the change is based on.

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

  • application/json object

Ответы

  • 200 OK Proposal
  • 400 Error (spec/API.md). Error
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 404 Error (spec/API.md). Error
  • 409 Error (spec/API.md). Error
  • 412 Error (spec/API.md). Error

Схемы

Error object

Every error response.

error обязательный string Stable code, see spec/API.md.
message обязательный string English text for logs.
details object

Proposal object

A change an agent proposed, waiting for a person (spec/MCP.md).

id обязательный string (uuid)
tool обязательный string
arguments обязательный object
summary обязательный string
permissions обязательный array of string
origin обязательный "assistant" | "mcp"
conversation_id обязательный string (uuid) | null
created_by обязательный object
status обязательный "pending" | "approved" | "refused" | "failed"
result обязательный object | null
error обязательный null | Error
reason обязательный string | null
created_at обязательный string (date-time)
resolved_by обязательный string (uuid) | null
resolved_at обязательный string (date-time) | null
version обязательный integer

ProposalPage object

items обязательный array of Proposal
next обязательный string | null