account.updateStaticSegment

‹ BACK TO API PAGE


Description

This method replaces the legacy.group_rename method.

Use this method to update an existing static segment and change its name, the category it is to be associated with, and whether it shoult be used for Standard Test Messages. To create a new static segment, use account.addStaticSegment.

Arguments

Field Description Field Type Required Example
id The ID number of the static segment to be edited. The ID number is returned in the response XML message from the account.addStaticSegment method call.Use the account.getStaticSegments method to retrieve the full set of static segments created for your account. You can also find the ID number of a specific static segment by logging into the application and navigating to Administration > Account and Segment IDs and then scrolling to the Segment section. number Yes 852869
name The name of the static segment. If the static segment is being associated with a category (see below), then the names of the segments must be unique. string No Rock Genre
category_id The ID number of the category that this static segment should be assigned to. Use the legacy.retrieve_segment method to obtain a list of categories and their ID numbers that exist for your account. Alternatively, you can 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).If the <category_id> element is not included in the input XML message, then the category association of this static segment will remain unchanged.

If you want to "uncategorize" a static segment (e.g. you want to remove the association between the static segment and a category so that you can delete the category), then pass the value of '0' for this element.

number No 3426
display_on_survey A boolean value that defines whether the static segment should be displayed in the standard survey web page (or the custom survey web page) where applicable. boolean where:
  • 0 – do not display (default)
  • 1 – display
No 1
test_segment A boolean value that defines whether this static segment should be used as a test list with the Standard Test Message feature. If this element is set to '1', then this static segment will be designated as a test segment and can be used when sending a Standard Test Message.NOTE: If this static segment is to be used as a test segment, then it should not exceed 100 subscribers. boolean where:
  • 0 – is not a test segment (default)
  • 1 – is a test segment
No 0

Response

Field Description Example
responseCode A code indicating either success or failure of the operation. (see Error Codes below) 113
responseText Human readable description of the response code This static segment has been updated
id The ID number of the static segment being updated. 852869
name The name of static segment as provided in the input XML message. Rock Genre
category_id Returned in the response XML message if included in the input XML message.
display_on_survey Returned in the response XML message if included in the input XML message.
test_segment Returned in the response XML message if included in the input XML message.

Response Codes

Error Condition responseCode responseText
The Category ID provided in the input XML message either does not exist for the account, or it is not a valid number. 111 action not taken, invalid category_id
The static segment is associated with a category, and there is already existing a static segment of the same name for the same category. 112 action not taken, segment name already exists in this category.
Successful operation 113 this static segment has been updated
The static segment ID provided in the input XML message either does not exist for the account, or it is not a valid number. 114 action not taken, invalid segment id

Example Post

<methodCall>

<methodName>account.updateStaticSegment</methodName>

<id>852869</id>

<name>Rock Genre</name>

<category_id>3426</category_id>

<display_on_survey>1</display_on_survey>

</methodCall>

Example Response

<methodResponse>

<item>

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

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

<responseText><![CDATA[this static segment has been updated]]></responseText>

<responseData>

<id><![CDATA[852869]]></id>

<name><![CDATA[Rock Genre]]></name>

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

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

</responseData>

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

</item>

</methodResponse>

Example Error

<methodResponse>

<item>

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

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

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

<responseData>

<id><![CDATA[852869]]></id>

<name><![CDATA[Rock Genre]]></name>

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

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

</responseData>

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

</item>

</methodResponse>


Back to API Reference Guide