Skip to main content
Version: 5.7.0

SysEnablePromotion

Enable/Disable a promotion. A convenience API for easily toggling a promotion on/off.

ServiceOperation
promotionsSYS_ENABLE_PROMOTION

Method Parameters

ParameterDescription
promotionIdID uniquely identifying the promotion to update. Note: If promotionId is included in the promotionJson, it is ignored. The promotionId provided as a direct parameter takes priority.
versionVersion of the promotion to update. Can bypass version check by passing in -1.
enabledFlag true to enable promotion, false to disable promotion.

Usage

http://localhost:3000
// Cloud Code only. To view example, switch to the Cloud Code tab
JSON Response
{
"data": {
"promotion": {
"promotionId": 1,
"type": "SCHEDULED",
"name": "Independence Day Sale",
"message": {
"en": "Happy 4th of July!"
},
"enabled": true,
"segments": [],
"prices": [
{
"itemId": "coinbundle10",
"priceId": 0
}
],
"notifications": [
{
"trigger": "ACTIVATED",
"notificationTemplateId": 1
}
],
"startAt": 1593781259911,
"endAt": 1594126859911,
"createdAt": 1592543866698,
"updatedAt": 1592590019283,
"version": 2
}
},
"status": 200
}