Platform API

<back to all web services

GetContactNotifications

Get notifications for the specified contact

Requires Authentication
The following routes are available for this service:
All Verbs/api/contact/{ContactId}/notifications
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Eros.Subtle.Canvara.WebAPIModel.ServiceModel
Imports Eros.Causal.Common.Entity

Namespace Global

    Namespace Eros.Causal.Common.Entity

        Public Partial Class InputSwitch
            Public Overridable Property Id As String
            Public Overridable Property Name As String
            Public Overridable Property IsDisabled As Boolean
            Public Overridable Property IsChecked As Boolean
        End Class

        Public Partial Class NotificationDetails
            Public Overridable Property NotificationId As Guid
            Public Overridable Property NotificationGroupName As String
            Public Overridable Property NotificationValueId As Guid
            Public Overridable Property Name As String
            Public Overridable Property Description As String
            Public Overridable Property IsMandatory As Boolean
            Public Overridable Property IsCardinality As Boolean
            Public Overridable Property IsSystem As Boolean
            Public Overridable Property IsVisibleToRecipients As Boolean
            Public Overridable Property Index As Integer
            Public Overridable Property Email As InputSwitch
            Public Overridable Property SMS As InputSwitch
            Public Overridable Property UpdateNotification As InputSwitch
            Public Overridable Property Push As InputSwitch
            Public Overridable Property Phone As InputSwitch
        End Class

        Public Partial Class NotificationGroup
            Public Overridable Property GroupName As String
            Public Overridable Property Notifications As List(Of NotificationDetails)
        End Class
    End Namespace

    Namespace Eros.Subtle.Canvara.WebAPIModel.ServiceModel

        '''<Summary>
        '''Get notifications for the specified contact
        '''</Summary>
        <Api(Description:="Get notifications for the specified contact")>
        Public Partial Class GetContactNotifications
            '''<Summary>
            '''Id of contact to get notifications for
            '''</Summary>
            <ApiMember(Description:="Id of contact to get notifications for", IsRequired:=true, Name:="ContactId")>
            Public Overridable Property ContactId As Guid

            '''<Summary>
            '''Id of licensee to get notifications for
            '''</Summary>
            <ApiMember(Description:="Id of licensee to get notifications for", IsRequired:=true, Name:="LicenseeId")>
            Public Overridable Property LicenseeId As Guid

            '''<Summary>
            '''Id of suite to get notifications for
            '''</Summary>
            <ApiMember(Description:="Id of suite to get notifications for", IsRequired:=true, Name:="Suite")>
            Public Overridable Property SuiteId As Guid
        End Class

        <ApiResponse(Description:="List of contact notifications")>
        Public Partial Class GetContactNotificationsResponse
            Public Overridable Property Notifications As List(Of NotificationGroup)
            Public Overridable Property ResponseStatus As ResponseStatus
        End Class
    End Namespace
End Namespace

VB.NET GetContactNotifications DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/contact/{ContactId}/notifications HTTP/1.1 
Host: pfapi.pstpf.com.au 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"ContactId":"00000000-0000-0000-0000-000000000000","LicenseeId":"00000000-0000-0000-0000-000000000000","SuiteId":"00000000-0000-0000-0000-000000000000"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Notifications":[{"GroupName":"String","Notifications":[{"NotificationId":"00000000-0000-0000-0000-000000000000","NotificationGroupName":"String","NotificationValueId":"00000000-0000-0000-0000-000000000000","Name":"String","Description":"String","IsMandatory":false,"IsCardinality":false,"IsSystem":false,"IsVisibleToRecipients":false,"Index":0,"Email":{"Id":"String","Name":"String","IsDisabled":false,"IsChecked":false},"SMS":{"Id":"String","Name":"String","IsDisabled":false,"IsChecked":false},"UpdateNotification":{"Id":"String","Name":"String","IsDisabled":false,"IsChecked":false},"Push":{"Id":"String","Name":"String","IsDisabled":false,"IsChecked":false},"Phone":{"Id":"String","Name":"String","IsDisabled":false,"IsChecked":false}}]}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}