Appearance
getScheduledNotifications ​
Retrieves a list of currently scheduled notifications that have been created using the sendNotification API.
Response Fields ​
| Field | Type | Description |
|---|---|---|
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. |
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
GET /rest/notification/scheduledHeaders ​
| Header | Required | Description |
|---|---|---|
x-nextinteract-authtoken | Yes | Auth token returned from loginUser |
Parameters ​
SAMPLE REQUEST Team Notifications GET /rest/notification/scheduled?version=1&broadcastType=GT&companyId=3 Event Notifications GET /rest/notification/scheduled?version=1&broadcastType=ET&eventUUID=MY-d79f-EVENT-hdea67-UUID Single Notification GET /rest/notification/scheduled?version=1¬ificationScheduleId
Response ​
200 OK ​
SAMPLE RESPONSE (array of)
json
[
{
"version": 3,
"companyId": 3,
"broadcastType": "GT",
"keyCompanyId": 3,
"scheduleTimezoneId": "Australia/Sydney",
"scheduleLocalDateTime": 1584589293934,
"scheduleJobName": "optionalJobName",
"message": "This is a test of the emergency broadcast system.",
"url": "https://my.interact.technology",
"valueIds": [
"5",
"6",
"7"
],
"emailTemplate": "Client.3.TestCompany.Mandrill.html",
"emailSubject": "Emergency Subject",
"emailParams": [
{
"key": "emailLogoURL",
"value": "https://www.clienturl.com/logo.jpg"
},
{
"key": "userFirstName",
"value": "userFirstName"
},
{
"key": "emailDescription",
"value": "This is the main message to be injected into my email template"
},
{
"key": "emailLink",
"value": "https://www.clienturl.com/link_to_resource.html"
}
],
"totalNotificationsSent": 235,
"notificationLog": "Success",
"scheduleCreated": 1584589293934,
"scheduleCreatedBy": "654",
"scheduleModified": 1584589293934,
"scheduleModifiedBy": "721"
},
{
"version": 3,
"companyId": 3,
"broadcastType": "GT",
"keyCompanyId": 3,
"scheduleTimezoneId": "Australia/Sydney",
"scheduleLocalDateTime": 1584589293935,
"scheduleJobName": "optionalJobName2",
"message": "Forum Asset has been updated. Please refresh for the latest posts",
"url": "https://my.interact.technology",
"valueIds": [
"5",
"6",
"7"
],
"emailTemplate": "Client.3.TestCompany.Mandrill.html",
"emailSubject": "Emergency Subject",
"emailParams": [
{
"key": "emailLogoURL",
"value": "https://www.clienturl.com/logo.jpg"
},
{
"key": "userFirstName",
"value": "userFirstName"
},
{
"key": "emailDescription",
"value": "This is the main message to be injected into my email template"
},
{
"key": "emailLink",
"value": "https://www.clienturl.com/link_to_resource.html"
}
],
"totalNotificationsSent": 0,
"notificationLog": "InvalidParameterException('Some error message here'",
"scheduleCreated": 1584589293935,
"scheduleCreatedBy": "654",
"scheduleModified": 1584589293935,
"scheduleModifiedBy": "721"
}
]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 |