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
"use strict";
export class NotificationRole {
    /** @param {{RoleId?:string,RoleName?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    RoleId;
    /** @type {string} */
    RoleName;
}
export class Notification {
    /** @param {{NotificationId?:string,NotificationGroupId?:string,NotificationGroupName?:string,SuiteId?:string,SuiteName?:string,NotificationValueId?:string,Roles?:NotificationRole[],RolesToDisplay?:string,Name?:string,Description?:string,IsMandatory?:boolean,IsCardinality?:boolean,IsSystem?:boolean,IsAudit?:boolean,IsVisibleToRecipients?:boolean,IsSingleUse?:boolean,Email?:boolean,EmailDefault?:boolean,EmailTemplateId?:string,EmailTemplateBody?:string,EmailSubject?:string,SMS?:boolean,SMSDefault?:boolean,SMSTemplateId?:string,SMSTemplateBody?:string,UpdateNotification?:boolean,UpdateNotificationDefault?:boolean,UpdateTemplateId?:string,UpdateTemplateBody?:string,UpdateSubject?:string,Push?:boolean,PushDefault?:boolean,Phone?:boolean,PhoneDefault?:boolean,ContactIdOwner?:string,RecordStatus?:string,EmailTemplateDefinitionId?:string,SMSTemplateDefinitionId?:string,UpdateTemplateDefinitionId?:string,Index?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    NotificationId;
    /** @type {string} */
    NotificationGroupId;
    /** @type {string} */
    NotificationGroupName;
    /** @type {string} */
    SuiteId;
    /** @type {string} */
    SuiteName;
    /** @type {string} */
    NotificationValueId;
    /** @type {NotificationRole[]} */
    Roles;
    /** @type {string} */
    RolesToDisplay;
    /** @type {string} */
    Name;
    /** @type {string} */
    Description;
    /** @type {boolean} */
    IsMandatory;
    /** @type {boolean} */
    IsCardinality;
    /** @type {boolean} */
    IsSystem;
    /** @type {boolean} */
    IsAudit;
    /** @type {boolean} */
    IsVisibleToRecipients;
    /** @type {boolean} */
    IsSingleUse;
    /** @type {boolean} */
    Email;
    /** @type {boolean} */
    EmailDefault;
    /** @type {string} */
    EmailTemplateId;
    /** @type {string} */
    EmailTemplateBody;
    /** @type {string} */
    EmailSubject;
    /** @type {boolean} */
    SMS;
    /** @type {boolean} */
    SMSDefault;
    /** @type {string} */
    SMSTemplateId;
    /** @type {string} */
    SMSTemplateBody;
    /** @type {boolean} */
    UpdateNotification;
    /** @type {boolean} */
    UpdateNotificationDefault;
    /** @type {string} */
    UpdateTemplateId;
    /** @type {string} */
    UpdateTemplateBody;
    /** @type {string} */
    UpdateSubject;
    /** @type {boolean} */
    Push;
    /** @type {boolean} */
    PushDefault;
    /** @type {boolean} */
    Phone;
    /** @type {boolean} */
    PhoneDefault;
    /** @type {string} */
    ContactIdOwner;
    /** @type {string} */
    RecordStatus;
    /** @type {string} */
    EmailTemplateDefinitionId;
    /** @type {string} */
    SMSTemplateDefinitionId;
    /** @type {string} */
    UpdateTemplateDefinitionId;
    /** @type {number} */
    Index;
}
export class InsertNotification {
    /** @param {{Notification?:Notification}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {Notification} */
    Notification;
}

JavaScript InsertNotification DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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: application/json
Content-Type: application/json
Content-Length: length

{"Notification":{"NotificationId":"00000000-0000-0000-0000-000000000000","NotificationGroupId":"00000000-0000-0000-0000-000000000000","NotificationGroupName":"String","SuiteId":"00000000-0000-0000-0000-000000000000","SuiteName":"String","NotificationValueId":"00000000-0000-0000-0000-000000000000","Roles":[{"RoleId":"00000000-0000-0000-0000-000000000000","RoleName":"String"}],"RolesToDisplay":"String","Name":"String","Description":"String","IsMandatory":false,"IsCardinality":false,"IsSystem":false,"IsAudit":false,"IsVisibleToRecipients":false,"IsSingleUse":false,"Email":false,"EmailDefault":false,"EmailTemplateId":"00000000-0000-0000-0000-000000000000","EmailTemplateBody":"String","EmailSubject":"String","SMS":false,"SMSDefault":false,"SMSTemplateId":"00000000-0000-0000-0000-000000000000","SMSTemplateBody":"String","UpdateNotification":false,"UpdateNotificationDefault":false,"UpdateTemplateId":"00000000-0000-0000-0000-000000000000","UpdateTemplateBody":"String","UpdateSubject":"String","Push":false,"PushDefault":false,"Phone":false,"PhoneDefault":false,"ContactIdOwner":"00000000-0000-0000-0000-000000000000","RecordStatus":"String","EmailTemplateDefinitionId":"00000000-0000-0000-0000-000000000000","SMSTemplateDefinitionId":"00000000-0000-0000-0000-000000000000","UpdateTemplateDefinitionId":"00000000-0000-0000-0000-000000000000","Index":0}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

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