Przejdź do treści

Edit footer

Allows to update any footer. Any information that won’t be given in this request, won’t be updated.

Request data format

Request URL parameters:

Element/attributeTypeNotes
IDintegerFooter ID. Required as a part of address (not inside request body). See example below.

Example URL (HTTP method: PUT):

https://api.esv2.com/v2/Api/Footers/3

Data part of request for updating footer.

Data element children:

Element/attributeTypeNotes
NamestringName of footer. Required.
HtmlstringHTML content of footer. The data should be enclosed in CDATA section for XML transport. See examples. Required.
PlainstringPlain text content of footer. Required.
AmpHtmlstringAMP HTML content of footer. The data should be enclosed in CDATA section for XML transport. See examples. Optional. 
IsDefaultbooleanIf set to „true” (note the lowercase!), the new created footer will be used as default in all new email messages. Optional. If not specified, default will be set to „false”

Response

By default, response is empty and HTTP code „204 – No Content” is returned.

Examples

Updating a footer

Request:

PUT https://api.esv2.com/v2/Api/Footers HTTP/1.1 
Accept-Encoding: gzip,deflate 
Content-Type: text/xml;charset=UTF-8 
User-Agent: Jakarta Commons-HttpClient/3.1 
Host: api.esv2.com 
Content-Length: 1727 

<ApiRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <ApiKey>test_api_key</ApiKey>
  <Data>
    <Name>New name of footer</Name>
    <Html><![CDATA[<h2>Completely new HTML of footer</h2>]]></Html>
    <Plain>Update of plain footer</Plain> 
  </Data>
</ApiRequest>

Response:

HTTP/1.1 204 No Content 
Content-Type: text/xml; charset=utf-8 
Date: Tue, 27 Mar 2012 13:28:01 GMT 
Content-Length: 0