Service: DeleteTemplate

The DeleteTemplate service allows you to delete existing templates within Flexmail.

Service Details

SOAP Action: DeleteTemplate
SOAP Return Object: DeleteTemplateResp

Input

The following table describes the parameters used for calling the DeleteTemplate service.

Table: instance of DeleteTemplateReq

Parameter Mandatory Type Description
header Y APIRequestHeader Header for authentication
templateType Y TemplateType Template type

Output

The following table describes the parameters returned from the DeleteTemplate service.

Table: instance of DeleteTemplateResp

Parameter Mandatory Type Description
header / APIResponseHeader Header containing authentication information
errorCode / Integer Numerical value of the error
errorMessage / String Short literal description of the error

Table: response codes of DeleteTemplateResp.

0 No error
220 Authentication error, see header object for detailed information
221 Template id is mandatory
222 Invalid template id
223 Internal error

Example

This example shows you the deletion of a template width id 712.

<?php
$header->userId = USER_ID;
$header->userToken = USER_TOKEN;

$deleteTemplateReq->header = $header;
$deleteTemplateReq->templateType->templateId = 712; 

$deleteTemplateResp = $SoapClient->__soapCall("DeleteTemplate", array($deleteTemplateReq));

if ($deleteTemplateResp->errorCode == 0) {
	echo "Template deleted";
} else {
	echo "Template deletion failed: " . $deleteTemplateResp->errorMessage;
}
?>