iRetail PRO store node 1.0.0-m1: assistant

8 операций

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

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

← iRetail PRO store node 1.0.0-m1

Операции

GET /v1/assistant/settings The assistant's provider, model, data policy and prices (spec/ASSISTANT.md); never the key.

operationId getAssistantSettings · Право assistant.use

Параметры

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

Ответы

PUT /v1/assistant/settings Set the assistant up.

operationId putAssistantSettings · Право assistant.manage

Параметры

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

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

Ответы

GET /v1/assistant/conversations The caller's conversations, newest first.

operationId listConversations · Право assistant.use

Параметры

Имя Где Тип Описание
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 Page size, 1–200.
after query string Cursor from the previous page.

Ответы

POST /v1/assistant/conversations Start a conversation.

operationId createConversation · Право assistant.use

Параметры

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

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

  • application/json object

Ответы

GET /v1/assistant/conversations/{id} One of the caller's conversations with its messages.

operationId getConversation · Право assistant.use

Параметры

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

Ответы

DELETE /v1/assistant/conversations/{id} Delete one of the caller's conversations.

operationId deleteConversation · Право assistant.use

Параметры

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

Ответы

  • 204 Done
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 404 Error (spec/API.md). Error
POST /v1/assistant/conversations/{id}/messages Say something; the turn runs on the node and the conversation is read again until it is idle or failed.

operationId postMessage · Право assistant.use

Параметры

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

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

  • application/json object

Ответы

  • 202 The turn started Conversation
  • 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
GET /v1/assistant/calls The log of requests to the provider, newest first; never a prompt, a key or a result.

operationId listAssistantCalls · Право assistant.manage

Параметры

Имя Где Тип Описание
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).
conversation_id query string (uuid) One conversation's calls.
limit query integer Page size, 1–200.
after query string Cursor from the previous page.

Ответы

Схемы

Error object

Every error response.

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

AssistantProvider object

kind обязательный "openai" | "anthropic" | "gemini" | "openai_compatible"
model обязательный string
base_url обязательный string | null openai_compatible only, answered from IRETAIL_ASSISTANT_KEY_<NAME>_BASE_URL (null when unset); a value written is ignored, so the settings never send a key elsewhere (spec/ASSISTANT.md, Settings).
key обязательный string The key's name; the node reads IRETAIL_ASSISTANT_KEY_<NAME> (spec/ASSISTANT.md). Never the key.

AssistantPrices object

Cents per million tokens.

input обязательный integer
cached_input обязательный integer
cache_write обязательный integer
output обязательный integer

AssistantSettingsPut object

enabled обязательный boolean
provider обязательный null | AssistantProvider
share_rows обязательный boolean
context_limit обязательный integer
compact_at обязательный integer
result_budget обязательный integer
prices обязательный AssistantPrices

AssistantSettings object

enabled обязательный boolean
provider обязательный null | AssistantProvider
share_rows обязательный boolean
context_limit обязательный integer
compact_at обязательный integer
result_budget обязательный integer
prices обязательный AssistantPrices
key_present обязательный boolean Whether the node holds the named key.
version обязательный integer

AssistantUsage object

input_tokens обязательный integer
cached_tokens обязательный integer
cache_write_tokens обязательный integer
output_tokens обязательный integer
cost обязательный integer | null Micro-dollars; null when a call had no price.

ConversationSummary object

id обязательный string (uuid)
title обязательный string
status обязательный "idle" | "running" | "failed"
created_at обязательный string (date-time)
updated_at обязательный string (date-time)

ConversationPage object

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

AssistantToolCall object

id обязательный string
name обязательный string
arguments обязательный object

AssistantMessage object

id обязательный string (uuid)
role обязательный "user" | "assistant" | "tool"
text обязательный string
tool_calls обязательный array of AssistantToolCall
tool обязательный string | null
result обязательный object | null What is kept of a tool's result (a stub without rows, spec/ASSISTANT.md).
proposals обязательный array of string (uuid)
created_at обязательный string (date-time)

Conversation object

id обязательный string (uuid)
title обязательный string
status обязательный "idle" | "running" | "failed"
error обязательный null | Error
summary обязательный string | null The earlier turns' summary once compacted.
messages обязательный array of AssistantMessage
usage обязательный AssistantUsage
created_at обязательный string (date-time)
updated_at обязательный string (date-time)

AssistantCall object

id обязательный string (uuid)
conversation_id обязательный string (uuid) | null
employee_id обязательный string (uuid) | null
provider обязательный string
model обязательный string
input_tokens обязательный integer
cached_tokens обязательный integer
cache_write_tokens обязательный integer
output_tokens обязательный integer
request_bytes обязательный integer
status обязательный "ok" | "error"
cost обязательный integer | null
at обязательный string (date-time)

AssistantCallPage object

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