GET api/emailtemplates/{id}

Fetches details for the template with the specified template ID.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

Valid template ID. If it refers to a non-global template, it has to belong to the user's accounting office or company.

integer

Required

Body Parameters

None.

Response Information

Resource Description

EmailTemplateDTO
NameDescriptionTypeAdditional information
Id

Template ID.

integer

None.

Category

Template category.

integer

None.

Name

Template name. The name has to be unique within the category.

string

None.

Code

Template code. The name has to be unique within the category.

string

None.

Subject

E-mail message subject.

string

None.

ReplyTo

E-mail message reply-to address.

string

None.

Body

E-mail message HTML body.

string

None.

AccountingOfficeLevelId

ID of the corresponding accounting office-level template, null if it does not exist.

integer

None.

CompanyLevelId

ID of the corresponding company-level template, null if it does not exist.

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "Category": 2,
  "Name": "sample string 3",
  "Code": "sample string 4",
  "Subject": "sample string 5",
  "ReplyTo": "sample string 6",
  "Body": "sample string 7",
  "AccountingOfficeLevelId": 1,
  "CompanyLevelId": 1
}

text/html

Sample:
{"Id":1,"Category":2,"Name":"sample string 3","Code":"sample string 4","Subject":"sample string 5","ReplyTo":"sample string 6","Body":"sample string 7","AccountingOfficeLevelId":1,"CompanyLevelId":1}

application/xml, text/xml

Sample:
<EmailTemplateDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Common.WebAPI.DTOs">
  <AccountingOfficeLevelId>1</AccountingOfficeLevelId>
  <Body>sample string 7</Body>
  <Category>2</Category>
  <Code>sample string 4</Code>
  <CompanyLevelId>1</CompanyLevelId>
  <Id>1</Id>
  <Name>sample string 3</Name>
  <ReplyTo>sample string 6</ReplyTo>
  <Subject>sample string 5</Subject>
</EmailTemplateDTO>