| All Verbs | /api/contact/{ContactId}/notifications |
|---|
import Foundation
import ServiceStack
/**
* Get notifications for the specified contact
*/
// @Api(Description="Get notifications for the specified contact")
public class GetContactNotifications : Codable
{
/**
* Id of contact to get notifications for
*/
// @ApiMember(Description="Id of contact to get notifications for", IsRequired=true, Name="ContactId")
public var contactId:String
/**
* Id of licensee to get notifications for
*/
// @ApiMember(Description="Id of licensee to get notifications for", IsRequired=true, Name="LicenseeId")
public var licenseeId:String
/**
* Id of suite to get notifications for
*/
// @ApiMember(Description="Id of suite to get notifications for", IsRequired=true, Name="Suite")
public var suiteId:String
required public init(){}
}
// @ApiResponse(Description="List of contact notifications")
public class GetContactNotificationsResponse : Codable
{
public var notifications:[NotificationGroup]
public var responseStatus:ResponseStatus
required public init(){}
}
public class NotificationGroup : Codable
{
public var groupName:String
public var notifications:[NotificationDetails]
required public init(){}
}
public class NotificationDetails : Codable
{
public var notificationId:String
public var notificationGroupName:String
public var notificationValueId:String
public var name:String
public var Description:String
public var isMandatory:Bool
public var isCardinality:Bool
public var isSystem:Bool
public var isVisibleToRecipients:Bool
public var index:Int
public var email:InputSwitch
public var sms:InputSwitch
public var updateNotification:InputSwitch
public var push:InputSwitch
public var phone:InputSwitch
required public init(){}
}
public class InputSwitch : Codable
{
public var id:String
public var name:String
public var isDisabled:Bool
public var isChecked:Bool
required public init(){}
}
Swift GetContactNotifications DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
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/csv
Content-Type: text/csv
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: text/csv
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"}}}