Service: UpdateCategory

The UpdateCategory service allows you to update existing categories within Flexmail.

Service Details

SOAP Action: UpdateCategory
SOAP Return Object: UpdateCategoryResp

Input

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

Table: instance of UpdateCategoryReq

Parameter Mandatory Type Description
header Y APIRequestHeader Header for authentication
categoryId Y Integer Id of the category to update
categoryName Y String Name of the category to update

Output

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

Table: instance of UpdateCategoryResp

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

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

Example

This example shows you the update of a category with category id 1234.

<?php
$header->userId = USER_ID;
$header->userToken = USER_TOKEN;
$updateCategoryReq->header = $header;
$updateCategoryReq->categoryId = 1234;
$updateCategoryReq->categoryName = "My updated category";
$updateCategoryResp = $SoapClient->__soapCall("UpdateCategory",
			array($updateCategoryReq));

if ($updateCategoryResp->errorCode == 0) {
	echo "Category updated";
} else {
	echo "Category update failed: " . $updateCategoryResp->errorMessage;
}
?>