iRetail PRO store node 1.0.0-m1: shifts

6 operations

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

← iRetail PRO store node 1.0.0-m1

Operations

GET /v1/shifts Shifts.

operationId listShifts · Permission shift.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).
status query "open" | "closed" Status.
workplace_id query string (uuid) Workplace.
limit query integer Page size, 1–200.
after query string Cursor from the previous page.

Responses

POST /v1/shifts Open a shift on the caller's workplace.

operationId openShift · Permission shift.open

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.
Approval-Token header string One-time approval from POST /v1/approvals for this operation's permission.

Request body required

Responses

  • 201 OK Shift
  • 400 Error (spec/API.md). Error
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 409 Error (spec/API.md). Error
GET /v1/shifts/{id} One shift.

operationId getShift · Permission shift.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).
id required path string (uuid) Id.

Responses

  • 200 OK Shift
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 404 Error (spec/API.md). Error
POST /v1/shifts/{id}/cash-operations Deposit (shift.cash.deposit), payout (shift.cash.payout, limited) or pickup (shift.cash.pickup).

The kind decides the permission (spec/RBAC.md, Permissions by request).

operationId createCashOperation · Permission shift.cash.deposit

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.
Idempotency-Key header string spec/API.md, Idempotency.
Approval-Token header string One-time approval from POST /v1/approvals for this operation's permission.

Request body required

Responses

GET /v1/shifts/{id}/report X totals of a shift so far, of the whole shift or one cashier (spec/API.md, Shared registers).

operationId shiftReport · Permission shift.report.x

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.
Approval-Token header string One-time approval from POST /v1/approvals for this operation's permission.
cashier_id query string (uuid) Only this employee's receipts and cash operations.

Responses

POST /v1/shifts/{id}/close Close a shift with Z totals and the counted cash.

operationId closeShift · Permission shift.close

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.
Idempotency-Key header string spec/API.md, Idempotency.
Approval-Token header string One-time approval from POST /v1/approvals for this operation's permission.

Request body required

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

Shift object

id required string (uuid)
workplace_id required string (uuid)
cashier_id required string (uuid)
number required integer (int64)
status required "open" | "closed"
opened_at required string (date-time)
closed_at required string (date-time) | null
opening_cash_minor required integer (int64)
currency required string
fiscal required ShiftFiscal | null The fiscal shift's Z report, once closed with one; null otherwise (spec/FISCAL.md).

ShiftOpen object

opening_cash_minor required integer (int64)

CashOperation object

id required string (uuid)
shift_id required string (uuid)
kind required "deposit" | "payout" | "pickup"
amount_minor required integer (int64)
comment required string | null
created_at required string (date-time)
created_by required string (uuid)

CashOperationCreate object

kind required "deposit" | "payout" | "pickup"
amount_minor required integer (int64)
comment string | null

TenderTotal object

tender required "cash" | "card" | "ebt_snap" | "ebt_cash" | "gift_card" | "online" | "other" online is a preorder's payment captured at hand-over (spec/PAYMENTS_ONLINE.md), read as other by an app before 1.1.
amount_minor required integer (int64)

ShiftTotals object

open_checks required OpenChecks The store's open and billed restaurant checks when the totals were read; a shift closes with them open (spec/RESTAURANT.md, Split and close).
cashier_id required string (uuid) | null The cashier the totals are for; null for the whole shift (spec/API.md, Shared registers).
taxes required array of ReceiptTax Per tax code, the base and the tax of sales minus refunds, in the store's code order.
sale_count required integer
refund_count required integer
void_count required integer
sales_minor required integer (int64) Totals of sale receipts, voids excluded.
refunds_minor required integer (int64)
net_sales_minor required integer (int64)
tax_minor required integer (int64)
discounts_minor required integer (int64)
tips_minor required integer (int64)
service_charges_minor required integer (int64) The sales' service charges without their tax, less what refunds took back; beside tips_minor, never in it (spec/API.md, Shared registers).
payments required array of TenderTotal
cash required object

ShiftClose object

counted_cash_minor required integer (int64)
fiscal ShiftFiscal | null The fiscal Z report taken before the close, from a register with a fiscal back end (spec/FISCAL.md).

ShiftFiscal object

The fiscal shift and its Z report as the fiscal unit counted them (spec/FISCAL.md).

shift_number required integer (int64)
z_number required integer (int64)
z_at required string (date-time)
sales_minor required integer (int64)
refunds_minor required integer (int64)
taxes required array of ReceiptTax
tenders required array of object

ShiftClosed object

shift required Shift
totals required ShiftTotals
counted_cash_minor required integer (int64)
difference_minor required integer (int64) counted − expected

ReceiptTax object

code required string
base required integer (int64)
amount required integer (int64)

ShiftPage object

items required array of Shift
next required string | null

OpenChecks object

The store's open and billed checks when the totals were read (spec/RESTAURANT.md, Split and close).

count required integer
total_minor required integer (int64)