iRetail PRO store node 1.0.0-m1: holds
4 операции
← Вся документация · Источник: контракты, openapi/store-v1.yaml на коммите 8000474.
Справочники на английском — на языке контрактов, из которых они созданы.
← iRetail PRO store node 1.0.0-m1
Операции
GET
/v1/holds
Active hard holds.
operationId
listHolds · Право 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. |
Ответы
POST
/v1/holds
Place a hard hold (spec/STOCK.md).
operationId
createHold · Право stock.hold
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
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. |
Approval-Token
|
header | string |
One-time approval from POST /v1/approvals for this operation's permission. |
Тело запроса обязательный
application/jsonHoldCreate
Ответы
POST
/v1/holds/{id}/extend
Extend a hold by the store's TTL.
operationId
extendHold · Право stock.hold
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
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. |
Ответы
DELETE
/v1/holds/{id}
Release a hold.
operationId
releaseHold · Право stock.hold
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
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. |
Ответы
Схемы
Error object
Every error response.
error обязательный
|
string |
Stable code, see spec/API.md. |
message обязательный
|
string |
English text for logs. |
details
|
object |
Hold object
id обязательный
|
string (uuid) |
|
item_id обязательный
|
string (uuid) |
|
quantity_milli обязательный
|
integer (int64) |
|
workplace_id обязательный
|
string (uuid) | null |
|
expires_at обязательный
|
string (date-time) |
|
split
|
array of PriceSplitLine |
The item's price split for the quantity held, when its batches carry prices of their own (spec/PRICING.md). |
HoldCreate object
item_id обязательный
|
string (uuid) |
|
quantity_milli обязательный
|
integer (int64) |
At most 10^12 (spec/API.md, Payments; 422 amount_too_large). |
ReceiptLineBatch object
batch_id обязательный
|
string (uuid) |
|
quantity_milli обязательный
|
integer (int64) |
|
item_id
|
string (uuid) |
A kit line's component the batch belongs to (spec/STOCK.md, Kits). |
PriceSplitLine object
One line of the price split (spec/PRICING.md, Batch prices).
unit_price_minor обязательный
|
integer (int64) |
|
quantity_milli обязательный
|
integer (int64) |
|
batches обязательный
|
array of ReceiptLineBatch |