iRetail PRO store node 1.0.0-m1: customer-app

4 operations

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

← iRetail PRO store node 1.0.0-m1

Operations

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 · Permission customer_app.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).

Responses

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 · Permission customer_app.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).
If-Match header string The version the change is based on.

Request body required

Responses

  • 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 · Permission customer_app.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.

Responses

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 · Permission customer_app.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

Schemas

Error object

Every error response.

error required string Stable code, see spec/API.md.
message required 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 required boolean
listening required boolean Whether this node serves the public listener (IRETAIL_PUBLIC_LISTEN); read only.
program_id required string (uuid) | null
channels required CustomerAppChannels
terms_version required string | null
terms_url required string (uri) | null
privacy_url required string (uri) | null
pushes required CustomerAppPushes
card_key_created_at required string (date-time) | null When the card key in use was made; null before the first card token.
online_payment required OnlinePaymentSetting & object | null The chain's own payment account for preorders (spec/PAYMENTS_ONLINE.md), its key only named; null for none.
version required integer (int64)

CustomerAppPut object

enabled required boolean
program_id required string (uuid) | null
channels required CustomerAppChannels
terms_version required string | null
terms_url required string (uri) | null
privacy_url required string (uri) | null
pushes required object
online_payment required 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 required string
team_id required string
bundle_id required 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 required string

CustomerAppPushes object

apns required ApnsSetting & object | null
fcm required FcmSetting & object | null

CardKey object

created_at required string (date-time)

PromotionPush object

title required map of string
text required map of string
store_ids required 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 required string (uuid)
recipients required integer The customers it is queued for, after their settings and the one-a-day rule.

OnlinePaymentSetting object

provider required "stripe"
key_name required string The <NAME> of IRETAIL_PAY_KEY_<NAME>_FILE and IRETAIL_PAY_WEBHOOK_<NAME>_FILE.