iRetail PRO store node 1.0.0-m1: customer-app

4 операции

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

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

← iRetail PRO store node 1.0.0-m1

Операции

GET /v1/customer-app The customer app's setting (spec/PUBLIC_API.md, The listener): at the hub, or a store with no hub; 409 owned_by_hub at a store of a chain.

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

Ответы

PUT /v1/customer-app Set the customer app at the setting's version; 422 invalid_customer_app with field and reason, checked in spec/PUBLIC_API.md's order. Audited (customer_app.set).

operationId putCustomerApp · Право customer_app.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 CustomerApp
  • 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
POST /v1/customer-app/card-key Make a new card key; every card token made with the old one stops being taken at once. Audited (customer_app.card_key_renewed); the key itself is never answered, shown or logged.

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

Ответы

POST /v1/customer-app/pushes Send a promotion push to the customers who take promotions, allow marketing and had none today; 422 pushes_unavailable when no push account is set. Audited (customer_app.push_sent); no agent tool reaches it.

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

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

Ответы

Схемы

Error object

Every error response.

error обязательный string Stable code, see spec/API.md.
message обязательный string English text for logs.
details object

CustomerApp object

The customer app's setting (spec/PUBLIC_API.md, The listener, Pushes); the push keys are only named.

enabled обязательный boolean
listening обязательный boolean Whether this node serves the public listener (IRETAIL_PUBLIC_LISTEN); read only.
program_id обязательный string (uuid) | null
channels обязательный CustomerAppChannels
terms_version обязательный string | null
terms_url обязательный string (uri) | null
privacy_url обязательный string (uri) | null
pushes обязательный CustomerAppPushes
card_key_created_at обязательный string (date-time) | null When the card key in use was made; null before the first card token.
online_payment обязательный OnlinePaymentSetting & object | null The chain's own payment account for preorders (spec/PAYMENTS_ONLINE.md), its key only named; null for none.
version обязательный integer (int64)

CustomerAppPut object

enabled обязательный boolean
program_id обязательный string (uuid) | null
channels обязательный CustomerAppChannels
terms_version обязательный string | null
terms_url обязательный string (uri) | null
privacy_url обязательный string (uri) | null
pushes обязательный object
online_payment обязательный OnlinePaymentSetting | null

CustomerAppChannels array of "email" | "sms"

ApnsSetting object

APNs by token-based authentication; the .p8 key is read from IRETAIL_PUSH_APNS_KEY_FILE, never stored here.

key_id обязательный string
team_id обязательный string
bundle_id обязательный string
sandbox boolean Use APNs' development environment.

FcmSetting object

Firebase Cloud Messaging HTTP v1; the service account is read from IRETAIL_PUSH_FCM_CREDENTIALS_FILE, never stored here.

project_id обязательный string

CustomerAppPushes object

apns обязательный ApnsSetting & object | null
fcm обязательный FcmSetting & object | null

CardKey object

created_at обязательный string (date-time)

PromotionPush object

title обязательный map of string
text обязательный map of string
store_ids обязательный array of string (uuid) Customers with a receipt at one of these stores in the last 90 days; empty for every customer.

PromotionPushResult object

id обязательный string (uuid)
recipients обязательный integer The customers it is queued for, after their settings and the one-a-day rule.

OnlinePaymentSetting object

provider обязательный "stripe"
key_name обязательный string The <NAME> of IRETAIL_PAY_KEY_<NAME>_FILE and IRETAIL_PAY_WEBHOOK_<NAME>_FILE.