Appearance
getSentNotifications ​
Retrieves a list of "sent" notifications spanning both "adhoc" and "scheduled" notifications.
Request ​
http
GET /rest/notification/sentHeaders ​
| Header | Required | Description |
|---|---|---|
x-nextinteract-authtoken | Yes | Auth token returned from loginUser |
Parameters ​
| Parameter | Type | Required | Description |
|---|---|---|---|
version | Long | Yes | The version of this API. Currently 1. |
broadcastType | String | Yes | The broadcast type of the sent message. Usually GT, GE or JN. |
companyId | Long | Yes (if broadcastType=GT) | The company id. |
eventUUID | String | Yes (if broadcastType=GE) | The event UUID. |
notificationScheduleId | Long | No | Permits the retrieval of a "single" record based on a known notificationScheduleId. |
brochureId | Number | No | Used to retrieve asset-level notifications of type=GA. |
e.g. /rest/notification/sent?version=1&broadcastType=GE&companyId=3
Team Notifications GET /rest/notification/sent?version=1&broadcastType=GT&companyId=3 Event Notifications GET /rest/notification/sent?version=1&broadcastType=ET&eventUUID=MY-d79f-EVENT-hdea67-UUID Single Notification GET /rest/notification/sent?version=1¬ificationScheduleId
Response ​
200 OK ​
SAMPLE RESPONSE (array of)
json
[
{
"type": "GT",
"companyId": 3,
"notificationScheduleId": 123,
"message": "This is a test of a company team message.",
"description": "This field can contain team ids if not a scheduled notification",
"successful": true,
"totalNotificationsSent": 45,
"notificationCreated": 1572950714981,
"notificationCreatedBy": "654",
"notificationModified": 1572950714981,
"notificationModifiedBy": "721",
"teamIds": [
"7",
"6",
"5"
]
},
{
"type": "GE",
"companyId": 3,
"eventUUID": "6d05e1e6-2db8-4b38-af60-b6ed5721ba43",
"notificationScheduleId": 123,
"message": "This is a test of an event message.",
"description": "This field can contain team ids if not a scheduled notification",
"successful": true,
"totalNotificationsSent": 127,
"notificationCreated": 1572950714989,
"notificationCreatedBy": "654",
"notificationModified": 1572950714989,
"notificationModifiedBy": "721",
"teamIds": [
"7",
"6",
"5"
]
}
]Response Fields ​
| Field | Type | Description |
|---|---|---|
type | String(2) | The broadcast type of the notification - GT, GE, or JN. |
companyId | Long | The id of the company this notification belongs to. |
notificationScheduleId | Long | An optional id used to link back to a scheduled notification. Only present when the notification was scheduled. |
message | String(255) | The truncated message that was sent. |
description | String(2000) | A long description of the notification. Can contain team ids. |
successful | Boolean | Indicates whether the sending of the notification was successful or not. |
teamIds | Set of Strings | An optional list of teams ids which are only available when the notification was scheduled. Adhoc notifications store the teams ids in the description. |
notificationCreated | Date/Time | UTC date/time this record was created. |
notificationCreatedBy | String(15) | User id of the user that created this record. |
notificationModified | Date/Time | UTC date/time this record was modified. |
notificationModifiedBy | String(15) | User id of the user that modified this record. |
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)]. |
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 |