iRetail PRO store node 1.0.0-m1: assistant

8 operations

← All documentation · Source: contracts openapi/store-v1.yaml at 8000474.

← iRetail PRO store node 1.0.0-m1

Operations

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

operationId getAssistantSettings · Permission assistant.use

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

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

operationId putAssistantSettings · Permission assistant.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).
If-Match header string The version the change is based on.

Request body required

Responses

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

operationId listConversations · Permission assistant.use

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).
limit query integer Page size, 1–200.
after query string Cursor from the previous page.

Responses

POST /v1/assistant/conversations Start a conversation.

operationId createConversation · Permission assistant.use

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).

Request body required

  • application/json object

Responses

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

operationId getConversation · Permission assistant.use

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

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

operationId deleteConversation · Permission assistant.use

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

  • 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 · Permission assistant.use

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.

Request body required

  • application/json object

Responses

  • 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 · Permission assistant.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).
conversation_id query string (uuid) One conversation's calls.
limit query integer Page size, 1–200.
after query string Cursor from the previous page.

Responses

Schemas

Error object

Every error response.

error required string Stable code, see spec/API.md.
message required string English text for logs.
details object

AssistantProvider object

kind required "openai" | "anthropic" | "gemini" | "openai_compatible"
model required string
base_url required 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 required 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 required integer
cached_input required integer
cache_write required integer
output required integer

AssistantSettingsPut object

enabled required boolean
provider required null | AssistantProvider
share_rows required boolean
context_limit required integer
compact_at required integer
result_budget required integer
prices required AssistantPrices

AssistantSettings object

enabled required boolean
provider required null | AssistantProvider
share_rows required boolean
context_limit required integer
compact_at required integer
result_budget required integer
prices required AssistantPrices
key_present required boolean Whether the node holds the named key.
version required integer

AssistantUsage object

input_tokens required integer
cached_tokens required integer
cache_write_tokens required integer
output_tokens required integer
cost required integer | null Micro-dollars; null when a call had no price.

ConversationSummary object

id required string (uuid)
title required string
status required "idle" | "running" | "failed"
created_at required string (date-time)
updated_at required string (date-time)

ConversationPage object

items required array of ConversationSummary
next required string | null

AssistantToolCall object

id required string
name required string
arguments required object

AssistantMessage object

id required string (uuid)
role required "user" | "assistant" | "tool"
text required string
tool_calls required array of AssistantToolCall
tool required string | null
result required object | null What is kept of a tool's result (a stub without rows, spec/ASSISTANT.md).
proposals required array of string (uuid)
created_at required string (date-time)

Conversation object

id required string (uuid)
title required string
status required "idle" | "running" | "failed"
error required null | Error
summary required string | null The earlier turns' summary once compacted.
messages required array of AssistantMessage
usage required AssistantUsage
created_at required string (date-time)
updated_at required string (date-time)

AssistantCall object

id required string (uuid)
conversation_id required string (uuid) | null
employee_id required string (uuid) | null
provider required string
model required string
input_tokens required integer
cached_tokens required integer
cache_write_tokens required integer
output_tokens required integer
request_bytes required integer
status required "ok" | "error"
cost required integer | null
at required string (date-time)

AssistantCallPage object

items required array of AssistantCall
next required string | null