Campaign

Campaign

Search for campaigns

post
/tenants/{tenantUid}/campaigns/search

Search for campaigns

Required permissions: CAMPAIGN

Authorizations
AuthorizationstringRequired

Access token recevied after user login with a deviceToken

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
ENUMDescription
ASCSort in ascending order
DESCSort in descending order
Possible values:
Body
querystringOptional
campaignCodestringOptional
discountTypestring · enumOptional
ENUMDescription
CHEAPEST_PRODUCTCheapest product will be discounted
QUALIFIED_PRODUCTAll qualified products will be discounted
ORDER_DISCOUNTAn order discount will be added to the order
Possible values:
displayNamestringOptional
namestringOptional
typestring · enumOptional
ENUMDescription
CAMPAIGNNormal campaign with rules set
PRICELISTA campaign that includes a pricelist. No rules applies
Possible values:
validFromstring · date-timeOptional
validTostring · date-timeOptional
storeUidsstring[]Optional
Responses
200

Example response

application/json
post
/tenants/{tenantUid}/campaigns/search
200

Example response

Get list of campaigns

get
/tenants/{tenantUid}/campaigns

Get list of campaigns

Required permissions: CAMPAIGN

Authorizations
AuthorizationstringRequired

Access token recevied after user login with a deviceToken

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
ENUMDescription
ASCSort in ascending order
DESCSort 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
ENUMDescription
CAMPAIGNNormal campaign with rules set
PRICELISTA campaign that includes a pricelist. No rules applies
Possible values:
discountTypestring · enumOptional
ENUMDescription
CHEAPEST_PRODUCTCheapest product will be discounted
QUALIFIED_PRODUCTAll qualified products will be discounted
ORDER_DISCOUNTAn order discount will be added to the order
Possible values:
storeUidstringOptional

Reference to a storeUid

Pattern: ^[A-Za-z0-9-_]+
statusstring · enumOptional
ENUMDescription
NEWCampaign is in a modeling state. Can be modified
ACTIVECampaign is active, and is considered when making sales operations. Campaign can not be modified
CLOSEDCampaign is closed.
Possible values:
Responses
200

Example response

application/json
get
/tenants/{tenantUid}/campaigns
200

Example response

Create new campaign

post
/tenants/{tenantUid}/campaigns

Create new campaign

Required permissions: CAMPAIGN

Authorizations
AuthorizationstringRequired

Access token recevied after user login with a deviceToken

Path parameters
tenantUidstringRequired

Reference to a tenant.

Pattern: ^[A-Za-z0-9-_]+
Body
namestringRequired
displayNamestringRequired
validFromstring · date-timeRequired
validTostring · date-timeRequired
typestring · enumRequired
ENUMDescription
CAMPAIGNNormal campaign with rules set
PRICELISTA campaign that includes a pricelist. No rules applies
Possible values:
discountTypestring · enumOptional
ENUMDescription
CHEAPEST_PRODUCTCheapest product will be discounted
QUALIFIED_PRODUCTAll qualified products will be discounted
ORDER_DISCOUNTAn 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.

customerGroupUidstringOptionalPattern: ^[A-Za-z0-9-_]+
Responses
post
/tenants/{tenantUid}/campaigns
201

Example response

Get details for a campaign

get
/tenants/{tenantUid}/campaigns/{campaignUid}

Get details for a campaign

Required permissions: CAMPAIGN

Authorizations
AuthorizationstringRequired

Access token recevied after user login with a deviceToken

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
namestringRequired
statusstring · enumRequired
ENUMDescription
NEWCampaign is in a modeling state. Can be modified
ACTIVECampaign is active, and is considered when making sales operations. Campaign can not be modified
CLOSEDCampaign is closed.
Possible values:
displayNamestringRequired
validFromstring · date-timeRequired
validTostring · date-timeRequired
typestring · enumRequired
ENUMDescription
CAMPAIGNNormal campaign with rules set
PRICELISTA campaign that includes a pricelist. No rules applies
Possible values:
discountTypestring · enumRequired
ENUMDescription
CHEAPEST_PRODUCTCheapest product will be discounted
QUALIFIED_PRODUCTAll qualified products will be discounted
ORDER_DISCOUNTAn order discount will be added to the order
Possible values:
quantityThresholdintegerRequired
amountThresholdintegerRequired
discountAmountintegerRequired
discountPercentintegerRequired
maxUsageintegerRequired
priorityintegerRequired
campaignUidstringRequiredPattern: ^[A-Za-z0-9-_]+
campaignCodestringRequired
preventCombinationsbooleanRequired
get
/tenants/{tenantUid}/campaigns/{campaignUid}
200

Example response

Update an existing campaign

put
/tenants/{tenantUid}/campaigns/{campaignUid}

Update an existing campaign

Required permissions: CAMPAIGN

Authorizations
AuthorizationstringRequired

Access token recevied after user login with a deviceToken

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
ENUMDescription
NEWCampaign is in a modeling state. Can be modified
ACTIVECampaign is active, and is considered when making sales operations. Campaign can not be modified
CLOSEDCampaign 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
ENUMDescription
CHEAPEST_PRODUCTCheapest product will be discounted
QUALIFIED_PRODUCTAll qualified products will be discounted
ORDER_DISCOUNTAn order discount will be added to the order
Possible values:
preventCombinationsbooleanOptional
customerGroupUidstringOptionalPattern: ^[A-Za-z0-9-_]*
Responses
200

Example response

application/json
namestringRequired
statusstring · enumRequired
ENUMDescription
NEWCampaign is in a modeling state. Can be modified
ACTIVECampaign is active, and is considered when making sales operations. Campaign can not be modified
CLOSEDCampaign is closed.
Possible values:
displayNamestringRequired
validFromstring · date-timeRequired
validTostring · date-timeRequired
typestring · enumRequired
ENUMDescription
CAMPAIGNNormal campaign with rules set
PRICELISTA campaign that includes a pricelist. No rules applies
Possible values:
discountTypestring · enumRequired
ENUMDescription
CHEAPEST_PRODUCTCheapest product will be discounted
QUALIFIED_PRODUCTAll qualified products will be discounted
ORDER_DISCOUNTAn order discount will be added to the order
Possible values:
quantityThresholdintegerRequired
amountThresholdintegerRequired
discountAmountintegerRequired
discountPercentintegerRequired
maxUsageintegerRequired
priorityintegerRequired
campaignUidstringRequiredPattern: ^[A-Za-z0-9-_]+
campaignCodestringRequired
preventCombinationsbooleanRequired
put
/tenants/{tenantUid}/campaigns/{campaignUid}
200

Example response

Delete an existing campaign

delete
/tenants/{tenantUid}/campaigns/{campaignUid}

Delete an existing campaign

Required permissions: CAMPAIGN

Authorizations
AuthorizationstringRequired

Access token recevied after user login with a deviceToken

Path parameters
tenantUidstringRequired

Reference to a tenant.

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

Reference to a campaign.

Pattern: ^[A-Za-z0-9-_]+
Responses
delete
/tenants/{tenantUid}/campaigns/{campaignUid}
204

No Content

No content

Set selections on a campaign

post
/tenants/{tenantUid}/campaigns/{campaignUid}/selections

Set selections on a campaign

Required permissions: CAMPAIGN

Authorizations
AuthorizationstringRequired

Access token recevied after user login with a deviceToken

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
namestringRequired
statusstring · enumRequired
ENUMDescription
NEWCampaign is in a modeling state. Can be modified
ACTIVECampaign is active, and is considered when making sales operations. Campaign can not be modified
CLOSEDCampaign is closed.
Possible values:
displayNamestringRequired
validFromstring · date-timeRequired
validTostring · date-timeRequired
typestring · enumRequired
ENUMDescription
CAMPAIGNNormal campaign with rules set
PRICELISTA campaign that includes a pricelist. No rules applies
Possible values:
discountTypestring · enumRequired
ENUMDescription
CHEAPEST_PRODUCTCheapest product will be discounted
QUALIFIED_PRODUCTAll qualified products will be discounted
ORDER_DISCOUNTAn order discount will be added to the order
Possible values:
quantityThresholdintegerRequired
amountThresholdintegerRequired
discountAmountintegerRequired
discountPercentintegerRequired
maxUsageintegerRequired
priorityintegerRequired
campaignUidstringRequiredPattern: ^[A-Za-z0-9-_]+
campaignCodestringRequired
preventCombinationsbooleanRequired
post
/tenants/{tenantUid}/campaigns/{campaignUid}/selections
200

Example response

List products for a campaign

get
/tenants/{tenantUid}/campaigns/{campaignUid}/products

List products for a campaign

Required permissions: CAMPAIGN

Authorizations
AuthorizationstringRequired

Access token recevied after user login with a deviceToken

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
ENUMDescription
ASCSort in ascending order
DESCSort in descending order
Possible values:
selectionstring · enumOptional
ENUMDescription
INCLUDEQuery for included products in campaign
EXCLUDEQuery for excluded products in campaign
Possible values:
Responses
200

Example response

application/json
get
/tenants/{tenantUid}/campaigns/{campaignUid}/products
200

Example response

Last updated