get multiple campaign summaries

I am currently using the following to get a campaigns summary:

require_once '../../csrest_campaigns.php';

$auth = array('api_key' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
$wrap = new CS_REST_Campaigns('Campaign ID to get the summary of', $auth);
$result = $wrap->get_summary();

echo "Result of GET /api/v3/campaigns/{id}/summary\n<br />";
if($result->was_successful()) {
    echo "Got summary\n<br /><pre>";
} else {
    echo 'Failed with code '.$result->http_status_code."\n<br /><pre>";
echo '</pre>';

How would i adapt this to bring in multiple summaries from all campaigns by a certain client?

I have tried adding each campaign id into an array, but this doesnt work.

Any help or advice would be greatly appreciated.


roshodgekiss roshodgekiss, 3 years ago

HI there Dan, you're likely better off using our method for getting sent campaigns for a given client - here's the PHP sample for this. Let us know if you have any questions about this :)

Get in touch with us on Twitter:
We're also on Facebook:

200,000 companies around the world can't be wrong.

From Australia to Zimbabwe, and everywhere in between, companies count on 
Campaign Monitor for email campaigns that drive real business results.

Get started for free