Notifications
Get List of Functions
Returns information about a notification functions that can be configured for the current signed in user. If the current user is not registered as an actor, an object is returned with the items and the channelTypes property set to null.
Request
Example
Parameters
(none)
Response
Example
{
"items": [
{
"id": "3199",
"displayName": "Mina intresseanmälningar",
"channels": [
{
"type": "email",
"changeable": true,
"subscribed": true,
"exceptions": [
{
"id": "2223",
"displayName": "Uthyrning Intresse: Bekräftelse intresseanmälan"
}
]
},
{
"type": "box",
"subscribed": true
}
]
},
{
"id": "3196",
"displayName": "Mina meddelanden",
"channels": [
{
"type": "email",
"changeable": true,
"subscribed": true
},
{
"type": "box",
"subscribed": true
}
]
}
],
"channelTypes": [
{
"id": "email",
"displayName": "E-post"
},
{
"id": "box",
"displayName": "Mina sidor meddelande"
}
]
}
If the current user is not a registered actor, the following is returned:
|Name|Description| |----|--------------------------------------------------------------------| |items|List of functions.| |channelTypes|List of channel types.|.items
| Name | Description |
|---|---|
| id | Id of function. |
| displayName | Display name of the notification function. |
| channels | List of channels available for configuration for the function. |
.items.channels
| Name | Description |
|---|---|
| id | Id of channel-type (see .channelTypes below). |
| changeable | true if the current user is allowed to change the subscribed flag for the channel. |
| subscribed | true if the current user is currently subscribed to received notifications for this function. |
| exceptions | List of exceptions from the subscribed flag. Contains data when the user uses a unsubscribe link in a mail to unsubscribe a specific notification type in an e-mail (see below). Use the Clear Function Exceptions API below to remove all exceptions. |
.items.channels.exceptions
| Name | Description |
|---|---|
| id | Id of the notification type the exception concerns. |
| displayName | Display name of the notification type. |
| subscribed | true if the current user is currently subscribed to received notifications of the notification type, otherwise false. |
.channelTypes
| Name | Description |
|---|---|
| id | Id of channel type. |
| displayName | Display name of the channel type. |
Clear Function Exceptions
Remove function channel exceptions, for a specific function or all functions, for the current user.
Request
Example
Remove all exceptions for the current user:
Remove exceptions for a specific notification function:
Parameters
| Name | Description |
|---|---|
| function | Skip to remove all exceptions, or provide a function id (such as 3199) received from the Get List of Functions API detailed above, to remove only exceptions saved for that function. |
Response
(none)