SysReadPromotion
Returns the full configuration data of the specified promotion.
Service | Operation |
---|---|
promotions | SYS_READ_PROMOTION |
Method Parameters
Parameter | Description |
---|---|
promotionId | ID uniquely identifying the promotion to read. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
var promotionId = 1
var promotionsProxy = bridge.getPromotionsServiceProxy();
var postResult = promotionsProxy.sysReadPromotion(promotionId);
if (postResult.status == 200) {
// Success!
}
{
"service": "promotions",
"operation": "SYS_READ_PROMOTION",
"data": {
"promotionId": 1
}
}
JSON Response
{
"data": {
"promotion": {
"promotionId": 1,
"type": "SCHEDULED",
"name": "Independence Day Sale",
"message": {
"en": "Happy 4th of July!"
},
"enabled": false,
"segments": [],
"prices": [
{
"itemId": "coinbundle10",
"priceId": 0
}
],
"notifications": [
{
"trigger": "ACTIVATED",
"notificationTemplateId": 1
}
],
"customJson": {
"key": "value"
},
"startAt": 1593781259911,
"endAt": 1594126859911,
"createdAt": 1592543345470,
"updatedAt": 1592543345470,
"version": 1
}
},
"status": 200
}