iRetail PRO store node 1.0.0-m1: reports
12 операций
← Вся документация · Источник: контракты, openapi/store-v1.yaml на коммите 8000474.
Справочники на английском — на языке контрактов, из которых они созданы.
← iRetail PRO store node 1.0.0-m1
Операции
GET
/v1/reports/sales
Sales by day, employee, item, group or tender (spec/REPORTS.md).
operationId
salesReport · Право report.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). |
from обязательный
|
query | string (date-time) |
Start, inclusive (RFC 3339). |
to обязательный
|
query | string (date-time) |
End, exclusive (RFC 3339). |
group_by обязательный
|
query | "day" | "employee" | "item" | "group" | "tender" |
Row key. |
roll_up_variants
|
query | boolean |
By item: count a variant under its parent (spec/VARIANTS.md). |
Ответы
-
200OKSalesReport -
400Error (spec/API.md).Error -
401Error (spec/API.md).Error -
403Error (spec/API.md).Error
GET
/v1/reports/tax
Taxable base and tax by code, with SNAP, nontaxable sales and deposits (spec/REPORTS.md, "Tax").
operationId
taxReport · Право report.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). |
from обязательный
|
query | string (date) |
First business date, inclusive. |
to обязательный
|
query | string (date) |
Last business date, inclusive. |
Ответы
GET
/v1/reports/stock
Stock on hand with value at cost (spec/REPORTS.md).
operationId
stockReport · Право report.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). |
group_id
|
query | string (uuid) |
Only the items of this group. |
below_zero
|
query | boolean |
Only items on hand below zero. |
limit
|
query | integer |
Page size, 1–200. |
after
|
query | string |
Cursor from the previous page. |
Ответы
-
200OKStockReportPage -
400Error (spec/API.md).Error -
401Error (spec/API.md).Error -
403Error (spec/API.md).Error
GET
/v1/reports/movements
Stock movements in a period (spec/REPORTS.md).
operationId
movementsReport · Право report.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). |
from обязательный
|
query | string (date-time) |
Start, inclusive (RFC 3339). |
to обязательный
|
query | string (date-time) |
End, exclusive (RFC 3339). |
item_id
|
query | string (uuid) |
Only this item. |
limit
|
query | integer |
Page size, 1–200. |
after
|
query | string |
Cursor from the previous page. |
Ответы
-
200OKMovementPage -
400Error (spec/API.md).Error -
401Error (spec/API.md).Error -
403Error (spec/API.md).Error
GET
/v1/bonus-rules
Employee bonus rules (spec/REPORTS.md, Employee bonuses).
operationId
listBonusRules · Право bonus.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/bonus-rules
Add a bonus rule.
operationId
createBonusRule · Право bonus.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). |
Idempotency-Key
|
header | string |
spec/API.md, Idempotency. |
Тело запроса обязательный
application/jsonBonusRuleWrite
Ответы
PATCH
/v1/bonus-rules/{id}
Change a bonus rule; recorded lines keep their bonus.
operationId
patchBonusRule · Право bonus.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). |
id обязательный
|
path | string (uuid) |
Id. |
If-Match
|
header | string |
The version the change is based on. |
Тело запроса обязательный
application/jsonBonusRulePatch
Ответы
DELETE
/v1/bonus-rules/{id}
Delete a bonus rule.
operationId
deleteBonusRule · Право bonus.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). |
id обязательный
|
path | string (uuid) |
Id. |
If-Match
|
header | string |
The version the change is based on. |
Ответы
GET
/v1/reports/bonuses
Employee bonuses over [from, to) (spec/REPORTS.md).
operationId
bonusReport · Право bonus.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). |
from обязательный
|
query | string (date-time) |
Inclusive. |
to обязательный
|
query | string (date-time) |
Exclusive. |
Ответы
-
200OKBonusReport -
400Error (spec/API.md).Error -
401Error (spec/API.md).Error -
403Error (spec/API.md).Error
GET
/v1/reports/partners
Partners' revenue, margin and commission over [from, to) (spec/REPORTS.md).
operationId
partnerReport · Право report.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). |
from обязательный
|
query | string (date-time) |
Inclusive. |
to обязательный
|
query | string (date-time) |
Exclusive. |
Ответы
-
200OKPartnerReport -
400Error (spec/API.md).Error -
401Error (spec/API.md).Error -
403Error (spec/API.md).Error
GET
/v1/reports/restaurant
Checks closed in [from, to) with covers, revenue, averages, table time and tips (spec/REPORTS.md, Restaurant).
operationId
restaurantReport · Право report.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). |
from обязательный
|
query | string (date-time) |
Inclusive. |
to обязательный
|
query | string (date-time) |
Exclusive. |
group_by обязательный
|
query | "day" | "waiter" | "table" | "area" |
The rows. |
Ответы
-
200OKRestaurantReport -
400Error (spec/API.md).Error -
401Error (spec/API.md).Error -
403Error (spec/API.md).Error
GET
/v1/reports/service-charges
Service charges in [from, to) without their tax, the staff's part and the house's, by day, employee or charge; the payroll basis apart from tips (spec/REPORTS.md, Service charges).
operationId
serviceChargeReport · Право report.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). |
from обязательный
|
query | string (date-time) |
Inclusive. |
to обязательный
|
query | string (date-time) |
Exclusive. |
group_by обязательный
|
query | "day" | "employee" | "charge" |
The rows. |
Ответы
-
200OKServiceChargeReport -
400Error (spec/API.md).Error -
401Error (spec/API.md).Error -
403Error (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.
SalesMetrics object
spec/REPORTS.md, Sales. Rows by tender carry only amount.
sales
|
integer |
|
refunds
|
integer |
|
quantity_milli
|
integer (int64) |
|
gross
|
integer (int64) |
|
discounts
|
integer (int64) |
|
net
|
integer (int64) |
|
tax
|
integer (int64) |
|
revenue
|
integer (int64) |
|
cost
|
integer (int64) |
|
margin
|
integer (int64) |
|
margin_ppm
|
integer (int64) | null |
|
tips
|
integer (int64) |
|
service_charges
|
integer (int64) |
The receipts' service charges without their tax, by day or employee; 0 by item or group. |
amount
|
integer (int64) |
SalesReportRow @SalesMetrics & object
SalesReport object
group_by обязательный
|
"day" | "employee" | "item" | "group" | "tender" |
|
currency обязательный
|
string |
|
rows обязательный
|
array of SalesReportRow |
|
totals обязательный
|
SalesMetrics |
StockReportRow object
item_id обязательный
|
string (uuid) |
|
sku обязательный
|
string |
|
name обязательный
|
LocalizedText |
|
base_unit обязательный
|
"each" | "kg" | "lb" | "l" | "us_gal" | "m" | "ft" |
|
group_id
|
string (uuid) | null |
|
on_hand_milli обязательный
|
integer (int64) |
|
held_milli обязательный
|
integer (int64) |
|
available_milli обязательный
|
integer (int64) |
|
value_minor обязательный
|
integer (int64) |
Σ balance × unit cost / 1000, rounded per item. |
batches обязательный
|
integer |
Batches with a positive balance. |
nearest_expiry обязательный
|
string (date) | null |
StockReportPage object
items обязательный
|
array of StockReportRow |
|
next обязательный
|
string | null |
|
total_value_minor обязательный
|
integer (int64) |
The value of every row the filters select, across pages. |
Movement object
at обязательный
|
string (date-time) |
|
item_id обязательный
|
string (uuid) |
|
batch_id обязательный
|
string (uuid) |
|
quantity_milli обязательный
|
integer (int64) |
Signed; negative leaves stock. |
kind обязательный
|
"receiving" | "sale" | "refund" | "void" | "write_off" | "inventory_surplus" | "inventory_shortage" | "transfer_out" | "transfer_in" | "supplier_return" | "regrade_out" | "regrade_in" | "production_out" | "production_in" |
|
source_id обязательный
|
string (uuid) |
|
source_number обязательный
|
integer (int64) |
The document's or receipt's number. |
needs_review обязательный
|
boolean |
MovementPage object
items обязательный
|
array of Movement |
|
next обязательный
|
string | null |
TaxReport object
spec/REPORTS.md, "Tax".
from обязательный
|
string (date) |
|
to обязательный
|
string (date) |
|
codes обязательный
|
array of object |
|
net_sales_minor обязательный
|
integer (int64) |
|
nontaxable_sales_minor обязательный
|
integer (int64) |
|
snap_minor обязательный
|
integer (int64) |
|
deposit_minor обязательный
|
integer (int64) |
|
tax_minor обязательный
|
integer (int64) |
BonusRule object
spec/REPORTS.md, Employee bonuses; hub-owned in a chain.
id обязательный
|
string (uuid) |
|
name обязательный
|
string |
|
rate_ppm обязательный
|
integer |
|
item_ids обязательный
|
array of string (uuid) |
|
group_ids обязательный
|
array of string (uuid) |
|
starts_on обязательный
|
string (date) | null |
|
ends_on обязательный
|
string (date) | null |
|
active обязательный
|
boolean |
|
version обязательный
|
integer (int64) |
BonusRuleWrite object
name обязательный
|
string |
|
rate_ppm обязательный
|
integer |
|
item_ids
|
array of string (uuid) |
|
group_ids
|
array of string (uuid) |
|
starts_on
|
string (date) | null |
|
ends_on
|
string (date) | null |
|
active
|
boolean |
BonusRulePatch object
name
|
string |
|
rate_ppm
|
integer |
|
item_ids
|
array of string (uuid) |
|
group_ids
|
array of string (uuid) |
|
starts_on
|
string (date) | null |
|
ends_on
|
string (date) | null |
|
active
|
boolean |
BonusReport object
spec/REPORTS.md, Employee bonuses. The hub answers HubBonusReport (hub-v1.yaml), whose rows name their store and currency.
from обязательный
|
string (date-time) |
|
to обязательный
|
string (date-time) |
|
rows обязательный
|
array of object |
|
totals обязательный
|
object |
PartnerReport object
spec/REPORTS.md, Partners. The hub answers HubPartnerReport (hub-v1.yaml), whose rows name their store and currency.
from обязательный
|
string (date-time) |
|
to обязательный
|
string (date-time) |
|
rows обязательный
|
array of object |
|
totals обязательный
|
object |
RestaurantMetrics object
checks обязательный
|
integer |
|
covers обязательный
|
integer |
|
revenue обязательный
|
integer (int64) |
|
tips обязательный
|
integer (int64) |
|
service_charges обязательный
|
integer (int64) |
|
table_minutes обязательный
|
integer |
|
average_check обязательный
|
integer | null |
|
average_cover обязательный
|
integer | null |
|
average_minutes обязательный
|
integer | null |
RestaurantReportRow object
key обязательный
|
string | null |
The day, waiter, table or area; null for a tab by table or area. |
checks обязательный
|
integer |
|
covers обязательный
|
integer |
|
revenue обязательный
|
integer (int64) |
|
tips обязательный
|
integer (int64) |
|
service_charges обязательный
|
integer (int64) |
|
table_minutes обязательный
|
integer |
|
average_check обязательный
|
integer | null |
|
average_cover обязательный
|
integer | null |
|
average_minutes обязательный
|
integer | null |
RestaurantReport object
group_by обязательный
|
"day" | "waiter" | "table" | "area" |
|
currency обязательный
|
string |
|
rows обязательный
|
array of RestaurantReportRow |
|
totals обязательный
|
RestaurantMetrics |
ServiceChargeMetrics object
sales обязательный
|
integer |
|
refunds обязательный
|
integer |
|
removed обязательный
|
integer |
Charges removed by hand on the sales. |
amount_minor обязательный
|
integer (int64) |
|
tax_minor обязательный
|
integer (int64) |
|
to_staff_minor обязательный
|
integer (int64) |
|
house_minor обязательный
|
integer (int64) |
ServiceChargeReportRow object
key обязательный
|
string |
The local date, the employee id or the charge's id. |
sales обязательный
|
integer |
|
refunds обязательный
|
integer |
|
removed обязательный
|
integer |
|
amount_minor обязательный
|
integer (int64) |
|
tax_minor обязательный
|
integer (int64) |
|
to_staff_minor обязательный
|
integer (int64) |
|
house_minor обязательный
|
integer (int64) |
ServiceChargeReport object
group_by обязательный
|
"day" | "employee" | "charge" |
|
currency обязательный
|
string |
|
rows обязательный
|
array of ServiceChargeReportRow |
|
totals обязательный
|
ServiceChargeMetrics |