iRetail PRO store node 1.0.0-m1: imports

10 operations

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

← iRetail PRO store node 1.0.0-m1

Operations

POST /v1/imports Read a CSV, XLSX or Google Sheet into an import session (spec/IMPORT.md).

operationId createImport · Permission item.edit

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).

Request body required

Responses

GET /v1/imports/{id} An import session.

operationId getImport · Permission item.edit

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

POST /v1/imports/{id}/preview What each row would do under a mapping; writes nothing.

operationId previewImport · Permission item.edit

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.
offset query integer First row to answer (0 is the first data row).
limit query integer Rows to answer.

Request body required

Responses

POST /v1/imports/{id}/apply Write the create and update rows in one transaction; error rows are skipped.

Needs price.edit too when the mapping has price. Applying the same session with the same mapping again returns the first result.

operationId applyImport · Permission item.edit

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.

Request body required

Responses

GET /v1/exports/items Every item with the import's columns, as CSV or XLSX (spec/IMPORT.md, Export).

operationId exportItems · Permission item.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).
format required query "csv" | "xlsx" File format.

Responses

  • 200 The file. string
  • 400 Error (spec/API.md). Error
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
GET /v1/exports/stock The stock report as CSV or XLSX.

operationId exportStock · 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).
format required query "csv" | "xlsx" File format.

Responses

  • 200 The file. string
  • 400 Error (spec/API.md). Error
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
GET /v1/exports/sales The sales report as CSV or XLSX.

operationId exportSales · 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" Rows by day, employee, item, group or tender.
roll_up_variants query boolean By item: count a variant under its parent (spec/VARIANTS.md).
format required query "csv" | "xlsx" File format.

Responses

  • 200 The file. string
  • 400 Error (spec/API.md). Error
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
GET /v1/exports/tax The tax report as CSV or XLSX.

operationId exportTax · 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.
format required query "csv" | "xlsx" File format.

Responses

  • 200 The file. string
  • 400 Error (spec/API.md). Error
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
GET /v1/exports/service-charges The service charge report as CSV or XLSX.

operationId exportServiceChargeReport · 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" | "charge" Rows by day, employee or charge.
format required query "csv" | "xlsx" File format.

Responses

  • 200 The file. string
  • 400 Error (spec/API.md). Error
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
GET /v1/exports/restaurant The restaurant report as CSV or XLSX.

operationId exportRestaurantReport · 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" | "waiter" | "table" | "area" Rows by day, waiter, table or area.
format required query "csv" | "xlsx" File format.

Responses

  • 200 The file. string
  • 400 Error (spec/API.md). Error
  • 401 Error (spec/API.md). Error
  • 403 Error (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

ImportUpload object

A file as base64 (csv, xlsx) or a Google Sheet's URL (google_sheet).

format required "csv" | "xlsx" | "google_sheet"
file_name string
content_base64 string The file, for csv and xlsx; at most 10 MB decoded.
url string (uri) For google_sheet; https://docs.google.com/spreadsheets/d/... only.

ImportSession object

id required string (uuid)
format required "csv" | "xlsx" | "google_sheet"
file_name required string | null
header required array of string
row_count required integer
sample_rows required array of array of string
suggested_mapping required map of string Header name → field.
created_at required string (date-time)
expires_at required string (date-time)
applied required boolean

ImportMapping object

mapping required map of "sku" | "name_en" | "name_ru" | "kind" | "base_unit" | "price" | "barcode" | "plu" | "tax_codes" | "group" | "discountable" | "active" Header name → field (spec/IMPORT.md, Mapping).

ImportPreviewRow object

row required integer The row's number in the table; the header is row 1.
action required "create" | "update" | "error"
fields required object Normalized values (spec/IMPORT.md).
errors required array of object

ImportPreview object

rows required array of ImportPreviewRow
counts required object

ImportResult object

created required integer
updated required integer
skipped required integer Error rows, not written.
groups_created required integer