iRetail PRO store node 1.0.0-m1: items

11 операций

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

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

← iRetail PRO store node 1.0.0-m1

Операции

GET /v1/items Items with this store's prices.

operationId listItems · Право 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 Search in names, SKU, PLU, barcodes.
group_id query string (uuid) Group.
active query boolean Only active or inactive.
parent_id query string (uuid) A parent's variants (spec/VARIANTS.md).
kind_of query "parent" | "variant" | "plain" Only parents, only variants, or only items that are neither.
limit query integer Page size, 1–200.
after query string Cursor from the previous page.

Ответы

POST /v1/items Create an item.

operationId createItem · Право 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).
Approval-Token header string One-time approval from POST /v1/approvals for this operation's permission.

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

Ответы

  • 201 OK Item
  • 400 Error (spec/API.md). Error
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 409 Error (spec/API.md). Error
GET /v1/items/lookup Resolve a scanned or typed code: barcode, pack barcode, variable-measure barcode, PLU or SKU.

For a code the app knows is a product's (its own catalog copy has it, or it has a product barcode's shape). A scan the app did not find may be a loyalty card, a gift card or a voucher code, and goes by POST, never in a URL (spec/API.md, Transport).

operationId lookupItem · Право 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).
code обязательный query string The code.

Ответы

  • 200 OK Lookup
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 404 Error (spec/API.md). Error
POST /v1/items/lookup The same lookup with the code in the body.

The form an app uses for any scan its own catalog copy did not find: such a code may be a loyalty card, a gift card or a voucher code, and a URL's query is kept by proxies and access logs (spec/API.md, Transport). The same permission and answer as GET; the node logs no code.

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

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

Ответы

  • 200 OK Lookup
  • 400 Error (spec/API.md). Error
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 404 Error (spec/API.md). Error
GET /v1/items/{id} One item.

operationId getItem · Право 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).
id обязательный path string (uuid) Id.

Ответы

  • 200 OK Item
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 404 Error (spec/API.md). Error
PATCH /v1/items/{id} Change an item.

operationId patchItem · Право 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.
If-Match header string The version the change is based on.
Approval-Token header string One-time approval from POST /v1/approvals for this operation's permission.

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

Ответы

  • 200 OK Item
  • 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
POST /v1/items/{id}/variants Make the variants a parent lacks (spec/VARIANTS.md).

operationId createVariants · Право 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.
Approval-Token header string One-time approval from POST /v1/approvals for this operation's permission.

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

Ответы

  • 201 The variants made, in order. VariantsCreated
  • 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
  • 422 Error (spec/API.md). Error
PUT /v1/items/{id}/price Set this store's price of an item.

operationId putPrice · Право price.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.
Approval-Token header string One-time approval from POST /v1/approvals for this operation's permission.

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

Ответы

  • 200 OK Item
  • 400 Error (spec/API.md). Error
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 404 Error (spec/API.md). Error
POST /v1/item-photos Keep a JPEG or WebP photo of at most 512 KB for an item to name, its EXIF and XMP removed (spec/PUBLIC_API.md, The storefront); kept by the catalog's owner, 409 owned_by_hub at a store of a chain.

operationId uploadItemPhoto · Право 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).
Idempotency-Key header string spec/API.md, Idempotency.

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

  • image/jpeg string (binary)
  • image/webp string (binary)

Ответы

  • 201 OK ItemPhoto
  • 400 Error (spec/API.md). Error
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 409 Error (spec/API.md). Error
  • 413 Error (spec/API.md). Error
  • 422 Error (spec/API.md). Error
GET /v1/item-photos/{id} An item photo's bytes with its ETag; 304 for a matching If-None-Match; photos do not cross to stores of a chain (404 there).

operationId getItemPhoto · Право 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).
id обязательный path string (uuid)
If-None-Match header string The ETag the caller holds.

Ответы

  • 200 The photo. string (binary)
  • 304 Not modified.
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 404 Error (spec/API.md). Error
DELETE /v1/item-photos/{id} Delete a photo no item names (409 photo_in_use otherwise).

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

Ответы

  • 204 Done
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 404 Error (spec/API.md). Error
  • 409 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

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)

ItemCreate object

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 string (uuid) Tag ids; sets the item's tags (spec/SEARCH.md, Tags).
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
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.

ItemPatch object

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 string (uuid) Tag ids; sets the item's tags (spec/SEARCH.md, Tags).
variant_options array of VariantOption On a parent, its options in order (spec/VARIANTS.md); empty on every other item.
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.

VariantValue object

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

VariantOption object

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

VariantsCreate object

combinations обязательный array of map of string | null Option code to value code for each variant to make; null for every combination.
price_minor обязательный integer (int64) | null The variants' price; null for the parent's.

VariantsCreated object

items обязательный array of Item

PricePut object

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

Lookup object

What a scanned or typed code means; quantity and price come from a pack or a variable-measure barcode.

item обязательный Item
source обязательный "barcode" | "pack_barcode" | "variable_measure" | "plu" | "sku"
quantity_milli обязательный integer (int64) | null
price_minor обязательный integer (int64) | null

ItemPage object

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

ItemTag object

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

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)

ItemLookup object

A scanned or typed code; never logged or kept.

code обязательный string As scanned or typed, the same text GET's code takes.

ItemPhoto object

id обязательный string (uuid)
content_type обязательный "image/jpeg" | "image/webp"
bytes обязательный integer
width обязательный integer
height обязательный integer
etag обязательный string
created_at обязательный string (date-time)