Skip to main content
Version: 5.7.0

SysUpdatePromotion

Updates the specified promotion with the provided promotionJson. Any promotionId included in the promotionJson will be ignored.

ServiceOperation
promotionsSYS_UPDATE_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.
promotionJsonThe full promotion JSON (minus the promotionId).

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!",
"fr": "Joyeux 4 juillet!"
},
"enabled": true,
"segments": [
1
],
"prices": [
{
"itemId": "coinbundle10",
"priceId": 1
}
],
"notifications": [
{
"trigger": "ACTIVATED",
"notificationTemplateId": 1
}
],
"customJson": {
"key": "value"
},
"startAt": 1593781140000,
"endAt": 1594126859999,
"createdAt": 1592543345470,
"updatedAt": 1592589083592,
"version": 2
}
},
"status": 200
}