iRetail PRO store node 1.0.0-m1: brand

5 операций

← Вся документация · Источник: контракты, openapi/store-v1.yaml на коммите 8000474.

Справочники на английском — на языке контрактов, из которых они созданы.

← iRetail PRO store node 1.0.0-m1

Операции

GET /v1/brand The effective brand of the caller's store: the brand overlaid with the store's banner, or the default (spec/BRANDS.md, What the apps get); 304 for a matching If-None-Match.

operationId getBrand · Право store.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).
If-None-Match header string The ETag the caller holds.

Ответы

PUT /v1/brand Set the organization's brand: checked as spec/BRANDS.md says (422 invalid_brand, 422 brand_contrast); 403 module_disabled without white_label; 409 owned_by_hub at a store of a chain.

operationId putBrand · Право brand.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).
If-Match header string The version the change is based on.

Тело запроса обязательный

Ответы

  • 200 OK Brand
  • 400 Error (spec/API.md). Error
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 409 Error (spec/API.md). Error
  • 412 Error (spec/API.md). Error
  • 422 Error (spec/API.md). Error
GET /v1/brand/settings The organization's brand as kept, served whether or not the key holds white_label; 404 when there is none.

operationId getBrandSettings · Право brand.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).

Ответы

  • 200 OK Brand
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 404 Error (spec/API.md). Error
POST /v1/brand/images Upload a PNG of at most 128 KiB for a brand or a banner to name; only its header is read (422 invalid_brand, reason not_png). Its id is the SHA-256 of its bytes, so uploading the same bytes again answers the same image.

operationId uploadBrandImage · Право brand.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.

Тело запроса обязательный

  • image/png string (binary)

Ответы

  • 201 OK BrandImage
  • 400 Error (spec/API.md). Error
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 409 Error (spec/API.md). Error
  • 413 Error (spec/API.md). Error
  • 422 Error (spec/API.md). Error
GET /v1/brand/images/{id} An image of the brand or a banner, its bytes never changing; 304 for a matching If-None-Match.

operationId getBrandImage · Право store.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).
id обязательный path string The lower-case hex SHA-256 of the image's bytes.
If-None-Match header string The ETag the caller holds.

Ответы

  • 200 The PNG. string (binary)
  • 304 Not modified.
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 404 Error (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.

BrandColor string

An opaque sRGB color.

BrandThemeColors object

One theme's accent tokens (spec/BRANDS.md, Colors).

accent обязательный BrandColor
accent_hover обязательный BrandColor
accent_active обязательный BrandColor
accent_on обязательный BrandColor
accent_text обязательный BrandColor
accent_soft обязательный BrandColor

BrandColors object

light обязательный BrandThemeColors
dark обязательный BrandThemeColors

BrandImageId string

The lower-case hex SHA-256 of an uploaded image's bytes.

BrandImage object

An uploaded PNG as the node read its header (spec/BRANDS.md, Images).

id обязательный BrandImageId
width обязательный integer (int64)
height обязательный integer (int64)
bit_depth обязательный integer
color_type обязательный integer
interlace обязательный integer
bytes обязательный integer (int64)

BrandImageRef object

An image of the effective brand, fetched from GET /v1/brand/images/{id}.

id обязательный BrandImageId
width обязательный integer (int64)
height обязательный integer (int64)

BrandLines array of @LocalizedText

Lines printed on a receipt, each 1 to 48 characters in every language given.

BrandPut object

The organization's brand as written (spec/BRANDS.md, The records).

name обязательный LocalizedText
logo обязательный BrandImageId | null
dark_logo обязательный BrandImageId | null
receipt_logo обязательный BrandImageId | null
colors обязательный BrandColors | null
receipt_header обязательный BrandLines
receipt_footer обязательный BrandLines
sender_name обязательный string | null

Brand @BrandPut & object

The organization's brand as kept.

EffectiveBrand object

What the apps show in a store (spec/BRANDS.md, What the apps get): the brand overlaid with the store's banner; source default (every field null, no lines) when there is none or the key lacks white_label.

source обязательный "default" | "brand" | "banner"
version обязательный string The brand's and the banner's versions, 0 for one absent.
name обязательный LocalizedText | null
logo обязательный BrandImageRef | null
dark_logo обязательный BrandImageRef | null
receipt_logo обязательный BrandImageRef | null
colors обязательный BrandColors | null
receipt_header обязательный BrandLines
receipt_footer обязательный BrandLines
sender_name обязательный string | null