Client for the Campaign Commander API (wrapper)

2.0.0 2015-02-11 17:18 UTC

This package is not auto-updated.

Last update: 2023-11-18 23:38:01 UTC


Campaign Commander is the stuff you need to manage your Campaign Commander.


PHP Campaign Commander is a library to communicate with the Campaign Commander API.


PHP Campaign Commander is BSD licensed.



  • PHP >= 5.4.4
  • soap extension

Installation through Composer

	"require": {
		"mylittleparis/campaign-commander": "dev-master"


This library is structured on 2 layers:

  • Low-level API clients : only SOAP (using BeSimple lib) clients are provided (one for standard requests, one for requests containing attachments)
  • Mid-level API services : using low-level clients, they are mapped to CampaignCommander API methods and allow you to really work with CampaignCommander

Basic usage


  1. Instantiate a mid-level service with an appropriate low-level API client factory
  2. Enjoy the service methods :)

Example : create an export from a segment

use BeSimple\SoapClient as Soap;
use MyLittle\CampaignCommander\API\SOAP as Client;
use MyLittle\CampaignCommander\Service as Service;

$clientFactory = new Client\StandardClientFactory(new Soap\SoapClientBuilder(), 'login', 'password', 'key', '');
$service = new Service\MemberExportService($clientFactory);
try {
	$result = $service->createDownloadByMailinglist('ID_SEGMENT', 'ALL_MEMBERS', 'EMAIL,FIELD1', 'PIPE', 'true', 'EMAIL', 'true');



this library comes with some unit tests. if you plan to run these tests, you can do it simply by running phpunit in the project root directory like that :

$ cd /path/to/lib
$ phpunit

For more information about PHPUnit, you can read the official documentation

The tests are located in the folder tests/.

Sites using this class