Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Description

Creates a new email notification template.

Package Details

Interface

IEmailNotificationManager

Syntax

Task RegisterNotification(EmailNotificationTemplateDto notificationTemplateDto);

Returns

Task

API Endpoint

POST

/api/v1/notification-template

Parameters

Parameter

Description

Parameter Type

emailNotificationTemplate

Email Notification Template JSON.

Request body

Sample request body

{
  "Name": "string",
  "ServiceName": "string",
  "BodyTextEnglish": [
    "string"
  ],
  "BodyTextFrench": [
    "string"
  ],
  "HasBodyParameters": true,
  "SubjectTextEnglish": "string",
  "SubjectTextFrench": "string",
  "HasSubjectParameters": true
}

Returns

200 OK - When successful

400 Bad Request - Unable to create the template

Example

const string serviceName = "ServiceName";
const string subjectTextEnglish = "Eng_Subject";
const string subjectTextFrench = "Fra_Subject";
const string templateName = "template name";
var bodyTextFrench = new string[] { "This is French Body Text" };
var bodyTextEnglish = new string[] { "This is English Body Text" };
var emailNotificationTemplateDto = new EmailNotificationTemplateDto
{
    Name = templateName,
    ServiceName = serviceName,
    BodyTextFrench = bodyTextFrench,
    BodyTextEnglish = bodyTextEnglish,
    SubjectTextEnglish = subjectTextEnglish,
    SubjectTextFrench = subjectTextFrench,
    HasSubjectParameters = false,
    HasBodyParameters = false
};
var result = await emailNotificationManager.RegisterNotification(emailNotificationTemplateDto);

  • No labels