Appearance
getSentScheduledNotifications ​
Retrieves a list of "sent" 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, or GA - Generic Asset 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. |
totalNotificationsSent | Integer | The total number of notifications sent to users. |
notificationLog | String(2000) | A log of any errors or "Success" when successful. Normally holds the stack trace if errors thrown during processing. |
scheduleCreated | Date/Time UTC | The date/time the schedule was created. |
scheduleCreatedBy | String(15) | User id of the user that created the notification. |
scheduleModified | Date/Time UTC | The date/time the schedule was modified. |
scheduleModifiedBy | String(15) | User id of the user that last modified the notification. |
brochureId | Number | Only used when the API caller wants to honour User unsubscribes via the ALP (Asset Level Preferences) ALP-NUN and ALP-EUN. Also used to retrieve asset notifications of type=GA. |
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)]. |
Request ​
http
GET /rest/notification/scheduled/sentHeaders ​
| Header | Required | Description |
|---|---|---|
x-nextinteract-authtoken | Yes | Auth token returned from loginUser |
Parameters ​
SAMPLE REQUEST Team Notifications GET /rest/notification/scheduled/sent?version=1&broadcastType=GT&companyId=3 Event Notifications GET /rest/notification/scheduled/sent?version=1&broadcastType=ET&eventUUID=MY-d79f-EVENT-hdea67-UUID Single Notification GET /rest/notification/scheduled/sent?version=1¬ificationScheduleId
Response ​
200 OK ​
SAMPLE RESPONSE (array of)
json
[
{
"version": 3,
"companyId": 3,
"broadcastType": "GT",
"keyCompanyId": 3,
"scheduleTimezoneId": "Australia/Sydney",
"scheduleLocalDateTime": 1570166400311,
"scheduleJobName": "optionalJobName",
"message": "This is a test of the emergency broadcast system.",
"url": "https://my.interact.technology",
"valueIds": [
"5",
"6",
"7"
],
"totalNotificationsSent": 235,
"notificationLog": "Success",
"scheduleCreated": 1570166400311,
"scheduleCreatedBy": "654",
"scheduleModified": 1570166400311,
"scheduleModifiedBy": "721"
},
{
"version": 3,
"companyId": 3,
"broadcastType": "GT",
"keyCompanyId": 3,
"scheduleTimezoneId": "Australia/Sydney",
"scheduleLocalDateTime": 1570166400311,
"scheduleJobName": "optionalJobName2",
"message": "Forum Asset has been updated. Please refresh for the latest posts",
"url": "https://my.interact.technology",
"valueIds": [
"5",
"6",
"7"
],
"totalNotificationsSent": 0,
"notificationLog": "InvalidParameterException('Some error message here'",
"scheduleCreated": 1570166400311,
"scheduleCreatedBy": "654",
"scheduleModified": 1570166400311,
"scheduleModifiedBy": "721"
}
]json
[
{
"notificationScheduleId": 268,
"companyId": 3,
"broadcastType": "GT",
"keyCompanyId": 3,
"scheduleTimezoneId": "Australia/Sydney",
"scheduleLocalDateTime": 1584616020000,
"message": "Team",
"valueIds": [
"1"
],
"emailTemplate": "Client.3.TestCompany.Mandrill.html",
"emailSubject": "Email Subject",
"emailParams": [
{
"key": "emailKey",
"value": "Email Value"
}
],
"totalNotificationsSent": 91,
"notificationLog": "Success",
"scheduleCreated": 1584616073937,
"scheduleCreatedBy": "UNITTEST",
"scheduleModified": 1584616073937,
"scheduleModifiedBy": "UNITTEST"
}
]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 |