Mailkitchen Webservices documentation

Mailkitchen invites you to use Webservices to manage your databases, campaigns, statistical feedback, etc. Comprehensive documentation is presented here, offering the functions needed to use your account (create a MailKitchen account if you do not already have one). New functionalities will be added on a regular basis and details of these will be provided here (please do not hesitate to let us know of any ideas you may have by filling out our ideas box form)

Description Method : ImportMember

ImportMember function is used to import members as well as personal fields in one or several mailing list.

  • Syntax

    $ws->ImportMember( liste_diffusion, data, token )
  • Parameters

    • liste_diffusion (array) Array of subscribers list id
    • datas (array) Array of datas to import [header], [] [fields]
    • token (string) [Optional] Token from authentification
  • Return

    • Array of report after importation
    • Type : array
  • Code exemple

    <?php
    $login = 'MyLogin';
    $password = 'MyPassword';
    try {
     
    	$ws = new SoapClient(
    			"http://webservices.mailkitchen.com/server.wsdl",
    			array('trace' => 1, 'soap_version'   => SOAP_1_2)
    	);
    	$token = $ws->Authenticate($login, $password);
     
    	$datas = array (
    		'header'	=> array ('number','email','name','surname'),
    		'datas'		=> array (
    			0 => array('1','test1@yahoo.com','DOE','John'),
    			1 => array('2','test2@gmail.com','SNOW','Jon'),
    			2 => array('42','test3@outlook.com','CASH','John'),
    			3 => array('1337','test4@aol.com', 'LENNON', 'John')
    		)
    	);
    	$report = $ws->ImportMember(array(42,1337), $datas);
     
    }
    catch (SoapFault $exception) { 
    	header('Content-Type: text/plain; charset: utf-8');
    	echo $exception->faultcode . ' : ' . $exception->getMessage();
    }
    ?>