Trendsic Platform Service

<back to all web services

UserNotificationsRequest

Requires Authentication
Requires any of the roles:Worker, Agent, Administrator, Agent, Administrator
The following routes are available for this service:
GET,OPTIONS/v1/UserNotifications/{AgentId}
DELETE,OPTIONS/v1/UserNotifications/{NotificationId}
import Foundation
import ServiceStack

public class UserNotificationsRequest : Codable
{
    public var agentId:Int
    public var notificationId:Int
    public var showDeleted:Bool

    required public init(){}
}

public class UserNotificationsResponse : Codable
{
    public var responseStatus:ResponseStatus
    public var notifications:[UserNotification] = []
    public var deleted:Bool

    required public init(){}
}

public class UserNotification : Codable
{
    public var notificationId:Int
    public var agentId:Int
    public var Description:String
    public var from:String
    public var createdDate:Date
    public var type:String
    public var url:String
    public var refId:String
    public var isDeleted:Bool

    required public init(){}
}


Swift UserNotificationsRequest 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.

GET /v1/UserNotifications/{AgentId} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
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
		}
	},
	Notifications: 
	[
		{
			NotificationId: 0,
			AgentId: 0,
			Description: String,
			From: String,
			CreatedDate: 0001-01-01,
			Type: String,
			URL: String,
			RefId: String,
			IsDeleted: False
		}
	],
	Deleted: False
}