SysGetPromotionList
Returns the list of configured promotions (without full details).
Service | Operation |
---|---|
promotions | SYS_GET_PROMOTION_LIST |
Method Parameters
Parameter | Description |
---|---|
type | SCHEDULED or AUTOMATED to filter specific type, or empty string to return all promotions. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
var type = "SCHEDULED"
var promotionsProxy = bridge.getPromotionsServiceProxy();
var postResult = promotionsProxy.sysGetPromotionList(type);
if (postResult.status == 200) {
// Success!
}
{
"service": "promotions",
"operation": "SYS_GET_PROMOTION_LIST",
"data": {
"type": "SCHEDULED"
}
}
JSON Response
{
"data": {
"promotions": [
{
"promotionId": 1,
"type": "SCHEDULED",
"name": "Independence Day Sale",
"enabled": false,
"segments": [],
"startAt": 1593781259911,
"endAt": 1594126859911,
"createdAt": 1592543345470,
"updatedAt": 1592543345470,
"version": 1
},
{
"promotionId": 2,
"type": "SCHEDULED",
"name": "Good Friday Day Sale",
"enabled": false,
"segments": [],
"startAt": 1593781259911,
"endAt": 1594126859911,
"createdAt": 1592572610332,
"updatedAt": 1592572610332,
"version": 1
}
]
},
"status": 200
}