Trendsic Platform Service

<back to all web services

NotificationRecipientRequest

Requires Authentication
Requires any of the roles:Agent, Administrator, Agent, Administrator, Agent, Administrator, Agent, Administrator
The following routes are available for this service:
GET,POST,PUT,DELETE,OPTIONS/v1/NotificationRecipient/{NotificationRecipientId}
GET,POST,PUT,DELETE,OPTIONS/v1/NotificationRecipient
import Foundation
import ServiceStack

public class NotificationRecipientRequest : Codable
{
    public var notificationRecipient:[NotificationRecipientExtended] = []

    required public init(){}
}

public class NotificationRecipientExtended : NotificationRecipient
{
    public var recipientName:String

    required public init(){ super.init() }

    private enum CodingKeys : String, CodingKey {
        case recipientName
    }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
        let container = try decoder.container(keyedBy: CodingKeys.self)
        recipientName = try container.decodeIfPresent(String.self, forKey: .recipientName)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
        var container = encoder.container(keyedBy: CodingKeys.self)
        if recipientName != nil { try container.encode(recipientName, forKey: .recipientName) }
    }
}

public class NotificationRecipient : Codable
{
    public var notificationRecipientId:Int
    public var notificationMessageId:Int
    public var recipientId:Int
    public var folder:String
    public var isStarred:Bool
    public var isImportant:Bool
    public var isRead:Bool
    public var isDeleted:Bool

    required public init(){}
}

public class NotificationRecipientResponse : Codable
{
    public var responseStatus:ResponseStatus
    public var notificationRecipient:[NotificationRecipientExtended] = []

    required public init(){}
}


Swift NotificationRecipientRequest 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 /v1/NotificationRecipient/{NotificationRecipientId} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	NotificationRecipient: 
	[
		{
			RecipientName: String,
			NotificationRecipientId: 0,
			NotificationMessageId: 0,
			RecipientId: 0,
			Folder: String,
			IsStarred: False,
			IsImportant: False,
			IsRead: False,
			IsDeleted: False
		}
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	NotificationRecipient: 
	[
		{
			RecipientName: String,
			NotificationRecipientId: 0,
			NotificationMessageId: 0,
			RecipientId: 0,
			Folder: String,
			IsStarred: False,
			IsImportant: False,
			IsRead: False,
			IsDeleted: False
		}
	]
}