segmentGetCriteriaList
public static array segmentGetCriteriaList(string token, string segmentID)
Get the list of segment criteria.
Section
Contact List Related Methods

Parameters
string tokenA valid token for your account. To generate a token, use the login method.
string segmentIDThe segment ID for which the criteria is to be fetched

Returns
arrayReturns an array with the results.

Return Structure
integer sequenceThe sequence number of the record
string idThe ID of the criteria.
string fieldThe field on which the filter is to be done. In case it the date the contact is added use "Subscribed Date"
string segmentIDThe ID of the segment.
integer filterTypeThe type of filter (starts, ends, contains, equal, not starts, not ends, not contains, not equal, between)
string filterThe filter text to match (in case the field is not "Subscribed Date")
string startDateThe date on the filter is to start in case the field is "Subscribed Date"
string endDateThe date on the filter is to end in case the field is "Subscribed Date" and the filterType is "between"
string fieldTypeThe field type (0 for default or 4 for data field having date value)


Examples
download example code
xmlrpc_segmentGetCriteriaList.php


  1. <?php
  2. /**
  3. This Example shows how to authenticate a user using XML-RPC.
  4. Note that we are using the PEAR XML-RPC client and recommend others do as well.
  5. **/
  6. require_once 'XML/RPC2/Client.php';
  7. require_once 'inc/config.php';
  8. $client = XML_RPC2_Client::create($apiURL);
  9. $token = $client->login($apiLogin, $apiPassword);
  10. $segmentList = $client->segmentGet($token, "", 1, 100, "");
  11. $segmentID = $segmentList[0]['id'];
  12.  
  13. $segmentCriteriaLists = $client->segmentGetCriteriaList($token, $segmentID);
  14. foreach($segmentCriteriaLists as $rec) {
  15. print_r($rec);
  16. }
  17.  
  18. ?>