Get Template Preview
This method retrieves a preview of the HTML or text part of a Template without personalization.
This is a POST method.
REST WADL
https://atmp-pub-api-www3.actito.com/apitransactional/services/rest?_wadl&_type=xml
REST URL
https://atmp-pub-api-www3.actito.com/apitransactional/services/rest/template/preview/{token}/{id}/{part}?enableLinks={boolean}
| Input parameters
Required parameters | Description | Output parameters | Description |
| ----------------------------------------------------------------------------- | ----------- | ----------------- | ----------- |
| token | The connection token | return | The Template preview for the specified part (HTML or TEXT) |
| id | The ID of the Template | | |
| part | The part of the Template (HTML or TEXT) | | |
| enableLinks | Whether links should be displayed (true) or not (false). The default value is false. | | |
Error messages
- You must fill in the token parameter
- You must fill in the id parameter.
- You must fill in the part parameter.
- No template found !!
- TEXT part doesn't exist or is malformed.
- HTML part doesn't exist or is malformed.
- Unable to retrieve the links of the template.
- Unable to retrieve xheaders.
- The content doesn't have [EMV DYN] tags.
- The dyn tags are probably malformed.
- The content doesn't have [EMV CONTENT] tags.
- Error while formatting the template for send request.
- Error while formatting the template.
- Template type not supported.
- An error occured on the server
REST Example
Input
URL
https://atmp-pub-api-www3.actito.com/apitransactional/services/rest/template/getByPeriod/{token}/TRANSACTIONAL/2010-10-23%2000:00:00/2013-01-01%2000:00:00
HTTP Method
POST
Header
token {token}
content-type application/xml
accept application/xml
Body
<TemplatePersoFields>
<contentItemList>
<contentItem>
<label>1</label>
<value>fdsjkhfdjkshds</value>
<label>2</label>
<value>aaaaaaaaaaaa</value>
</contentItem>
</contentItemList>
<persoItemList>
<persoItem>
<label>email</label>
<value>AAAAA</value>
</persoItem>
<persoItem>
<label>firstname</label>
<value>BBBBBBB</value>
</persoItem>
<persoItem>
<label>lastname</label>
<value>CCCCCCC</value>
</persoItem>
</persoItemList>
<templateId>196</templateId>
</TemplatePersoFields>
Output
<response responseStatus="success">
<result xsi:type="xs:string">
<html>
<body>
<table align="center" bgcolor="white" border="0" cellpadding="0" cellspacing="0" width="625">
<tr>
<td rowspan="3" width="15">
</td>
<td align="center" rowspan="3" valign="middle" width="395">
<a rel="nofollow">
<img alt="Poste Midnight Lace" height="173" src="http://webr.emv2.com/demo_milano/120412_acme/highheel_2.jpg" width="161">
</a>
<img alt="Poste Midnight Lace" height="173" src="http://webr.emv2.com/demo_milano/120412_acme/flats_2.jpg" width="161">
</td>
<td height="246" valign="middle">
<span style="font-size: 9.0pt;font-family: Helvetica , Arial , sans-serif;color: rgb(0,0,0);font-weight: 200;">http://www.smarfocus.com A welcome addition to the Poste range, the Midnight lace carries on the tradition of classic styling with a subtle twist.
<br>
<br>
<br>
</span>
</td>
<td rowspan="3" width="15">
</td>
</tr>
<tr>
<td align="right" bgcolor="#860038" height="18" valign="bottom">
<span style="font-size: 10.0pt;font-family: Helvetica , Arial , sans-serif;text-align: right;color: black;font-weight: 200;">
<a rel="nofollow" style="text-decoration: none;font-weight: bold;color: white;text-align: right;padding-right: 5.0px;">
<strong>SHOP ALL GIRLS SHOES</strong>
</a>
</span>
</td>
</tr>
</table>
</body>
</html>
</result>
</response>