POST api/emails/{attorneyId}/properties/{userPropertyId}/generate

This method should be used to generate email body from email template specified on request

Request Information

URI Parameters

NameDescriptionTypeAdditional information
attorneyId

Id of the user making the request

integer

Required

userPropertyId

Id of user property record

integer

Required

Body Parameters

Instance of Email request data

EmailPreviewBindingModel
NameDescriptionTypeAdditional information
TemplateId

integer

None.

AnalysisYear

integer

None.

Content

string

None.

Request Formats

application/json, text/json

Sample:
{
  "templateId": 1,
  "analysisYear": 1,
  "content": "sample string 2"
}

text/html

Sample:
{"templateId":1,"analysisYear":1,"content":"sample string 2"}

application/xml, text/xml

Sample:
<EmailPreviewBindingModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Ptd.Model.WebModels.Emails">
  <AnalysisYear>1</AnalysisYear>
  <Content>sample string 2</Content>
  <TemplateId>1</TemplateId>
</EmailPreviewBindingModel>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'EmailPreviewBindingModel'.

Response Information

Resource Description

Email content with all tokens resolved

string

Response Formats

application/json, text/json, text/html

Sample:
"sample string 1"

application/xml, text/xml

Sample:
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">sample string 1</string>