Platform API

<back to all web services

InsertNotification

Inserts a new notification

Requires Authentication
The following routes are available for this service:
POST/api/notification/insert
namespace Eros.Subtle.Canvara.WebAPIModel.ServiceModel

open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type NotificationRole() = 
        member val RoleId:Guid = new Guid() with get,set
        member val RoleName:String = null with get,set

    [<AllowNullLiteral>]
    type Notification() = 
        member val NotificationId:Guid = new Guid() with get,set
        member val NotificationGroupId:Guid = new Guid() with get,set
        member val NotificationGroupName:String = null with get,set
        member val SuiteId:Guid = new Guid() with get,set
        member val SuiteName:String = null with get,set
        member val NotificationValueId:Guid = new Guid() with get,set
        member val Roles:ResizeArray<NotificationRole> = null with get,set
        member val RolesToDisplay:String = null with get,set
        member val Name:String = null with get,set
        member val Description:String = null with get,set
        member val IsMandatory:Boolean = new Boolean() with get,set
        member val IsCardinality:Boolean = new Boolean() with get,set
        member val IsSystem:Boolean = new Boolean() with get,set
        member val IsAudit:Boolean = new Boolean() with get,set
        member val IsVisibleToRecipients:Boolean = new Boolean() with get,set
        member val IsSingleUse:Boolean = new Boolean() with get,set
        member val Email:Boolean = new Boolean() with get,set
        member val EmailDefault:Boolean = new Boolean() with get,set
        member val EmailTemplateId:Guid = new Guid() with get,set
        member val EmailTemplateBody:String = null with get,set
        member val EmailSubject:String = null with get,set
        member val SMS:Boolean = new Boolean() with get,set
        member val SMSDefault:Boolean = new Boolean() with get,set
        member val SMSTemplateId:Guid = new Guid() with get,set
        member val SMSTemplateBody:String = null with get,set
        member val UpdateNotification:Boolean = new Boolean() with get,set
        member val UpdateNotificationDefault:Boolean = new Boolean() with get,set
        member val UpdateTemplateId:Guid = new Guid() with get,set
        member val UpdateTemplateBody:String = null with get,set
        member val UpdateSubject:String = null with get,set
        member val Push:Boolean = new Boolean() with get,set
        member val PushDefault:Boolean = new Boolean() with get,set
        member val Phone:Boolean = new Boolean() with get,set
        member val PhoneDefault:Boolean = new Boolean() with get,set
        member val ContactIdOwner:Guid = new Guid() with get,set
        member val RecordStatus:String = null with get,set
        member val EmailTemplateDefinitionId:Guid = new Guid() with get,set
        member val SMSTemplateDefinitionId:Guid = new Guid() with get,set
        member val UpdateTemplateDefinitionId:Guid = new Guid() with get,set
        member val Index:Int32 = new Int32() with get,set

    ///<summary>
    ///Inserts a new notification
    ///</summary>
    [<Api(Description="Inserts a new notification")>]
    [<AllowNullLiteral>]
    type InsertNotification() = 
        member val Notification:Notification = null with get,set

F# InsertNotification 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/notification/insert HTTP/1.1 
Host: pfapi.pstpf.com.au 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Notification: 
	{
		NotificationGroupName: String,
		SuiteName: String,
		Roles: 
		[
			{
				RoleName: String
			}
		],
		RolesToDisplay: String,
		Name: String,
		Description: String,
		IsMandatory: False,
		IsCardinality: False,
		IsSystem: False,
		IsAudit: False,
		IsVisibleToRecipients: False,
		IsSingleUse: False,
		Email: False,
		EmailDefault: False,
		EmailTemplateBody: String,
		EmailSubject: String,
		SMS: False,
		SMSDefault: False,
		SMSTemplateBody: String,
		UpdateNotification: False,
		UpdateNotificationDefault: False,
		UpdateTemplateBody: String,
		UpdateSubject: String,
		Push: False,
		PushDefault: False,
		Phone: False,
		PhoneDefault: False,
		RecordStatus: String,
		Index: 0
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ErrorCode: String,
	Message: String,
	StackTrace: String,
	Errors: 
	[
		{
			ErrorCode: String,
			FieldName: String,
			Message: String,
			Meta: 
			{
				String: String
			}
		}
	],
	Meta: 
	{
		String: String
	}
}