public static array reportGet(string token, string filter, integer pageNumber, integer pageSize, string orderBy, string sortOrder)
Get the list of sent campaign using the filter and paging limits, ordered by the name or date of the campaign.
Report Related Methods

string tokenA valid token for your account. To generate a token, use the login method.
string filterShow campaigns where the campaign name starts with the filter
integer pageNumberFetch results from the given page number.
integer pageSizeNumber of results per page.
string orderBySort the results based on "name" or "date".
string sortOrderSort the results in the "asc"ending or "desc"ending order.

arrayReturns an array with the results.

Return Structure
integer sequenceThe sequence number of the record
string idThe ID of the email campaign
string emailNameName of the email campaign
bool isSegmentTrue if the target for the campaign is a segment
integer toListIDThe ID of the target contact list ID / segment
string toListNameThe name of the target contact list ID / segment
string statusThe status of the email campaign. Can be Sent, Draft, Scheduled or Incomplete
string createdDateThe date on which the email campaign was created
string scheduleDateThe campaign delivery date

download example code

  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. $campaignList = $client->reportGet($token, "", 1, 100, "", "");
  12. foreach($campaignList as $rec){
  13.     echo $rec['sequence'] . "] Campaign: " . $rec['emailName'] . "(" . $rec['id'] . ")";
  14.     echo "\t Status:" . $rec['status'] . "\t Delivery Date: " . $rec['scheduleDate'] ;
  15.     echo "\t Target List ID: " . $rec['toListID'] . "\t Target List Name: " . $rec['toListName'];
  16.     echo "<br />";
  17. }
  19. ?>