account.updateCategory

‹ BACK TO API PAGE


Description

Use this method to update the name of a category. All static segments associated with this category remain.

Use the account.addCategory method to create a new category.

Arguments

Field Description Field Type Required Example
category_id The ID number of the category to update. The ID number is returned in the response XML message from the account.addCategory method call.Use the account.getCategories method to retrieve the full set of categories created for your account. You can also find the ID number of a specific category by logging into the application and then navigating to Segmentation > Categories. Mouse over the name of the category that you want and note the URL that appears in your browser's status bar. The category ID number will be the sequence of digits following the final forward slash character. (e.g. http://…/12345). number Yes 255475
category_name The new name of the category to be updated. Category names must be unique.Use the account.getCategories method to retrieve the full set of categories created for your account. You can also view existing categories by logging into the application and then navigating to Segmentation > Categories. string Yes Preferred Music Genre

Response

Field Description Example
responseCode A code indicating either success or failure of the operation. (see Error Codes below) 122
responseText Human readable description of the response code category has been updated
category_id The ID number of the category being updated. 255475
category_name The new name of category as provided in the input XML message. Music Preference

Response Codes

Error Condition responseText responseData
The category name already exists for the account 121 action not taken, category name already exists
Successful operation 122 category has been added
The category ID either does not exist for the account, or it is not a valid number. 123 action not taken, invalid category_id

Example Post

<methodCall>

<methodName>account.updateCategory</methodName>

<category_id>255475</category_id>

<category_name>Preferred Music Genre</category_name>

</methodCall>

Example Response

<methodResponse>

<item>

<methodName><![CDATA[account.updateCategory]]></methodName>

<responseCode><![CDATA[122]]></responseCode>

<responseText><![CDATA[category has been updated]]></responseText>

<responseData>

<category_id><![CDATA[255475]]></category_id>

<category_name><![CDATA[Preferred Music Genre]]></category_name>

</responseData>

<responseNum><![CDATA[1]]></responseNum>

</item>

</methodResponse>

Example Error

<methodResponse>

<item>

<methodName><![CDATA[account.updateCategory]]></methodName>

<responseCode><![CDATA[121]]></responseCode>

<responseText><![CDATA[action not taken, category name already exists]]></responseText>

<responseData>

<category_id><![CDATA[255475]]></category_id>

<category_name><![CDATA[Preferred Music Genre]]></category_name>

</responseData>

<responseNum><![CDATA[1]]></responseNum>

</item>

</methodResponse>


Back to API Reference Guide