iRetail PRO store node 1.0.0-m1: stock

4 операции

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

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

← iRetail PRO store node 1.0.0-m1

Операции

GET /v1/stock On hand, held and available by item.

operationId listStock · Право stock.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).
item_id query string (uuid) Only this item.
limit query integer Page size, 1–200.
after query string Cursor from the previous page.

Ответы

GET /v1/stock/{item_id} Stock of one item with its batches.

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

Ответы

  • 200 OK Stock
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 404 Error (spec/API.md). Error
GET /v1/serials/{serial} The item serials that match a serial number, with their history (spec/VARIANTS.md).

operationId getSerial · Право stock.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).
serial обязательный path string The serial as read; normalized before the search.

Ответы

GET /v1/stock/in-transit Lines of transfers from or to this store that are in transit.

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

Ответы

Схемы

Error object

Every error response.

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

SerialEvent object

event обязательный "received" | "sold" | "returned" | "voided" | "written_off"
at обязательный string (date-time)
document_id обязательный string (uuid) | null
receipt_id обязательный string (uuid) | null
overridden обязательный boolean Sold through a one-time approval for serial.override.
conflict обязательный boolean Sold offline although a sale online would have refused it.

SerialRecord object

item_id обязательный string (uuid)
serial обязательный string
state обязательный "in_stock" | "sold" | "written_off"
history обязательный array of SerialEvent Newest first.

SerialLookup object

serials обязательный array of SerialRecord

Batch object

id обязательный string (uuid)
item_id обязательный string (uuid)
lot обязательный string | null
expires_on обязательный string (date) | null
received_at обязательный string (date-time)
unit_cost_minor обязательный integer (int64)
cost_currency обязательный string
balance_milli обязательный integer (int64)
needs_review обязательный boolean
price_minor обязательный integer (int64) | null The batch's own sale price; null sells at the store price (spec/PRICING.md, Batch prices).

Stock object

item_id обязательный string (uuid)
base_unit обязательный "each" | "kg" | "lb" | "l" | "us_gal" | "m" | "ft"
on_hand_milli обязательный integer (int64)
held_milli обязательный integer (int64)
available_milli обязательный integer (int64)
batches array of Batch
kit boolean A kit's stock, computed from its components (spec/STOCK.md, Kits); it has no batches.

StockPage object

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

InTransitLine object

A line of a posted transfer not yet received.

transfer_id обязательный string (uuid)
number обязательный integer (int64)
from_store_id обязательный string (uuid)
to_store_id обязательный string (uuid)
shipped_at обязательный string (date-time)
line_no обязательный integer
item_id обязательный string (uuid)
quantity_milli обязательный integer (int64)
cost_minor обязательный integer (int64)
cost_currency обязательный string