Edit
[POST] .../v1/promoprogram/edit
Edits promotion. Update an existing loyalty promotion program after it has been created. The method requires id and applies only provided editable fields, validates active days and a complete date/time window when all window fields are supplied and returns row_affected. The request requires the promotion edit permission and the retail promotion tariff must allow loyalty programs. Errors such as a missing request body, invalid id, invalid day values, invalid or inconsistent date/time values, no changed fields, missing record, denied access, disabled tariff option or storage errors are returned as HTTP 200 ErrorResult.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| active | Boolean | Optional | Indicates whether the promotion is active. |
| days | Array of Int32 | Optional | Weekdays when the promotion is active. |
| description | String | Optional | Additional description. |
| end_date | String | Optional | Promotion end date: yyyy:MM:dd. |
| end_time | String | Optional | Promotion end time: HH:mm:ss. |
| id | Int64 | Required | Group ID. |
| name | String | Optional | Promotion name. |
| priority | Int32 | Optional | Promotion application priority. |
| start_date | String | Optional | Promotion start date: yyyy:MM:dd. |
| start_time | String | Optional | Promotion start time: HH:mm:ss. |
Request Example
{
"active": true,
"days": [
1
],
"description": "string",
"end_date": "string",
"end_time": "string",
"id": 1,
"name": "string",
"priority": 1,
"start_date": "string",
"start_time": "string"
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Update | Update operation result. |
Response Example
{
"ok": true,
"result": {
"ids": [
null
],
"row_affected": 1
}
}