iRetail PRO store node 1.0.0-m1: stock
4 operations
← All documentation · Source: contracts openapi/store-v1.yaml at 8000474.
← iRetail PRO store node 1.0.0-m1
Operations
GET
/v1/stock
On hand, held and available by item.
operationId
listStock · Permission stock.read
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). |
item_id
|
query | string (uuid) |
Only this item. |
limit
|
query | integer |
Page size, 1–200. |
after
|
query | string |
Cursor from the previous page. |
Responses
GET
/v1/stock/{item_id}
Stock of one item with its batches.
operationId
getStock · Permission stock.read
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). |
item_id required
|
path | string (uuid) |
Item id. |
Responses
GET
/v1/serials/{serial}
The item serials that match a serial number, with their history (spec/VARIANTS.md).
operationId
getSerial · Permission stock.read
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). |
serial required
|
path | string |
The serial as read; normalized before the search. |
Responses
-
200OKSerialLookup -
400Error (spec/API.md).Error -
401Error (spec/API.md).Error -
403Error (spec/API.md).Error
GET
/v1/stock/in-transit
Lines of transfers from or to this store that are in transit.
operationId
listInTransit · Permission stock.read
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
-
200OKarray of InTransitLine -
401Error (spec/API.md).Error -
403Error (spec/API.md).Error
Schemas
Error object
Every error response.
error required
|
string |
Stable code, see spec/API.md. |
message required
|
string |
English text for logs. |
details
|
object |
SerialEvent object
event required
|
"received" | "sold" | "returned" | "voided" | "written_off" |
|
at required
|
string (date-time) |
|
document_id required
|
string (uuid) | null |
|
receipt_id required
|
string (uuid) | null |
|
overridden required
|
boolean |
Sold through a one-time approval for serial.override. |
conflict required
|
boolean |
Sold offline although a sale online would have refused it. |
SerialRecord object
item_id required
|
string (uuid) |
|
serial required
|
string |
|
state required
|
"in_stock" | "sold" | "written_off" |
|
history required
|
array of SerialEvent |
Newest first. |
SerialLookup object
serials required
|
array of SerialRecord |
Batch object
id required
|
string (uuid) |
|
item_id required
|
string (uuid) |
|
lot required
|
string | null |
|
expires_on required
|
string (date) | null |
|
received_at required
|
string (date-time) |
|
unit_cost_minor required
|
integer (int64) |
|
cost_currency required
|
string |
|
balance_milli required
|
integer (int64) |
|
needs_review required
|
boolean |
|
price_minor required
|
integer (int64) | null |
The batch's own sale price; null sells at the store price (spec/PRICING.md, Batch prices). |
Stock object
item_id required
|
string (uuid) |
|
base_unit required
|
"each" | "kg" | "lb" | "l" | "us_gal" | "m" | "ft" |
|
on_hand_milli required
|
integer (int64) |
|
held_milli required
|
integer (int64) |
|
available_milli required
|
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 required
|
array of Stock |
|
next required
|
string | null |
InTransitLine object
A line of a posted transfer not yet received.
transfer_id required
|
string (uuid) |
|
number required
|
integer (int64) |
|
from_store_id required
|
string (uuid) |
|
to_store_id required
|
string (uuid) |
|
shipped_at required
|
string (date-time) |
|
line_no required
|
integer |
|
item_id required
|
string (uuid) |
|
quantity_milli required
|
integer (int64) |
|
cost_minor required
|
integer (int64) |
|
cost_currency required
|
string |