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
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Eros.Subtle.Canvara.WebAPIModel.ServiceModel;
using Eros.Causal.Common.Entity;

namespace Eros.Causal.Common.Entity
{
    public partial class Notification
    {
        public virtual Guid NotificationId { get; set; }
        public virtual Guid NotificationGroupId { get; set; }
        public virtual string NotificationGroupName { get; set; }
        public virtual Guid SuiteId { get; set; }
        public virtual string SuiteName { get; set; }
        public virtual Guid NotificationValueId { get; set; }
        public virtual List<NotificationRole> Roles { get; set; }
        public virtual string RolesToDisplay { get; set; }
        public virtual string Name { get; set; }
        public virtual string Description { get; set; }
        public virtual bool IsMandatory { get; set; }
        public virtual bool IsCardinality { get; set; }
        public virtual bool IsSystem { get; set; }
        public virtual bool IsAudit { get; set; }
        public virtual bool IsVisibleToRecipients { get; set; }
        public virtual bool IsSingleUse { get; set; }
        public virtual bool Email { get; set; }
        public virtual bool EmailDefault { get; set; }
        public virtual Guid EmailTemplateId { get; set; }
        public virtual string EmailTemplateBody { get; set; }
        public virtual string EmailSubject { get; set; }
        public virtual bool SMS { get; set; }
        public virtual bool SMSDefault { get; set; }
        public virtual Guid SMSTemplateId { get; set; }
        public virtual string SMSTemplateBody { get; set; }
        public virtual bool UpdateNotification { get; set; }
        public virtual bool UpdateNotificationDefault { get; set; }
        public virtual Guid UpdateTemplateId { get; set; }
        public virtual string UpdateTemplateBody { get; set; }
        public virtual string UpdateSubject { get; set; }
        public virtual bool Push { get; set; }
        public virtual bool PushDefault { get; set; }
        public virtual bool Phone { get; set; }
        public virtual bool PhoneDefault { get; set; }
        public virtual Guid ContactIdOwner { get; set; }
        public virtual string RecordStatus { get; set; }
        public virtual Guid EmailTemplateDefinitionId { get; set; }
        public virtual Guid SMSTemplateDefinitionId { get; set; }
        public virtual Guid UpdateTemplateDefinitionId { get; set; }
        public virtual int Index { get; set; }
    }

    public partial class NotificationRole
    {
        public virtual Guid RoleId { get; set; }
        public virtual string RoleName { get; set; }
    }

}

namespace Eros.Subtle.Canvara.WebAPIModel.ServiceModel
{
    ///<summary>
    ///Inserts a new notification
    ///</summary>
    [Api(Description="Inserts a new notification")]
    public partial class InsertNotification
    {
        public virtual Notification Notification { get; set; }
    }

}

C# 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
	}
}