| 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 .jsv suffix or ?format=jsv
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: text/jsv
Content-Type: text/jsv
Content-Length: length
{
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Notifications:
[
{
GroupName: String,
Notifications:
[
{
NotificationGroupName: String,
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
}
}
}