SysGetNotificationTemplates
Returns an array of the notification templates defined - with the text for the specified language.
Service | Operation |
---|---|
pushNotification | SYS_GET_NOTIFICATION_TEMPLATES |
Method Parameters
Parameter | Description |
---|---|
defaultLanguageCode | The language code (lowercase) to be used for returning the default message text. |
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 defaultLanguageCode = "en";
var pushNotificationProxy = bridge.getPushNotificationServiceProxy();
var postResult = pushNotificationProxy.sysGetNotificationTemplates(defaultLanguageCode);
if (postResult.status == 200) {
// Success!
}
{
"service": "pushNotification",
"operation": "SYS_GET_NOTIFICATION_TEMPLATES",
"data": {
"defaultLanguageCode": "en",
}
}
}
JSON Response
{
"data": {
"pushTemplates": [
{
"notificationTemplateId": 1,
"name": "awesomeSaleNotification",
"defaultMessage": "This is english text!",
"updatedAt": 1591730181151
},
{
"notificationTemplateId": 2,
"name": "anotherNotification",
"message": "This is another notification",
"updatedAt": 1591734121222
}
]
},
"status": 200
}