iRetail PRO store node 1.0.0-m1: reports

12 operations

← All documentation · Source: contracts openapi/store-v1.yaml at 8000474.

← iRetail PRO store node 1.0.0-m1

Operations

GET /v1/reports/sales Sales by day, employee, item, group or tender (spec/REPORTS.md).

operationId salesReport · Permission report.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).
from required query string (date-time) Start, inclusive (RFC 3339).
to required query string (date-time) End, exclusive (RFC 3339).
group_by required query "day" | "employee" | "item" | "group" | "tender" Row key.
roll_up_variants query boolean By item: count a variant under its parent (spec/VARIANTS.md).

Responses

GET /v1/reports/tax Taxable base and tax by code, with SNAP, nontaxable sales and deposits (spec/REPORTS.md, "Tax").

operationId taxReport · Permission report.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).
from required query string (date) First business date, inclusive.
to required query string (date) Last business date, inclusive.

Responses

GET /v1/reports/stock Stock on hand with value at cost (spec/REPORTS.md).

operationId stockReport · Permission report.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).
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.

Responses

GET /v1/reports/movements Stock movements in a period (spec/REPORTS.md).

operationId movementsReport · Permission report.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).
from required query string (date-time) Start, inclusive (RFC 3339).
to required 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.

Responses

GET /v1/bonus-rules Employee bonus rules (spec/REPORTS.md, Employee bonuses).

operationId listBonusRules · Permission bonus.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

POST /v1/bonus-rules Add a bonus rule.

operationId createBonusRule · Permission bonus.manage

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).
Idempotency-Key header string spec/API.md, Idempotency.

Request body required

Responses

  • 201 OK BonusRule
  • 400 Error (spec/API.md). Error
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 409 Error (spec/API.md). Error
  • 422 Error (spec/API.md). Error
PATCH /v1/bonus-rules/{id} Change a bonus rule; recorded lines keep their bonus.

operationId patchBonusRule · Permission bonus.manage

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).
id required path string (uuid) Id.
If-Match header string The version the change is based on.

Request body required

Responses

  • 200 OK BonusRule
  • 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
  • 422 Error (spec/API.md). Error
DELETE /v1/bonus-rules/{id} Delete a bonus rule.

operationId deleteBonusRule · Permission bonus.manage

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).
id required path string (uuid) Id.
If-Match header string The version the change is based on.

Responses

  • 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
  • 412 Error (spec/API.md). Error
GET /v1/reports/bonuses Employee bonuses over [from, to) (spec/REPORTS.md).

operationId bonusReport · Permission bonus.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).
from required query string (date-time) Inclusive.
to required query string (date-time) Exclusive.

Responses

GET /v1/reports/partners Partners' revenue, margin and commission over [from, to) (spec/REPORTS.md).

operationId partnerReport · Permission report.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).
from required query string (date-time) Inclusive.
to required query string (date-time) Exclusive.

Responses

GET /v1/reports/restaurant Checks closed in [from, to) with covers, revenue, averages, table time and tips (spec/REPORTS.md, Restaurant).

operationId restaurantReport · Permission report.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).
from required query string (date-time) Inclusive.
to required query string (date-time) Exclusive.
group_by required query "day" | "waiter" | "table" | "area" The rows.

Responses

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 · Permission report.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).
from required query string (date-time) Inclusive.
to required query string (date-time) Exclusive.
group_by required query "day" | "employee" | "charge" The rows.

Responses

Schemas

Error object

Every error response.

error required string Stable code, see spec/API.md.
message required 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 required "day" | "employee" | "item" | "group" | "tender"
currency required string
rows required array of SalesReportRow
totals required SalesMetrics

StockReportRow object

item_id required string (uuid)
sku required string
name required LocalizedText
base_unit required "each" | "kg" | "lb" | "l" | "us_gal" | "m" | "ft"
group_id string (uuid) | null
on_hand_milli required integer (int64)
held_milli required integer (int64)
available_milli required integer (int64)
value_minor required integer (int64) Σ balance × unit cost / 1000, rounded per item.
batches required integer Batches with a positive balance.
nearest_expiry required string (date) | null

StockReportPage object

items required array of StockReportRow
next required string | null
total_value_minor required integer (int64) The value of every row the filters select, across pages.

Movement object

at required string (date-time)
item_id required string (uuid)
batch_id required string (uuid)
quantity_milli required integer (int64) Signed; negative leaves stock.
kind required "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 required string (uuid)
source_number required integer (int64) The document's or receipt's number.
needs_review required boolean

MovementPage object

items required array of Movement
next required string | null

TaxReport object

spec/REPORTS.md, "Tax".

from required string (date)
to required string (date)
codes required array of object
net_sales_minor required integer (int64)
nontaxable_sales_minor required integer (int64)
snap_minor required integer (int64)
deposit_minor required integer (int64)
tax_minor required integer (int64)

BonusRule object

spec/REPORTS.md, Employee bonuses; hub-owned in a chain.

id required string (uuid)
name required string
rate_ppm required integer
item_ids required array of string (uuid)
group_ids required array of string (uuid)
starts_on required string (date) | null
ends_on required string (date) | null
active required boolean
version required integer (int64)

BonusRuleWrite object

name required string
rate_ppm required 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 required string (date-time)
to required string (date-time)
rows required array of object
totals required object

PartnerReport object

spec/REPORTS.md, Partners. The hub answers HubPartnerReport (hub-v1.yaml), whose rows name their store and currency.

from required string (date-time)
to required string (date-time)
rows required array of object
totals required object

RestaurantMetrics object

checks required integer
covers required integer
revenue required integer (int64)
tips required integer (int64)
service_charges required integer (int64)
table_minutes required integer
average_check required integer | null
average_cover required integer | null
average_minutes required integer | null

RestaurantReportRow object

key required string | null The day, waiter, table or area; null for a tab by table or area.
checks required integer
covers required integer
revenue required integer (int64)
tips required integer (int64)
service_charges required integer (int64)
table_minutes required integer
average_check required integer | null
average_cover required integer | null
average_minutes required integer | null

RestaurantReport object

group_by required "day" | "waiter" | "table" | "area"
currency required string
rows required array of RestaurantReportRow
totals required RestaurantMetrics

ServiceChargeMetrics object

sales required integer
refunds required integer
removed required integer Charges removed by hand on the sales.
amount_minor required integer (int64)
tax_minor required integer (int64)
to_staff_minor required integer (int64)
house_minor required integer (int64)

ServiceChargeReportRow object

key required string The local date, the employee id or the charge's id.
sales required integer
refunds required integer
removed required integer
amount_minor required integer (int64)
tax_minor required integer (int64)
to_staff_minor required integer (int64)
house_minor required integer (int64)

ServiceChargeReport object

group_by required "day" | "employee" | "charge"
currency required string
rows required array of ServiceChargeReportRow
totals required ServiceChargeMetrics