Skip to main content

Updates a campaign.

If the campaign does not exist, it will be created. Partial updates are not supported.

Path Parameters
id uuid REQUIRED

The campaign ID.

Request Body REQUIRED

The campaign details.

CampaignId uuid

Campaign ID.

CampaignBaseType int32

Possible values: [0, 1, 2, 3]

Campaign base type. Allowed values are code, cart, and product.
0 = NOT_SET
1 = cart
2 = code
3 = product

Title object[]

Localized titles.

Language string

The language of the localized item.

Value string

The value of the localized item.

Description string

Description.

MarketId string

Market ID.

CampaignTypeId int32

Campaign type ID. Fetch available campaign types from the campaign/types endpoint.

BuyQuantity int32

Buy quantity.

Amounts object

Amounts. Key is ISO Currency code. Used by campaign types with an amount discount.

PayForQuantity int32

Pay for quantity.

Priority int32

Priority.

StopCombining boolean

Indicates whether to stop combining.

ValidFrom date-time

Valid from date.

ValidTo date-time

Valid to date.

PromoCode string

Promo code.

HideTitle boolean

Indicates whether to hide the title.

CantCombineWithCartCampaign boolean

Indicates whether the campaign cannot be combined with cart campaigns.

PercentageValue double

Percentage value.

ExcludeProductsOnSale boolean

Indicates whether to exclude products on sale.

SaleTypesToEnforce int32

Possible values: [0, 1, 2, 3]

Sale types to enforce. Possible values are campaign, sale, and all.
0 = NOT_SET
1 = campaign
2 = sale
3 = all

MinimumPurchaseAmounts object

Minimum purchase amounts.

MinimumQuantity int32

Minimum quantity.

OncePerCustomer boolean

Indicates whether the campaign is limited to once per customer.

UseSalePrice boolean

Indicates whether to use the sale price when calculating campaign price.

FreeShipping boolean

Indicates whether free shipping is included.

UsageLimit int32

Usage limit.

Prices object

Prices. Can be used with percentage campaign type.

LandingPage object

Represents a campaign landing page.

Title object[]

Localized titles for the landing page.

Language string

The language of the localized item.

Value string

The value of the localized item.

Url object[]

Localized URLs for the landing page. These can not be set directly, but are generated from the title.

Values string[]

Additional values for the extended localized item.

Language string

The language of the localized item.

Value string

The value of the localized item.

Description object[]

Localized descriptions for the landing page.

Language string

The language of the localized item.

Value string

The value of the localized item.

Meta object

Represents the meta information for a campaign landing page.

Title object[]

Localized titles for the meta information.

Language string

The language of the localized item.

Value string

The value of the localized item.

Keywords object[]

Localized keywords for the meta information.

Language string

The language of the localized item.

Value string

The value of the localized item.

Description object[]

Localized descriptions for the meta information.

Language string

The language of the localized item.

Value string

The value of the localized item.

SelectedUsers string[]

Selected users, usually an array of email addresses.

SelectedGroups string[]

Selected groups, usually an array of customer group IDs.

Enabled boolean

Indicates whether the campaign is enabled.

ProductSelection object

Represents the product selection criteria.

Include object

Represents the data for product selection criteria.

Condition int32

Possible values: [0, 1]

Condition for combining criteria.
0 = and. Logical AND condition.
1 = or. Logical OR condition.

Categories object[]

List of category selections.

Id int32

Item ID.

Name string

Item name.

Brands object[]

List of brand selections.

Id int32

Item ID.

Name string

Item name.

Products int32[]

List of product IDs.

Price object[]

List of price selections.

Condition int32

Possible values: [0, 1, 2]

Condition for the price selection.
0 = lt. Less than condition.
1 = gt. Greater than condition.
2 = eq. Equal to condition.

Prices object

Dictionary of prices. Currency ISO code is used for the key.

Exclude object

Represents the data for product selection criteria.

Condition int32

Possible values: [0, 1]

Condition for combining criteria.
0 = and. Logical AND condition.
1 = or. Logical OR condition.

Categories object[]

List of category selections.

Id int32

Item ID.

Name string

Item name.

Brands object[]

List of brand selections.

Id int32

Item ID.

Name string

Item name.

Products int32[]

List of product IDs.

Price object[]

List of price selections.

Condition int32

Possible values: [0, 1, 2]

Condition for the price selection.
0 = lt. Less than condition.
1 = gt. Greater than condition.
2 = eq. Equal to condition.

Prices object

Dictionary of prices. Currency ISO code is used for the key.

Group string

Group. Use it to group similar campaigns.

PriceOutput int32

Possible values: [0, 1]

Price output type.
0 = Campaign
1 = Sale

Responses
200

Ok.

Schema OPTIONAL
Message string OPTIONAL

A status message for the action taken.

Details string[] OPTIONAL

Any validation messages for the data on the current action.

400

Bad request.

Schema OPTIONAL
Message string OPTIONAL

A status message for the action taken.

Details string[] OPTIONAL

Any validation messages for the data on the current action.