Appearance
updateScheduledNotification ​
Updates a "single" scheduled notification that has not yet been sent.
Response Fields ​
| Field | Type | Description |
|---|---|---|
version | Integer | Currently supported version is 1. |
notificationScheduleId | Integer | The primary key of the created record. |
companyId | Integer | The company id that this record relates to. |
broadcastType | String(2) | The type of broadcast: GE - Generic Events notification, GT - Generic Team Push Notification. |
keyCompanyId | Integer | The key of the company id when broadcastType=GT as sent in original request - should match companyId. |
keyEventUUID | Integer | The key of the event UUID when broadcastType=GE as sent in original request. |
scheduleTimezoneId | String(40) | The timezone id of the scheduled notification. |
scheduleLocalDateTime | Datetime | The local date/time in the timezone this notification will be sent. |
scheduleJobName | String(100) | The name of a previously configured job to run on the SAM server. |
message | String(1000) | The plain text message to be sent. |
url | String(1024) | The optional URL to be sent in the notification (deeplink or normal). |
valueIds | Array of Strings | Team ids to send this notification to. Must belong to companyId. Can also be Product Codes for Pfizer Stock status notifications. |
brochureId | Number | Only used when the API caller wants to honour User unsubscribes via the ALP (Asset Level Preferences) ALP-NUN (Notification Unsubscribe) and ALP-EUN (Email Unsubscribe). |
emailTemplate | String(100) | Only used when an email is required to be sent along with the notification. |
emailSubject | String(256) | Only used when an email is required to be sent along with the notification. MUST be present if emailTemplate is present. |
emailParams | Array of Param objects | An array of objects representing both "generic (common)" and "personalised (user-specific)" params. Each param object contains key [String(100)] and value [String(2000)]. |
NOTE: the combined length of message + url cannot exceed 2000 characters.
Request ​
http
PUT /rest/notification/scheduledHeaders ​
| Header | Required | Description |
|---|---|---|
x-nextinteract-authtoken | Yes | Auth token returned from loginUser |
Parameters ​
SAMPLE REQUEST
NOTE: broadcastType, companyId, keyCompanyId, and keyEventUUID cannot be updated.
PUT /rest/notification/schedule
json
{
"version": 1,
"valuesIds": [
"7"
],
"message": "Updated message and date/time",
"notificationScheduleId": 23,
"url": "http://google.com",
"scheduleTimezoneId": "Australia/Sydney",
"scheduleLocalDateTime": 1567662973000
}Response ​
200 OK ​
SAMPLE RESPONSES
json
{
"notificationScheduleId": 23,
"companyId": 3,
"broadcastType": "GT",
"keyCompanyId": 3,
"scheduleTimezoneId": "Australia/Sydney",
"scheduleLocalDateTime": 1567662973000,
"message": "Updated message and date/time",
"url": "http://google.com",
"valueIds": [
7
]
}json
{
"notificationScheduleId": 242,
"companyId": 3,
"broadcastType": "GT",
"keyCompanyId": 3,
"scheduleTimezoneId": "Pacific/Auckland",
"scheduleLocalDateTime": 1585046524000,
"message": "Test Me",
"url": "URL",
"valueIds": [
"123",
"456"
],
"emailTemplate": "EmailTemplate",
"emailSubject": "EmailSubject",
"emailParams": [
{
"key": "emailBody",
"value": "My Body"
},
{
"key": "emailSubject",
"value": "My Subject"
}
]
}Errors ​
| Exception | Description |
|---|---|
WSInvalidParameterException | See Error Definitions |
WSUnsupportedVersionException | See Error Definitions |
WSInvalidAuthTokenException | See Error Definitions |
WSCacheServiceException | See Error Definitions |
WSInsufficientPrivilegesException | See Error Definitions |
WSEventCancelledException | See Error Definitions |
WSEventNotFoundException | See Error Definitions |
WSEventServiceException | See Error Definitions |
WSNotificationServiceException | See Error Definitions |