/srs/get_email_templates
GET https://api.sitehost.nz/1.2/srs/get_email_templates.json
Returns a specific email template.
Query Parameters
Parameter | Type | Required | Description |
client_id | integer | Yes | The ID for the client.Example: 1 |
template | string | Yes | The email template name.Example: ExampleName |
Code Samples
JavaScript PHP Rails Pythonvar xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", "https://api.sitehost.nz/1.2/srs/get_email_templates.json?apikey=your_key_here&client_id=1&template=ExampleName", false);
xmlHttp.send();
var response = xmlHttp.responseText;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.sitehost.nz/1.2/srs/get_email_templates.json?apikey=your_key_here&client_id=1&template=ExampleName");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
require 'net/http'
require 'uri'
uri = URI.parse("https://api.sitehost.nz/1.2/srs/get_email_templates.json?apikey=your_key_here&client_id=1&template=ExampleName")
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Get.new(uri.request_uri)
response = http.request(request)
import requests
uri = 'https://api.sitehost.nz/1.2/srs/get_email_templates.json?apikey=your_key_here&client_id=1&template=ExampleName'
response = requests.get(uri)
Response
200:application/json
{
"return": {
"TemplateID": "81",
"ClientID": "1",
"Type": "ExampleName",
"EmailSubject": "Template subject",
"EmailTemplate": "Email template"
},
"msg": "Successful.",
"status": true
}
"return": {
"TemplateID": "81",
"ClientID": "1",
"Type": "ExampleName",
"EmailSubject": "Template subject",
"EmailTemplate": "Email template"
},
"msg": "Successful.",
"status": true
}