API Documentation V2
Templates collection allows retrieving a list of templates (e.g. headers, footers) available in the system, using HTTP GET method. This information can be used e.g. when sending newsletters using API.
Request URL parameters:
Examples:
https://api.esv2.com/v2/Api/Templates?apiKey=YOUR_API_KEY_HERE
https://api.esv2.com/v2/Api/Templates?apiKey=YOUR_API_KEY_HERE&type=Footer
Response Data element:
Template element children:
Request:
GET https://api.esv2.com/v2/Api/Templates?apiKey=test_api_key1 HTTP/1.1
Accept-Encoding: gzip,deflate
Host: api.esv2.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNetMvc-Version: 5.1
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Wed, 05 Mar 2014 13:19:51 GMT
Content-Length: 345
<ApiResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Data>
<Templates>
<Template>
<Id>1</Id>
<Type>Footer</Type>
<Name>Default EN footer</Name>
</Template>
<Template>
<Id>2</Id>
<Type>Footer</Type>
<Name>Default PL footer</Name>
</Template>
<Template>
<Id>3</Id>
<Type>Header</Type>
<Name>My custom header</Name>
</Template>
<Template>
<Id>4</Id>
<Type>Header</Type>
<Name>Some other header</Name>
</Template>
</Templates>
</Data>
</ApiResponse>