Template.GetDetail
Gets the details of a template.
Parameters and required information
Here’s a list of all the parameters you’ll need to pass to the Template.GetDetail method. All of the parameters are required unless otherwise noted.
ApiKey
Your API application key. See here for more details.
TemplateID
The ID of the template whose details are being requested. A TemplateID is returned when you create a template using the Template.Create method. You may also retrieve the identifiers for a client’s templates by calling the Client.GetTemplates method.
Return Codes
Success
Upon a successful call, this method will return a Template object, which consists of the template ID, the template name, a preview URL and a screenshot URL.
Error
100: Invalid API Key
The API key passed was not valid or has expired.
4001: Invalid TemplateID
The TemplateID value passed in was not valid.
SOAP 1.1
The following is a sample SOAP request and response. The placeholders shown need to be replaced with actual values.
POST /api/api.asmx HTTP/1.1
Host: api.createsend.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://api.createsend.com/api/Template.GetDetail"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Template.GetDetail xmlns="http://api.createsend.com/api/">
<ApiKey>string</ApiKey>
<TemplateID>string</TemplateID>
</Template.GetDetail>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Template.GetDetailResponse xmlns="http://api.createsend.com/api/">
<Template.GetDetailResult />
</Template.GetDetailResponse>
</soap:Body>
</soap:Envelope>
HTTP GET
The following is a sample HTTP GET request and response. The placeholders shown need to be replaced with actual values.
GET /api/api.asmx/Template.GetDetail?ApiKey=string&TemplateID=string HTTP/1.1
Host: api.createsend.com
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<anyType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="Template" xmlns="http://api.createsend.com/api/">
<Template>
<TemplateID>string</TemplateID>
<Name>string</Name>
<PreviewURL>string</PreviewURL>
<ScreenshotURL>string</ScreenshotURL>
</Template>
</anyType>
HTTP POST
The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.
POST /api/api.asmx/Template.GetDetail HTTP/1.1
Host: api.createsend.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
ApiKey=string&TemplateID=string
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<anyType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="Template" xmlns="http://api.createsend.com/api/">
<Template>
<TemplateID>string</TemplateID>
<Name>string</Name>
<PreviewURL>string</PreviewURL>
<ScreenshotURL>string</ScreenshotURL>
</Template>
</anyType>