Update an existing campaign
Update an existing campaign
Required permissions: CAMPAIGN
put/tenants/{tenantUid}/campaigns/{campaignUid}
Authorizations
AuthorizationstringRequired
Access token recevied after user login with a deviceToken
Path parameters
tenantUidstringRequiredPattern:
Reference to a tenant.
^[A-Za-z0-9-_]+campaignUidstringRequiredPattern:
Reference to a campaign.
^[A-Za-z0-9-_]+Body
This request updates an existing campaign.
IMPORTANT! The request must include all storeUids the campaign is valid for.
namestringOptional
displayNamestringOptional
statusstring · enumOptional
Possible values:
| ENUM | Description |
|---|---|
| NEW | Campaign is in a modeling state. Can be modified |
| ACTIVE | Campaign is active, and is considered when making sales operations. Campaign can not be modified |
| CLOSED | Campaign is closed. |
validFromstring · date-timeOptional
validTostring · date-timeOptional
storeUidsstring[]Optional
quantityThresholdintegerOptional
amountThresholdintegerOptional
discountAmountintegerOptional
discountPercentintegerOptional
maxUsageintegerOptional
priorityintegerOptional
pricelistUidstringOptionalPattern:
^[A-Za-z0-9-_]*campaignCodestringOptional
discountTypestring · enumOptional
Possible values:
| ENUM | Description |
|---|---|
| CHEAPEST_PRODUCT | Cheapest product will be discounted |
| QUALIFIED_PRODUCT | All qualified products will be discounted |
| ORDER_DISCOUNT | An order discount will be added to the order |
preventCombinationsbooleanOptional
customerGroupUidstringOptionalPattern:
^[A-Za-z0-9-_]*Responses
200
Example response
application/json
namestringRequired
statusstring · enumRequired
Possible values:
| ENUM | Description |
|---|---|
| NEW | Campaign is in a modeling state. Can be modified |
| ACTIVE | Campaign is active, and is considered when making sales operations. Campaign can not be modified |
| CLOSED | Campaign is closed. |
displayNamestringRequired
validFromstring · date-timeRequired
validTostring · date-timeRequired
typestring · enumRequired
Possible values:
| ENUM | Description |
|---|---|
| CAMPAIGN | Normal campaign with rules set |
| PRICELIST | A campaign that includes a pricelist. No rules applies |
discountTypestring · enumRequired
Possible values:
| ENUM | Description |
|---|---|
| CHEAPEST_PRODUCT | Cheapest product will be discounted |
| QUALIFIED_PRODUCT | All qualified products will be discounted |
| ORDER_DISCOUNT | An order discount will be added to the order |
quantityThresholdintegerRequired
amountThresholdintegerRequired
discountAmountintegerRequired
discountPercentintegerRequired
maxUsageintegerRequired
priorityintegerRequired
campaignUidstringRequiredPattern:
^[A-Za-z0-9-_]+campaignCodestringRequired
preventCombinationsbooleanRequired
put/tenants/{tenantUid}/campaigns/{campaignUid}
PUT /v2/tenants/{tenantUid}/campaigns/{campaignUid} HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 386
{
"name": "text",
"displayName": "text",
"status": "NEW",
"validFrom": "2026-01-01T00:00:00.000Z",
"validTo": "2026-01-01T00:00:00.000Z",
"storeUids": [
"text"
],
"quantityThreshold": 1,
"amountThreshold": 1,
"discountAmount": 1,
"discountPercent": 1,
"maxUsage": 1,
"priority": 1,
"pricelistUid": "text",
"campaignCode": "text",
"discountType": "CHEAPEST_PRODUCT",
"preventCombinations": true,
"customerGroupUid": "text"
}200
Example response
{
"name": "text",
"status": "NEW",
"displayName": "text",
"validFrom": "2026-01-01T00:00:00.000Z",
"validTo": "2026-01-01T00:00:00.000Z",
"type": "CAMPAIGN",
"discountType": "CHEAPEST_PRODUCT",
"selection": {
"include": {
"productGroups:": [
{
"productGroupUid": "text",
"name": "text"
}
],
"brands": [
{
"brandUid": "text",
"name": "text"
}
],
"categories": [
{
"categoryUid": "text",
"name": "text"
}
],
"products": [
{
"productUid": "text",
"name": "text",
"sku": "text"
}
]
},
"exclude": {
"productGroups:": [
{
"productGroupUid": "text",
"name": "text"
}
],
"brands": [
{
"brandUid": "text",
"name": "text"
}
],
"categories": [
{
"categoryUid": "text",
"name": "text"
}
],
"products": [
{
"productUid": "text",
"name": "text",
"sku": "text"
}
]
}
},
"quantityThreshold": 1,
"amountThreshold": 1,
"discountAmount": 1,
"discountPercent": 1,
"maxUsage": 1,
"priority": 1,
"pricelist": {
"pricelistUid": "text",
"name": "text"
},
"stores": [
{
"storeUid": "text",
"name": "text"
}
],
"campaignUid": "text",
"campaignCode": "text",
"preventCombinations": true,
"customerGroup": {
"customerGroupUid": "text",
"name": "text"
}
}Last updated
Was this helpful?

