Service: DeleteCategory

The DeleteCategory service allows you to delete existing categories within Flexmail.

Service Details

SOAP Action: DeleteCategory
SOAP Return Object: DeleteCategoryResp

Input

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

Table: instance of DeleteCategoryReq

Parameter Mandatory Type Description
header Y APIRequestHeader Header for authentication
categoryId Y Integer Id of the category to delete

Output

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

Table: instance of DeleteCategoryResp

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 DeleteCategoryResp.

0 No error
220 Authentication error, see header object for detailed information
221 Category id is mandatory
222 Category id is invalid
223 Internal error

Example

This example shows you the deletion of a category width id 1234.

<?php
$header->userId = USER_ID;
$header->userToken = USER_TOKEN;
$deleteCategoryReq->header = $header;
$deleteCategoryReq->categoryId = 1234; 
$deleteCategoryResp = $SoapClient->__soapCall("DeleteCategory", 
					array($deleteCategoryReq));

if ($deleteCategoryResp->errorCode == 0) {
	echo "Category deleted";
} else {
	echo "Category delete failed: " . $deleteCategoryResp->errorMessage;
}
?>