iRetail PRO store node 1.0.0-m1: promotions
4 operations
← All documentation · Source: contracts openapi/store-v1.yaml at 8000474.
← iRetail PRO store node 1.0.0-m1
Operations
GET
/v1/promotions
The store's promotions, inactive ones included (spec/PROMOTIONS.md).
operationId
listPromotions · 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). |
Responses
POST
/v1/promotions
Create a promotion.
operationId
createPromotion · Permission promotion.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). |
Approval-Token
|
header | string |
One-time approval from POST /v1/approvals for this operation's permission. |
Request body required
application/jsonPromotionCreate
Responses
PATCH
/v1/promotions/{id}
Change a promotion.
operationId
updatePromotion · Permission promotion.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. |
Approval-Token
|
header | string |
One-time approval from POST /v1/approvals for this operation's permission. |
Request body required
application/jsonPromotionPatch
Responses
DELETE
/v1/promotions/{id}
Delete a promotion.
operationId
deletePromotion · Permission promotion.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. |
Approval-Token
|
header | string |
One-time approval from POST /v1/approvals for this operation's permission. |
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 |
LocalizedText map of string
Text by language code; the organization's default language must be present.
PromotionRule object | object
spec/PROMOTIONS.md.
Promotion object
id required
|
string (uuid) |
|
name required
|
LocalizedText |
|
active required
|
boolean |
|
starts_at required
|
string (date-time) | null |
|
ends_at required
|
string (date-time) | null |
|
item_ids required
|
array of string (uuid) |
|
group_ids required
|
array of string (uuid) |
|
rule required
|
PromotionRule |
|
version required
|
integer (int64) |
PromotionCreate object
name required
|
LocalizedText |
|
active
|
boolean |
|
starts_at
|
string (date-time) | null |
|
ends_at
|
string (date-time) | null |
|
item_ids
|
array of string (uuid) |
|
group_ids
|
array of string (uuid) |
|
rule required
|
PromotionRule |
PromotionPatch object
name
|
LocalizedText |
|
active
|
boolean |
|
starts_at
|
string (date-time) | null |
|
ends_at
|
string (date-time) | null |
|
item_ids
|
array of string (uuid) |
|
group_ids
|
array of string (uuid) |
|
rule
|
PromotionRule |