Campaign
Campaign
Search for campaigns
Reference to a tenant.
^[A-Za-z0-9-_]+
Reference to a specific page in a result set.
The number of items per page in a result set.
Defines which field the resource list is sorted by.
ENUM | Description |
---|---|
ASC | Sort in ascending order |
DESC | Sort in descending order |
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 |
ENUM | Description |
---|---|
CAMPAIGN | Normal campaign with rules set |
PRICELIST | A campaign that includes a pricelist. No rules applies |
POST /v2/tenants/{tenantUid}/campaigns/search HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 201
{
"query": "text",
"campaignCode": "text",
"discountType": "CHEAPEST_PRODUCT",
"displayName": "text",
"name": "text",
"type": "CAMPAIGN",
"validFrom": "2025-07-30T18:07:08.642Z",
"validTo": "2025-07-30T18:07:08.642Z"
}
Example response
{
"items": [
{
"name": "text",
"status": "NEW",
"displayName": "text",
"validFrom": "2025-07-30T18:07:08.642Z",
"validTo": "2025-07-30T18:07:08.642Z",
"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
}
],
"paging": {
"pageNumber": 1,
"pageSize": 1,
"totalCount": 1
}
}
Get list of campaigns
Reference to a tenant.
^[A-Za-z0-9-_]+
Reference to a specific page in a result set.
The number of items per page in a result set.
Defines which field the resource list is sorted by.
ENUM | Description |
---|---|
ASC | Sort in ascending order |
DESC | Sort in descending order |
Reference to a name
Reference to a display name
Reference to a campaign code
Reference to a valid from
Reference to a valid to
ENUM | Description |
---|---|
CAMPAIGN | Normal campaign with rules set |
PRICELIST | A campaign that includes a pricelist. No rules applies |
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 |
GET /v2/tenants/{tenantUid}/campaigns HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Example response
{
"items": [
{
"name": "text",
"status": "NEW",
"displayName": "text",
"validFrom": "2025-07-30T18:07:08.642Z",
"validTo": "2025-07-30T18:07:08.642Z",
"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
}
],
"paging": {
"pageNumber": 1,
"pageSize": 1,
"totalCount": 1
}
}
Create new campaign
Reference to a tenant.
^[A-Za-z0-9-_]+
ENUM | Description |
---|---|
CAMPAIGN | Normal campaign with rules set |
PRICELIST | A campaign that includes a pricelist. No rules applies |
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 |
A quantity that qualifies for the campaign to apply.
If both quantity and amount are set, both criteria must be met.
An amount that qualifies for the campaign to apply.
If both quantity and amount are set, both criteria must be met.
Discount amount given when the criteria are met.
Discount percent given when the criteria are met.
The max number of times the campaign can be applied to the order
^[A-Za-z0-9-_]+
Priority for the campaign if more than one campaign applies. Lower number = higher priority.
^[A-Za-z0-9-_]+
If campaignCode is set, it means that this campaign has to be manually actived on an order via PUT on the order
Flag to indicate that this campaign should not be combined with other campaigns. If any orderlines matches this campaign and priority is set to 1, no other campaigns will be considered.
POST /v2/tenants/{tenantUid}/campaigns HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 384
{
"name": "text",
"displayName": "text",
"validFrom": "2025-07-30T18:07:08.642Z",
"validTo": "2025-07-30T18:07:08.642Z",
"type": "CAMPAIGN",
"discountType": "CHEAPEST_PRODUCT",
"storeUids": [
"text"
],
"quantityThreshold": 1,
"amountThreshold": 1,
"discountAmount": 1,
"discountPercent": 1,
"maxUsage": 1,
"pricelistUid": "text",
"priority": 1,
"campaignUid": "text",
"campaignCode": "text",
"preventCombinations": true
}
Example response
{
"name": "text",
"status": "NEW",
"displayName": "text",
"validFrom": "2025-07-30T18:07:08.642Z",
"validTo": "2025-07-30T18:07:08.642Z",
"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
}
Get details for a campaign
Reference to a tenant.
^[A-Za-z0-9-_]+
Reference to a campaign.
^[A-Za-z0-9-_]+
GET /v2/tenants/{tenantUid}/campaigns/{campaignUid} HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Example response
{
"name": "text",
"status": "NEW",
"displayName": "text",
"validFrom": "2025-07-30T18:07:08.642Z",
"validTo": "2025-07-30T18:07:08.642Z",
"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
}
Update an existing campaign
Reference to a tenant.
^[A-Za-z0-9-_]+
Reference to a campaign.
^[A-Za-z0-9-_]+
This request updates an existing campaign.
IMPORTANT! The request must include all storeUids the campaign is valid for.
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. |
^[A-Za-z0-9-_]*
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 |
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: 360
{
"name": "text",
"displayName": "text",
"status": "NEW",
"validFrom": "2025-07-30T18:07:08.642Z",
"validTo": "2025-07-30T18:07:08.642Z",
"storeUids": [
"text"
],
"quantityThreshold": 1,
"amountThreshold": 1,
"discountAmount": 1,
"discountPercent": 1,
"maxUsage": 1,
"priority": 1,
"pricelistUid": "text",
"campaignCode": "text",
"discountType": "CHEAPEST_PRODUCT",
"preventCombinations": true
}
Example response
{
"name": "text",
"status": "NEW",
"displayName": "text",
"validFrom": "2025-07-30T18:07:08.642Z",
"validTo": "2025-07-30T18:07:08.642Z",
"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
}
Delete an existing campaign
Reference to a tenant.
^[A-Za-z0-9-_]+
Reference to a campaign.
^[A-Za-z0-9-_]+
DELETE /v2/tenants/{tenantUid}/campaigns/{campaignUid} HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No Content
No content
Set selections on a campaign
Reference to a tenant.
^[A-Za-z0-9-_]+
Reference to a campaign.
^[A-Za-z0-9-_]+
This request has 3 sections:
create: A selection to create in the campaign delete: A selection to delete from campaign.
POST /v2/tenants/{tenantUid}/campaigns/{campaignUid}/selections HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 455
{
"create": {
"include": {
"productGroupUids": [
"text"
],
"brandUids": [
"text"
],
"categoryUids": [
"text"
],
"productUids": [
"text"
]
},
"exclude": {
"productGroupUids": [
"text"
],
"brandUids": [
"text"
],
"categoryUids": [
"text"
],
"productUids": [
"text"
]
}
},
"delete": {
"include": {
"productGroupUids": [
"text"
],
"brandUids": [
"text"
],
"categoryUids": [
"text"
],
"productUids": [
"text"
]
},
"exclude": {
"productGroupUids": [
"text"
],
"brandUids": [
"text"
],
"categoryUids": [
"text"
],
"productUids": [
"text"
]
}
}
}
Example response
{
"name": "text",
"status": "NEW",
"displayName": "text",
"validFrom": "2025-07-30T18:07:08.642Z",
"validTo": "2025-07-30T18:07:08.642Z",
"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
}
List products for a campaign
Reference to a tenant.
^[A-Za-z0-9-_]+
Reference to a campaign.
^[A-Za-z0-9-_]+
Reference to a specific page in a result set.
The number of items per page in a result set.
Defines which field the resource list is sorted by.
ENUM | Description |
---|---|
ASC | Sort in ascending order |
DESC | Sort in descending order |
ENUM | Description |
---|---|
INCLUDE | Query for included products in campaign |
EXCLUDE | Query for excluded products in campaign |
GET /v2/tenants/{tenantUid}/campaigns/{campaignUid}/products HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Example response
{
"items": [
{
"productUid": "text",
"name": "text",
"sku": "text"
}
],
"paging": {
"pageNumber": 1,
"pageSize": 1,
"totalCount": 1
}
}
Was this helpful?