Heads up, our devs are blazing ahead—docs are catching up, so some features might not be fully documented yet.

Campaign

Campaign

Search for campaigns

post

Search for campaigns

Authorizations
Path parameters
tenantUidstringRequired

Reference to a tenant.

Pattern: ^[A-Za-z0-9-_]+
Query parameters
pageNumberintegerOptional

Reference to a specific page in a result set.

pageSizeintegerOptional

The number of items per page in a result set.

sortBystringOptional

Defines which field the resource list is sorted by.

sortDirectionstring · enumOptional
ENUM Description
ASC Sort in ascending order
DESC Sort in descending order
Possible values:
Body
querystringOptional
campaignCodestringOptional
discountTypestring · enumOptional
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
Possible values:
displayNamestringOptional
namestringOptional
typestring · enumOptional
ENUM Description
CAMPAIGN Normal campaign with rules set
PRICELIST A campaign that includes a pricelist. No rules applies
Possible values:
validFromstring · date-timeOptional
validTostring · date-timeOptional
Responses
200
Example response
application/json
post
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"
}
200

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

get

Get list of campaigns

Authorizations
Path parameters
tenantUidstringRequired

Reference to a tenant.

Pattern: ^[A-Za-z0-9-_]+
Query parameters
pageNumberintegerOptional

Reference to a specific page in a result set.

pageSizeintegerOptional

The number of items per page in a result set.

sortBystringOptional

Defines which field the resource list is sorted by.

sortDirectionstring · enumOptional
ENUM Description
ASC Sort in ascending order
DESC Sort in descending order
Possible values:
namestringOptional

Reference to a name

displayNamestringOptional

Reference to a display name

campaignCodestringOptional

Reference to a campaign code

validFromstring · date-timeOptional

Reference to a valid from

validTostring · date-timeOptional

Reference to a valid to

typestring · enumOptional
ENUM Description
CAMPAIGN Normal campaign with rules set
PRICELIST A campaign that includes a pricelist. No rules applies
Possible values:
discountTypestring · enumOptional
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
Possible values:
Responses
200
Example response
application/json
get
GET /v2/tenants/{tenantUid}/campaigns HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

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

post

Create new campaign

Authorizations
Path parameters
tenantUidstringRequired

Reference to a tenant.

Pattern: ^[A-Za-z0-9-_]+
Body
namestringRequired
displayNamestringRequired
validFromstring · date-timeRequired
validTostring · date-timeRequired
typestring · enumRequired
ENUM Description
CAMPAIGN Normal campaign with rules set
PRICELIST A campaign that includes a pricelist. No rules applies
Possible values:
discountTypestring · enumOptional
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
Possible values:
storeUidsstring[]Required
quantityThresholdintegerOptional

A quantity that qualifies for the campaign to apply.

If both quantity and amount are set, both criteria must be met.

amountThresholdintegerOptional

An amount that qualifies for the campaign to apply.

If both quantity and amount are set, both criteria must be met.

discountAmountintegerOptional

Discount amount given when the criteria are met.

discountPercentintegerOptional

Discount percent given when the criteria are met.

maxUsageintegerOptional

The max number of times the campaign can be applied to the order

pricelistUidstringOptionalPattern: ^[A-Za-z0-9-_]+
priorityintegerOptional

Priority for the campaign if more than one campaign applies. Lower number = higher priority.

campaignUidstringOptionalPattern: ^[A-Za-z0-9-_]+
campaignCodestringOptional

If campaignCode is set, it means that this campaign has to be manually actived on an order via PUT on the order

preventCombinationsbooleanOptional

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.

Responses
201
Example response
application/json
post
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
}
201

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

get

Get details for a campaign

Authorizations
Path parameters
tenantUidstringRequired

Reference to a tenant.

Pattern: ^[A-Za-z0-9-_]+
campaignUidstringRequired

Reference to a campaign.

Pattern: ^[A-Za-z0-9-_]+
Responses
200
Example response
application/json
get
GET /v2/tenants/{tenantUid}/campaigns/{campaignUid} HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

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

put

Update an existing campaign

Authorizations
Path parameters
tenantUidstringRequired

Reference to a tenant.

Pattern: ^[A-Za-z0-9-_]+
campaignUidstringRequired

Reference to a campaign.

Pattern: ^[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
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.
Possible values:
validFromstring · date-timeOptional
validTostring · date-timeOptional
storeUidsstring[]Optional
quantityThresholdintegerOptional
amountThresholdintegerOptional
discountAmountintegerOptional
discountPercentintegerOptional
maxUsageintegerOptional
priorityintegerOptional
pricelistUidstringOptionalPattern: ^[A-Za-z0-9-_]*
campaignCodestringOptional
discountTypestring · enumOptional
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
Possible values:
preventCombinationsbooleanOptional
Responses
200
Example response
application/json
put
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
}
200

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

delete

Delete an existing campaign

Authorizations
Path parameters
tenantUidstringRequired

Reference to a tenant.

Pattern: ^[A-Za-z0-9-_]+
campaignUidstringRequired

Reference to a campaign.

Pattern: ^[A-Za-z0-9-_]+
Responses
204
No Content
delete
DELETE /v2/tenants/{tenantUid}/campaigns/{campaignUid} HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
204

No Content

No content

Set selections on a campaign

post

Set selections on a campaign

Authorizations
Path parameters
tenantUidstringRequired

Reference to a tenant.

Pattern: ^[A-Za-z0-9-_]+
campaignUidstringRequired

Reference to a campaign.

Pattern: ^[A-Za-z0-9-_]+
Body

This request has 3 sections:

create: A selection to create in the campaign delete: A selection to delete from campaign.

Responses
200
Example response
application/json
post
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"
      ]
    }
  }
}
200

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

get

List products for a campaign

Authorizations
Path parameters
tenantUidstringRequired

Reference to a tenant.

Pattern: ^[A-Za-z0-9-_]+
campaignUidstringRequired

Reference to a campaign.

Pattern: ^[A-Za-z0-9-_]+
Query parameters
pageNumberintegerOptional

Reference to a specific page in a result set.

pageSizeintegerOptional

The number of items per page in a result set.

sortBystringOptional

Defines which field the resource list is sorted by.

sortDirectionstring · enumOptional
ENUM Description
ASC Sort in ascending order
DESC Sort in descending order
Possible values:
selectionstring · enumOptional
ENUM Description
INCLUDE Query for included products in campaign
EXCLUDE Query for excluded products in campaign
Possible values:
Responses
200
Example response
application/json
get
GET /v2/tenants/{tenantUid}/campaigns/{campaignUid}/products HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Example response

{
  "items": [
    {
      "productUid": "text",
      "name": "text",
      "sku": "text"
    }
  ],
  "paging": {
    "pageNumber": 1,
    "pageSize": 1,
    "totalCount": 1
  }
}

Was this helpful?