Appearance
getUserNotifications ​
Returns the Notifications for a given user sorted from latest to oldest and capped to 30 days (system-configurable).
Supported Notification Groupis as at 30 Jan 2019: Id | Name C=Company E=Event A=Asset G=General
Supported Notification Types as at 31 Oct 2018: Id | Name 1=Connection Invite 2=Event Invite 3=Asset Update 4=Smart Library Update 5=Basic Message
Notification Statuses Code | Name | Desc U | Unviewed | Not seen V | Viewed | Seen A | Archived | Moved to Archive table (out of scope for devices v1)
NOTE: as at 06/02/2019 we only support:
C1E2A3, A4G5
and these are controlled internally but we've kept it flexible so in the future we could support other combinations of these that make sense. It is not hierarchical.
Refer to: https://healthinteract.tpondemand.com/entity/13738-push-notifications-created-by-api-via for details on when and which deeplinks will be applied per message type e.g.
For GE (Generic Events) push notifications - the deeplink should contain cid and eUUID e.g. https://my.interact.technology/m/open?cid=4241&eUUID=1078b974-d97d-493b-84e5-a99d514d9a39 For GT (Generic Team) push notifications) - the deeplink should contain only cid e.g. https://my.interact.technology/m/open?cid=3883 For SN (Smart Library) push notifications - the deeplink should contain id and cid e.g. https://my.interact.technology/m/open?id=15952&cid=2682
Request ​
http
GET /rest/user/notificationsHeaders ​
| Header | Required | Description |
|---|---|---|
x-nextinteract-authtoken | Yes | Auth token returned from loginUser |
Parameters ​
types (optional) valid values 1,2,3,4 (see description) e.g. types=1&types=2&types=3
Response ​
200 OK ​
Sample call : http://localhost:8080/nextinteract-webapp/rest/user/notifications?types=3&types=2
RESPONSE:
json
[
{
"userNotificationId": 1,
"userNotificationTypeId": 1,
"userNotificationTypeName": "Connection Invite",
"message": "Invitation to My Interact Finance",
"notificationURL": null,
"status": "U",
"companyId": 3,
"companyName": "My Interact Finance",
"dateSent": 1540936830489,
"eventId" : null,
"eventUUID" : null,
"notificationGroupCode" : "C",
"notificationGroupName" : "Company"
},
{
"userNotificationId": 2,
"userNotificationTypeId": 2,
"userNotificationTypeName": "Event Invite",
"message": "Invitation to Some Event",
"notificationURL": "https://deeplink?goes=here",
"status": "U",
"companyId": 4,
"companyName": "My Interact Technology",
"dateSent": 1540936930589,
"eventId" : 57,
"eventUUID" : "ABC-123-DEF-456-987",
"notificationGroupCode" : "E",
"notificationGroupName" : "Event"
}
]Errors ​
| Exception | Description |
|---|---|
WSInvalidAuthTokenException | See Error Definitions |
WSCacheServiceException | See Error Definitions |
WSInvalidParameterException | See Error Definitions |
WSUserNotificationServiceException | See Error Definitions |