account.addCategory

‹ BACK TO API PAGE


Description

A Category corresponds to a field appearing on your web sign-up page (or subscriber preference page) that collects specific information about the subscriber. Categories contain pre-defined selectable values that are displayed online as either check boxes or in a dropdown list. Examples include Age Group, Gender, Demographic Marketing Area, Favorite Music Genre, Financial Investing Risk Tolerance, Favorite Travel Destinations, and so forth. Each selection choice of a Category is a separate static segment which groups subscribers together in terms of their similar responses. Hence, a single Category is a collection of static segments that the marketer has grouped together.

For example, a category could be called "Music Preferences" with four static segments associated with it, "Rock Genre", "Jazz", "Blues", and "Classical". A person who selects "Rock Genre" in the "Music Preference" category then becomes added to the "Rock Genre" static segment.

To create a new static segment, use the account.addStaticSegment method.

Arguments

Field Description Field Type Required Example
category_name The name of the category to be added. Category names must be unique.

Use the legacy.retrieve_segment method to obtain a list of categories and their ID numbers that exist for your account. Alternatively, you can view existing categories by logging into the application and then navigating to Segmentation > Categories.

string Yes Music Preference

Response

Field Description Example
responseCode A code indicating either success or failure of the operation. (see Error Codes below) 120
responseText Human readable description of the response code category has been added
category_id If successful operation, this element will be set to the ID number identifying the newly added category. If unsuccessful operation, the value of this element will be zero. 255475
category_name The name of category as provided in the input XML message. Music Preference

Response Codes

Error Condition responseText responseData
Successful operation 120 category has been added
The category name already exists for the account 121 action not taken, category name already exists

Example Post

<methodCall>

<methodName>account.addCategory</methodName>

<category_name>Music Preference</category_name>

</methodCall>

Example Response

<methodResponse>

<item>

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

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

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

<responseData>

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

<category_name><![CDATA[Music Preference]]></category_name>

</responseData>

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

</item>

</methodResponse>

Example Error

<methodResponse>

<item>

<methodName><![CDATA[account.addCategory]]></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[Music Preference]]></category_name>

</responseData>

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

</item>

</methodResponse>


Back to API Reference Guide