iRetail PRO store node 1.0.0-m1: search

8 операций

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

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

← iRetail PRO store node 1.0.0-m1

Операции

GET /v1/search/items Search the catalog by meaning, exact matches first (spec/SEARCH.md, Searching); the license module search.

operationId searchItems · Право item.read

Параметры

Имя Где Тип Описание
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).
q обязательный query string The query.
group_id query string (uuid) Only items in this group or below it.
tag_id query string (uuid) Only items carrying this tag.
store_id query string (uuid) The store whose price the items carry; a store node uses its own store when absent.
include_inactive query boolean Inactive items too.
limit query integer Items to answer, 1–50.

Ответы

GET /v1/search/suggestions Tags and groups the node suggests for items, newest first (spec/SEARCH.md, Suggestions).

operationId listSuggestions · Право item.read

Параметры

Имя Где Тип Описание
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 "open" | "accepted" | "dismissed" Open by default.
kind query "tag" | "group"
item_id query string (uuid) One item's suggestions.
limit query integer Page size, 1–200.
after query string Cursor from the previous page.

Ответы

POST /v1/search/suggestions/{id}/accept Give the item the tag or the group, as an edit of the item by the caller.

operationId acceptSuggestion · Право item.edit

Параметры

Имя Где Тип Описание
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/search/suggestions/{id}/dismiss Do not suggest it again for the item.

operationId dismissSuggestion · Право item.edit

Параметры

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

Ответы

GET /v1/search/settings The embedding provider and the suggestions' settings (spec/SEARCH.md); never the key.

operationId getSearchSettings · Право search.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).

Ответы

PUT /v1/search/settings Set search up; a change of the model starts a new index.

operationId putSearchSettings · Право search.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/search/index The active index and the one building, with their progress.

operationId getSearchIndex · Право item.read

Параметры

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

Ответы

POST /v1/search/index/rebuild Start a new index with the settings' model; the active one answers until it is ready.

operationId rebuildSearchIndex · Право search.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).

Ответы

Схемы

Error object

Every error response.

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

LocalizedText map of string

Text by language code; the organization's default language must be present.

Barcode object

A barcode of the item or of a pack of it.

barcode обязательный string
pack_quantity_milli обязательный integer (int64)

StorePrice object

price_minor обязательный integer (int64)
currency обязательный string

ModifierOption object

id обязательный string
name обязательный LocalizedText
price_delta_minor обязательный integer (int64) Added to the item's price; may be negative.

ModifierGroup object

id обязательный string
name обязательный LocalizedText
min обязательный integer
max обязательный integer
options обязательный array of ModifierOption

Item object

id обязательный string (uuid)
sku обязательный string
plu обязательный string | null
name обязательный LocalizedText
kind обязательный "piece" | "weighed" | "variable_weight" | "service" | "kit" | "gift_card" A kit takes its components' stock at the sale (spec/STOCK.md, Kits); a gift card line sells stored value (spec/LOYALTY.md, Gift cards).
base_unit обязательный "each" | "kg" | "lb" | "l" | "us_gal" | "m" | "ft"
tax_codes обязательный array of string
group_id обязательный string (uuid) | null
profile обязательный string | null
attributes обязательный object Profile fields (JSON), validated by the profile's schema.
stock_policy обязательный "fifo" | "fefo"
discountable обязательный boolean
active обязательный boolean
barcodes обязательный array of Barcode
modifier_groups обязательный array of ModifierGroup Options a line of the item takes (spec/FOOD_SERVICE.md).
tags обязательный array of ItemTag The item's tags in the order of their ids (spec/SEARCH.md, Tags).
price обязательный StorePrice | null
variant_options обязательный array of VariantOption On a parent, its options in order (spec/VARIANTS.md); empty on every other item.
parent_id обязательный string (uuid) | null On a variant, its parent (spec/VARIANTS.md); set when the item is made.
variant_values обязательный map of string | null On a variant, a value code for each of the parent's option codes.
serial_tracked обязательный boolean Each unit's serial is recorded at receiving, sale, return and write-off (spec/VARIANTS.md).
photo_id string (uuid) | null The item's photo (POST /v1/item-photos) for the storefront, or null; absent from a node before 1.1.
kit_components обязательный array of Component A kit's components, 1 to 20 (spec/STOCK.md, Kits); empty on every other item. Each is taxed as the kit is (its tax_category and tax_codes) and carries no deposit, or the save is refused with kit_tax_mixed.
version обязательный integer (int64)

VariantValue object

code обязательный string
name обязательный LocalizedText

VariantOption object

code обязательный string
name обязательный LocalizedText
values обязательный array of VariantValue

ItemTag object

tag_id обязательный string (uuid)
source обязательный "manual" | "suggested"
confidence обязательный integer | null The accepted suggestion's confidence; null when manual.

SearchHit object

item обязательный Item
match обязательный "exact" | "semantic"
available_milli обязательный integer (int64) | null Available quantity on a store node (spec/STOCK.md); null at the hub.

SearchIndex object

id обязательный string (uuid)
model обязательный string bge-m3, or the endpoint's model with its host.
dimensions обязательный integer
indexed обязательный integer (int64)
total обязательный integer (int64)
started_at обязательный string (date-time)
ready_at обязательный string (date-time) | null

SearchIndexStatus object

active обязательный null | SearchIndex
building обязательный null | SearchIndex

SearchResult object

items обязательный array of SearchHit
index обязательный SearchIndex

SearchProvider object

kind обязательный "local" | "openai_compatible"
base_url string openai_compatible only, answered from IRETAIL_SEARCH_KEY_<NAME>_BASE_URL; a value written is ignored (spec/SEARCH.md, Settings).
model string openai_compatible only.
dimensions integer openai_compatible only.
max_input_tokens integer openai_compatible only.
key string openai_compatible only. The key's name, or none; the node reads IRETAIL_SEARCH_KEY_<NAME> (spec/SEARCH.md). Never the key.

SearchSuggestionSettings object

enabled обязательный boolean
neighbors обязательный integer
min_score обязательный integer
min_confidence обязательный integer

SearchSettingsPut object

provider обязательный SearchProvider
suggestions обязательный SearchSuggestionSettings

SearchSettings object

provider обязательный SearchProvider
suggestions обязательный SearchSuggestionSettings
key_present обязательный boolean Whether the node holds the named key, or none is needed.
version обязательный integer

SuggestionResolver object

id обязательный string (uuid)
name обязательный string

Suggestion object

A tag or a group the node suggests for an item (spec/SEARCH.md, Suggestions).

id обязательный string (uuid)
item_id обязательный string (uuid)
item_name обязательный LocalizedText
kind обязательный "tag" | "group"
target_id обязательный string (uuid)
target_name обязательный LocalizedText
confidence обязательный integer
status обязательный "open" | "accepted" | "dismissed"
created_at обязательный string (date-time)
resolved_at обязательный string (date-time) | null
resolved_by обязательный null | SuggestionResolver

SuggestionPage object

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

Component object

A kit's or a recipe's component: how much of the item (spec/STOCK.md).

item_id обязательный string (uuid)
quantity_milli обязательный integer (int64)