account.removeCategory

‹ BACK TO API PAGE


Description

Use this method to delete a category that you no longer are using. Before you can delete a category, it cannot have any static segments associated with it. Use the account.updateStaticSegment method to disassociate the static segments from the category you wish to delete.

Arguments

Field Description Field Type Required Example
category_id The ID number of the category to delete. 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

Response

Field Description Example
responseCode A code indicating either success or failure of the operation. (see Error Codes below) 124
responseText Human readable description of the response code category has been removed
category_id The ID number of the category being deleted. 255475

Response Codes

Error Condition responseText responseData
The category ID either does not exist for the account, or it is not a valid number. 123 action not taken, invalid category_id
Successful operation 124 category has been removed

Example Post

<methodCall>

<methodName>account.removeCategory</methodName>

<category_id>255475</category_id>

</methodCall>

Example Response

<methodResponse>

<item>

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

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

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

<responseData>

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

</responseData>

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

</item>

</methodResponse>

Example Error

<methodResponse>

<item>

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

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

<responseText><![CDATA[action not taken, invalid category_id]]></responseText>

<responseData>

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

</responseData>

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

</item>

</methodResponse>


Back to API Reference Guide