Framework | Email Template
Service to manage entities of type 'EmailTemplate'.
Overview
URL | api/{tenantKey}/{orgKey}/operations/emailTemplates |
Methods Supported | GET, POST, PUT, DELETE |
All Operations
This service includes the following operations:
- GET:
- POST:
- PUT:
- DELETE:
All Resources
This service uses the following resources:
All Enumerations
This service uses the following enumerations:
GET EmailTemplates (odata)
Returns a page of the list of all the entity records available.
The following elements are optional:
opts | (ODataQueryOptions) OData query option. |
Response:
When successful, the response body contains the list of records available. See EmailTemplateResource. |
Response status codes:
200 | OK. The operation was completed successfully. |
400 | BadRequest. The request parameters are invalid. |
Resource URL:
GET EmailTemplate by identifier
Returns the entity record that matches the specified identifier.
The following elements are required:
id | (string) The record identifier. |
Response:
When successful, the response body contains the entity record. See EmailTemplateResource. |
Response status codes:
200 | OK. The operation was completed successfully. |
400 | BadRequest. The request parameters are invalid. |
404 | NotFound. The specified record does not exist. |
Resource URL:
GET EmailTemplate by key
Returns the entity record that matches the specified key.
The following elements are required:
templateKey | (string) The key for the email template. |
Response:
When successful, the response body contains the entity record. See EmailTemplateResource. |
Response status codes:
200 | OK. The operation was completed successfully. |
400 | BadRequest. The request parameters are invalid. |
404 | NotFound. The specified record does not exist. |
Resource URL:
POST EmailTemplates
Creates a new entity record.
The following elements are required:
emailTemplateResource | (ApiEmailTemplateResource) The request body should contain the entity record that should be created. See ApiEmailTemplateResource. |
Response:
When successful, the response body contains the new entity record identifier. The resource header location property contains the URL for the new entity record. See ApiEmailTemplateResource. |
Response status codes:
201 | Created. The operation was completed successfully. |
400 | BadRequest. The request parameters are invalid. |
Resource URL:
PUT Set Culture EmailTemplate
Updates the value of attribute 'Culture' in the specified entity record.
The following elements are required:
templateKey | (string) The key for the email template. |
value | (string) The request body should contain the new value for the attribute. |
Response:
When successful, the response body is empty. |
Response status codes:
200 | OK. The operation was completed successfully. |
400 | BadRequest. The request parameters are invalid. |
Resource URL:
PUT Set Description EmailTemplate
Updates the value of attribute 'Description' in the specified entity record.
The following elements are required:
templateKey | (string) The key for the email template. |
value | (string) The request body should contain the new value for the attribute. |
Response:
When successful, the response body is empty. |
Response status codes:
200 | OK. The operation was completed successfully. |
400 | BadRequest. The request parameters are invalid. |
Resource URL:
PUT Set EmailTemplateType EmailTemplate
Updates the value of attribute 'EmailTemplateType' in the specified entity record.
The following elements are required:
templateKey | (string) The key for the email template. |
value | (enum EmailTemplateType) The request body should contain the new value for the attribute. See EmailTemplateType. |
Response:
When successful, the response body is empty. |
Response status codes:
200 | OK. The operation was completed successfully. |
400 | BadRequest. The request parameters are invalid. |
Resource URL:
PUT Set IsActive EmailTemplate
Updates the value of attribute 'IsActive' in the specified entity record.
The following elements are required:
templateKey | (string) The key for the email template. |
value | (bool) The request body should contain the new value for the attribute. |
Response:
When successful, the response body is empty. |
Response status codes:
200 | OK. The operation was completed successfully. |
400 | BadRequest. The request parameters are invalid. |
404 | NotFound. The specified record does not exist. |
Resource URL:
PUT Set NotificationBody EmailTemplate
Updates the value of attribute 'NotificationBody' in the specified entity record.
The following elements are required:
templateKey | (string) The key for the email template. |
value | (string) The request body should contain the new value for the attribute. |
Response:
When successful, the response body is empty. |
Response status codes:
200 | OK. The operation was completed successfully. |
400 | BadRequest. The request parameters are invalid. |
Resource URL:
PUT Set Subject EmailTemplate
Updates the value of attribute 'Subject' in the specified entity record.
The following elements are required:
templateKey | (string) The key for the email template. |
value | (string) The request body should contain the new value for the attribute. |
Response:
When successful, the response body is empty. |
Response status codes:
200 | OK. The operation was completed successfully. |
400 | BadRequest. The request parameters are invalid. |
Resource URL:
PUT Set TemplateKey EmailTemplate
Updates the value of attribute 'TemplateKey' in the specified entity record.
The following elements are required:
templateKey | (string) The key for the email template. |
value | (string) The request body should contain the new value for the attribute. |
Response:
When successful, the response body is empty. |
Response status codes:
200 | OK. The operation was completed successfully. |
400 | BadRequest. The request parameters are invalid. |
Resource URL:
DELETE EmailTemplate by identifier
Deletes the entity record that matches the specified identifier.
The following elements are required:
id | (string) The record identifier. |
Response:
When successful, the response body is empty. |
Response status codes:
204 | Deleted. The operation was completed successfully. |
400 | BadRequest. The request parameters are invalid. |
404 | NotFound. The specified record does not exist. |
Resource URL:
DELETE EmailTemplate by key
Deletes the entity record that matches the specified key.
The following elements are required:
templateKey | (string) The key for the email template. |
Response:
When successful, the response body is empty. |
Response status codes:
204 | Deleted. The operation was completed successfully. |
400 | BadRequest. The request parameters are invalid. |
404 | NotFound. The specified record does not exist. |
Resource URL:
Resources
ApiEmailTemplateResource
The following elements are required:
templateKey | (string) The key for the email template. |
subject | (string) The subject for the email. |
emailTemplateType | (enum EmailTemplateType) The email template type. The email template type defines if the email body is "HTML" or "Text".
See EmailTemplateType. |
notificationBody | (string) The body for the email template. |
culture | (string) The variable that represents the country and affects some system attributes such as language, the date format or the supported character set. |
The following elements are optional:
description | (string) The description for the email template. |
EmailTemplateResource
The following elements are required:
templateKey | (string) The key for the email template. |
subject | (string) The subject for the email. |
emailTemplateType | (enum EmailTemplateType) The email template type. The email template type defines if the email body is "HTML" or "Text".
See EmailTemplateType. |
notificationBody | (string) The body for the email template. |
culture | (string) The variable that represents the country and affects some system attributes such as language, the date format or the supported character set.
(fk) Allowed value: the natural key of a record of type Culture. These records are accessibly through the Cultures service. |
The following elements are optional:
description | (string) The description for the email template. |