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
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 .jsv suffix or ?format=jsv

HTTP + 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
		}
	}
}