Platform API

<back to all web services

GetAutomationNotificationsForObject

Get (automation) notifications that are setup for an object

Requires Authentication
The following routes are available for this service:
GET/api/automation/notification/{ObjectId}/list
GET/api/automation/notification/{ObjectId}/list/standard
GET/api/automation/notification/{ObjectId}/list/templated
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.Saguna.Common.WebAPIModel.Models;

namespace Eros.Saguna.Common.WebAPIModel.Models
{
    public partial class AutomationModel
    {
        ///<summary>
        ///The unique automation Id
        ///</summary>
        [ApiMember(Description="The unique automation Id", ParameterType="query")]
        public virtual Guid AutomationId { get; set; }

        ///<summary>
        ///The automation type Id
        ///</summary>
        [ApiMember(Description="The automation type Id", ParameterType="query")]
        public virtual Guid AutomationTypeId { get; set; }

        ///<summary>
        ///The automation type
        ///</summary>
        [ApiMember(Description="The automation type", ParameterType="query")]
        public virtual string AutomationType { get; set; }

        ///<summary>
        ///The object this automation applies to
        ///</summary>
        [ApiMember(Description="The object this automation applies to", ParameterType="query")]
        public virtual Guid ObjectId { get; set; }

        ///<summary>
        ///The object name this automation applies to
        ///</summary>
        [ApiMember(Description="The object name this automation applies to", ParameterType="query")]
        public virtual string ObjectName { get; set; }

        ///<summary>
        ///The Id of the object type that this automation applies to. 
        ///</summary>
        [ApiMember(Description="The Id of the object type that this automation applies to. ", ParameterType="query")]
        public virtual Guid RmsTableCtxIdObject { get; set; }

        ///<summary>
        ///The name of the object type that this automation applies to.
        ///</summary>
        [ApiMember(Description="The name of the object type that this automation applies to.", ParameterType="query")]
        public virtual string RmsTableCtxName { get; set; }

        ///<summary>
        ///A guid list containing the selected system action Id's that trigger this automation.
        ///</summary>
        [ApiMember(Description="A guid list containing the selected system action Id's that trigger this automation.", ParameterType="query")]
        public virtual List<Guid> ActionList { get; set; }

        ///<summary>
        ///A comma separated string of the selected system action names that trigger this automation.
        ///</summary>
        [ApiMember(Description="A comma separated string of the selected system action names that trigger this automation.", ParameterType="query")]
        public virtual string Actions { get; set; }

        ///<summary>
        ///Name of the automation.
        ///</summary>
        [ApiMember(Description="Name of the automation.", ParameterType="query")]
        public virtual string Name { get; set; }

        ///<summary>
        ///Description of the automation
        ///</summary>
        [ApiMember(Description="Description of the automation", ParameterType="query")]
        public virtual string Description { get; set; }

        ///<summary>
        ///Owner Contact Id
        ///</summary>
        [ApiMember(Description="Owner Contact Id", ParameterType="query")]
        public virtual Guid OwnerContactId { get; set; }

        ///<summary>
        ///Record Status of the automation.
        ///</summary>
        [ApiMember(Description="Record Status of the automation.", ParameterType="query")]
        public virtual string RecordStatus { get; set; }
    }

    public partial class AutoNotificationModel
        : AutomationModel
    {
        ///<summary>
        ///Contact Id of the licensee this notification has been created for.
        ///</summary>
        [ApiMember(Description="Contact Id of the licensee this notification has been created for.", ParameterType="query")]
        public virtual Guid ContactIdLicensee { get; set; }

        ///<summary>
        ///Contact Role Group Id. If the notification is setup for people in a specified contact role group.
        ///</summary>
        [ApiMember(Description="Contact Role Group Id. If the notification is setup for people in a specified contact role group.", ParameterType="query")]
        public virtual Guid ContactRoleGroupId { get; set; }

        ///<summary>
        ///Contact Role Id. If the notification is setup for people in a specified role.
        ///</summary>
        [ApiMember(Description="Contact Role Id. If the notification is setup for people in a specified role.", ParameterType="query")]
        public virtual Guid ContactRoleId { get; set; }

        ///<summary>
        ///Contact Role Name. If the notification is setup for people in a specified role.
        ///</summary>
        [ApiMember(Description="Contact Role Name. If the notification is setup for people in a specified role.", ParameterType="query")]
        public virtual string ContactRoleName { get; set; }

        ///<summary>
        ///Contact Id. If the notification is setup for a specific person.
        ///</summary>
        [ApiMember(Description="Contact Id. If the notification is setup for a specific person.", ParameterType="query")]
        public virtual Guid ContactId { get; set; }

        ///<summary>
        ///If true, then only contacts who are connected to the relevant object are notified.
        ///</summary>
        [ApiMember(Description="If true, then only contacts who are connected to the relevant object are notified.", ParameterType="query")]
        public virtual bool ObjectContactConnectionRequired { get; set; }

        ///<summary>
        ///Document Notification: If true, then the notification will include a link to download the document.
        ///</summary>
        [ApiMember(Description="Document Notification: If true, then the notification will include a link to download the document.", ParameterType="query")]
        public virtual bool AllowDirectAccess { get; set; }

        ///<summary>
        ///If true, the notification is sent as soon as it can be processed
        ///</summary>
        [ApiMember(Description="If true, the notification is sent as soon as it can be processed", ParameterType="query")]
        public virtual bool SendImmediately { get; set; }

        ///<summary>
        ///If true, the notification is flagged and sent out when subscription/batch emails are next sent.
        ///</summary>
        [ApiMember(Description="If true, the notification is flagged and sent out when subscription/batch emails are next sent.", ParameterType="query")]
        public virtual bool Batched { get; set; }

        ///<summary>
        ///Document Notification: If true, the notification is sent when a document has a status of draft.
        ///</summary>
        [ApiMember(Description="Document Notification: If true, the notification is sent when a document has a status of draft.", ParameterType="query")]
        public virtual bool DraftStatus { get; set; }

        ///<summary>
        ///Document Notification: If true, the notification is sent when a document has a status of final.
        ///</summary>
        [ApiMember(Description="Document Notification: If true, the notification is sent when a document has a status of final.", ParameterType="query")]
        public virtual bool FinalStatus { get; set; }

        ///<summary>
        ///True if we want to include a report on an email notification. 
        ///</summary>
        [ApiMember(Description="True if we want to include a report on an email notification. ", ParameterType="query")]
        public virtual bool IncludeReport { get; set; }

        ///<summary>
        ///True if this notification is based on a template.
        ///</summary>
        [ApiMember(Description="True if this notification is based on a template.", ParameterType="query")]
        public virtual bool IsTemplateNotification { get; set; }

        ///<summary>
        ///When Inserting a new notification we can have 1+ roles. They should be passed to this field when inserting.
        ///</summary>
        [ApiMember(Description="When Inserting a new notification we can have 1+ roles. They should be passed to this field when inserting.", ParameterType="query")]
        public virtual List<Guid> Roles { get; set; }

        ///<summary>
        ///Communication Type Id.
        ///</summary>
        [ApiMember(Description="Communication Type Id.", ParameterType="query")]
        public virtual Guid CommunicationTypeId { get; set; }

        ///<summary>
        ///Communication Type.
        ///</summary>
        [ApiMember(Description="Communication Type.", ParameterType="query")]
        public virtual string CommunicationType { get; set; }

        ///<summary>
        ///If communication type is email, this is the subject of the email to be sent.
        ///</summary>
        [ApiMember(Description="If communication type is email, this is the subject of the email to be sent.", ParameterType="query")]
        public virtual string Subject { get; set; }

        ///<summary>
        ///This is the notification details to be sent.
        ///</summary>
        [ApiMember(Description="This is the notification details to be sent.", ParameterType="query")]
        public virtual string Body { get; set; }

        ///<summary>
        ///If true, we will include the relevant project URL in the notification.
        ///</summary>
        [ApiMember(Description="If true, we will include the relevant project URL in the notification.", ParameterType="query")]
        public virtual bool IncludeURL { get; set; }

        ///<summary>
        ///The notification Id of a notification setup in Workflow Notification Management to use for the notification.
        ///</summary>
        [ApiMember(Description="The notification Id of a notification setup in Workflow Notification Management to use for the notification.", ParameterType="query")]
        public virtual Guid NotificationId { get; set; }

        ///<summary>
        ///The notification nameof a notification setup in Workflow Notification Management to use for the notification.
        ///</summary>
        [ApiMember(Description="The notification nameof a notification setup in Workflow Notification Management to use for the notification.", ParameterType="query")]
        public virtual string NotificationName { get; set; }

        ///<summary>
        ///The suite id the notification is setup for
        ///</summary>
        [ApiMember(Description="The suite id the notification is setup for", ParameterType="query")]
        public virtual Guid SuiteId { get; set; }

        ///<summary>
        ///The suite name the notification is setup for
        ///</summary>
        [ApiMember(Description="The suite name the notification is setup for", ParameterType="query")]
        public virtual string SuiteName { get; set; }
    }

}

namespace Eros.Subtle.Canvara.WebAPIModel.ServiceModel
{
    ///<summary>
    ///Get (automation) notifications that are setup for an object
    ///</summary>
    [Api(Description="Get (automation) notifications that are setup for an object")]
    public partial class GetAutomationNotificationsForObject
    {
        ///<summary>
        ///Object to retrieve (automation) notifications for.
        ///</summary>
        [ApiMember(Description="Object to retrieve (automation) notifications for.", ParameterType="path")]
        public virtual Guid ObjectId { get; set; }
    }

    [ApiResponse(Description="List of (automation) notifications that are setup for an object.")]
    public partial class GetAutomationNotificationsForObjectResponse
    {
        ///<summary>
        ///List of (automation) notifications.
        ///</summary>
        [ApiMember(Description="List of (automation) notifications.")]
        public virtual List<AutoNotificationModel> Notifications { get; set; }

        public virtual ResponseStatus ResponseStatus { get; set; }
    }

}

C# GetAutomationNotificationsForObject DTOs

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

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /api/automation/notification/{ObjectId}/list HTTP/1.1 
Host: pfapi.pstpf.com.au 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Notifications":[{"ContactIdLicensee":"00000000-0000-0000-0000-000000000000","ContactRoleGroupId":"00000000-0000-0000-0000-000000000000","ContactRoleId":"00000000-0000-0000-0000-000000000000","ContactRoleName":"String","ContactId":"00000000-0000-0000-0000-000000000000","ObjectContactConnectionRequired":false,"AllowDirectAccess":false,"SendImmediately":false,"Batched":false,"DraftStatus":false,"FinalStatus":false,"IncludeReport":false,"IsTemplateNotification":false,"Roles":["00000000-0000-0000-0000-000000000000"],"CommunicationTypeId":"00000000-0000-0000-0000-000000000000","CommunicationType":"String","Subject":"String","Body":"String","IncludeURL":false,"NotificationId":"00000000-0000-0000-0000-000000000000","NotificationName":"String","SuiteId":"00000000-0000-0000-0000-000000000000","SuiteName":"String","AutomationId":"00000000-0000-0000-0000-000000000000","AutomationTypeId":"00000000-0000-0000-0000-000000000000","AutomationType":"String","ObjectId":"00000000-0000-0000-0000-000000000000","ObjectName":"String","RmsTableCtxIdObject":"00000000-0000-0000-0000-000000000000","RmsTableCtxName":"String","ActionList":["00000000-0000-0000-0000-000000000000"],"Actions":"String","Name":"String","Description":"String","OwnerContactId":"00000000-0000-0000-0000-000000000000","RecordStatus":"String"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}