segmentGetCriteriaList
public static array segmentGetCriteriaList(string token, string segmentID)
Get the list of segment criteria.
| Parameters |
| string token | A valid token for your account. To generate a token, use the login method. |
| string segmentID | The segment ID for which the criteria is to be fetched |
| Returns |
| array | Returns an array with the results. |
| Return Structure |
| integer sequence | The sequence number of the record |
| string id | The ID of the criteria. |
| string field | The field on which the filter is to be done. In case it the date the contact is added use "Subscribed Date" |
| string segmentID | The ID of the segment. |
| integer filterType | The type of filter (starts, ends, contains, equal, not starts, not ends, not contains, not equal, between) |
| string filter | The filter text to match (in case the field is not "Subscribed Date") |
| string startDate | The date on the filter is to start in case the field is "Subscribed Date" |
| string endDate | The date on the filter is to end in case the field is "Subscribed Date" and the filterType is "between" |
- <?php
- /**
- This Example shows how to authenticate a user using XML-RPC.
- Note that we are using the PEAR XML-RPC client and recommend others do as well.
- **/
- require_once 'XML/RPC2/Client.php';
- require_once 'inc/config.php';
- $client = XML_RPC2_Client::create($apiURL);
- $token = $client->login($apiLogin, $apiPassword);
- $segmentList = $client->segmentGet($token, "", 1, 100, "");
- $segmentID = $segmentList[0]['id'];
-
- $segmentCriteriaLists = $client->segmentGetCriteriaList($token, $segmentID);
- foreach($segmentCriteriaLists as $rec) {
- print_r($rec);
- }
-
- ?>