Use the API to add a new segment to a group.
Submit an XML Request with the following details:
Post URL: http://cp.semsblast.com/api/v3.0/groups/addSegment/
Fields to Post | |||
apiKey | String | REQUIRED | The APIKey of the requesting user. |
groupID | Int | REQUIRED | The ID of the group to add the segment for. |
segmentName | String | REQUIRED | A reference name for the segment. |
matchType | Int | REQUIRED | 0 = Match ANY of the rules 1 = Match ALL of the rules |
segmentRules | Xml | REQUIRED | |
--> rule | Xml | REQUIRED | |
----> field | String | REQUIRED | The field affected. Fields can be any of the following:
|
----> modifier | String | REQUIRED | The modifier. Modifiers can include... For Text / Number Fields:
|
----> value | String | REQUIRED | The value to segment on. |
Data Sent Back | ||
error | Int | Indicated wether an error has occured. 0 for no error. 1 for error. |
status | String | If there's been an error, a text description of the error that occured will be here. |
segmentID | String | If successful you will receive the ID of the new segment. |
<xml> <apiKey>44-121312131223</apiKey> <groupID>42131</groupID> <segmentName>My New Segment</segmentName> <matchType>1</matchType> <segmentRules> <rule> <field>firstName</field> <modifier>Contains</modifier> <value>hotmail.com</value> </rule> <rule> <field>dateAdded</field> <modifier>Is After</modifier> <value>2014-04-21</value> </rule> </segmentRules> </xml> |
<xml> <error>0</error> <status>Success</status> <segmentID>1234</segmentID> </xml> |