reportGet
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.
| Parameters |
| string token | A valid token for your account. To generate a token, use the login method. |
| string filter | Show campaigns where the campaign name starts with the filter |
| integer pageNumber | Fetch results from the given page number. |
| integer pageSize | Number of results per page. |
| string orderBy | Sort the results based on "name" or "date". |
| string sortOrder | Sort the results in the "asc"ending or "desc"ending order. |
| Returns |
| array | Returns an array with the results. |
| Return Structure |
| integer sequence | The sequence number of the record |
| string id | The ID of the email campaign |
| string emailName | Name of the email campaign |
| bool isSegment | True if the target for the campaign is a segment |
| integer toListID | The ID of the target contact list ID / segment |
| string toListName | The name of the target contact list ID / segment |
| string status | The status of the email campaign. Can be Sent, Draft, Scheduled or Incomplete |
| string createdDate | The date on which the email campaign was created |
| string scheduleDate | The campaign delivery date |
- <?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);
- $campaignList = $client->reportGet($token, "", 1, 100, "", "");
-
- foreach($campaignList as $rec){
- echo $rec['sequence'] . "] Campaign: " . $rec['emailName'] . "(" . $rec['id'] . ")";
- echo "\t Status:" . $rec['status'] . "\t Delivery Date: " . $rec['scheduleDate'] ;
- echo "\t Target List ID: " . $rec['toListID'] . "\t Target List Name: " . $rec['toListName'];
- echo "<br />";
- }
-
- ?>