Jasmin Developers - Web API Reference

GET Operations

GET EmailTemplates

Returns the list of all the entity records available.

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 /operations/emailTemplates

GET EmailTemplates (paged)

Returns a page of the list of all the entity records available.

The following elements are optional:

page (int) The index of the page of the list that should be returned. This is a query string parameter.
pageSize (int) The number of page elements that should be returned (max. is 1000). This is a query string parameter.

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 /operations/emailTemplates?page={page}&pageSize={pageSize}

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 /operations/emailTemplates/{id}

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:

GET /operations/emailTemplates/{templateKey}

GET Print EmailTemplate by identifier

Prints the specified entity record.

The following elements are required:

id (string) The record identifier.

The following elements are optional:

template (string) The report template that should be used. This is a query string parameter.

Response:

When successful, the response body contains a stream with the printed file.

Response status codes:

200 OK. The operation was completed successfully.
404 NotFound. The specified resord does not exist.

Resource URL:

GET /operations/emailTemplates/{id}/print?template={template}

GET Print EmailTemplate by key

Prints the specified entity record.

The following elements are required:

templateKey (string) The key for the email template.

The following elements are optional:

template (string) The report template that should be used. This is a query string parameter.

Response:

When successful, the response body contains a stream with the printed file.

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 /operations/emailTemplates/{templateKey}/print

GET Original Print EmailTemplateOriginal by identifier

Prints the specified entity record.

The following elements are required:

id (string) The record identifier.

The following elements are optional:

template (string) The report template that should be used. This is a query string parameter.

Response:

When successful, the response body contains a stream with the printed file.

Response status codes:

200 OK. The operation was completed successfully.
404 NotFound. The specified resord does not exist.

Resource URL:

GET /operations/emailTemplates/{id}/printOriginal?template={template}

GET Original Print EmailTemplate by key

Prints the specified entity record.

The following elements are required:

templateKey (string) The key for the email template.

The following elements are optional:

template (string) The report template that should be used. This is a query string parameter.

Response:

When successful, the response body contains a stream with the printed file.

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 /operations/emailTemplates/{templateKey}/printOriginal

POST Operations

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:

POST /operations/emailTemplates

POST Email Template

Inserts a new 'Email Template Attachment' in the 'Email Template'.

The following elements are required:

templateKey (string) The key for the email template.
value (ApiEmailTemplateEmailTemplateAttachmentsResource) The ApiEmailTemplateEmailTemplateAttachmentsResource instance.
See ApiEmailTemplateEmailTemplateAttachmentsResource.

Response:

When successful, the response body is empty.

Response status codes:

204 NoContent. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

POST /operations/emailTemplates/{templateKey}/emailTemplateAttachments

PUT Operations

PUT Set Content EmailTemplateAttachment

Updates the value of attribute 'Content' in the specified entity record.

The following elements are required:

templateKey (string) The key for the email template.
lineId (string) The detail identifier.
value (byte[]) 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 /operations/emailTemplates/{templateKey}/emailTemplateAttachments/{lineId}/content

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 /operations/emailTemplates/{templateKey}/culture

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 /operations/emailTemplates/{templateKey}/description

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 /operations/emailTemplates/{templateKey}/emailTemplateType

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 /operations/emailTemplates/{templateKey}/isActive

PUT Set Name EmailTemplateAttachment

Updates the value of attribute 'Name' in the specified entity record.

The following elements are required:

templateKey (string) The key for the email template.
lineId (string) The detail identifier.
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 /operations/emailTemplates/{templateKey}/emailTemplateAttachments/{lineId}/name

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 /operations/emailTemplates/{templateKey}/notificationBody

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 /operations/emailTemplates/{templateKey}/subject

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:

PUT /operations/emailTemplates/{templateKey}/templateKey

DELETE Operations

DELETE Email Template Attachment by identifier

Deletes the entity record that matches the specified identifier.

The following elements are required:

templateKey (string) The key for the email template.
lineId (string) The line identifier.

Response:

When successful, the response body is empty.

Response status codes:

204 NoContent. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

DELETE /operations/emailTemplates/{templateKey}/emailTemplateAttachments/{lineId}

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 /operations/emailTemplates/{id}

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:

DELETE /operations/emailTemplates/{templateKey}

Resources


ApiEmailTemplateEmailTemplateAttachmentsResource

The following elements are optional:

name (string) The name for the attachment.
content (byte[]) The binary file for the attachment.


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.
emailTemplateAttachments (List of ApiEmailTemplateEmailTemplateAttachmentsResource) The attachments for the email template.
See ApiEmailTemplateEmailTemplateAttachmentsResource.


EmailTemplateAttachmentResource

The following elements are optional:

name (string) The name for the attachment.
content (byte[]) The binary file for the attachment.


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.
emailTemplateAttachments (List of EmailTemplateAttachmentResource) The attachments for the email template.
See EmailTemplateAttachmentResource.


Enumerations


EmailTemplateType

1 HTML The HTML body type.
2 Text The Text body type.