Skip to content
Retrieve all bounces since a period

Retrieve all bounces since a period

By Mounir 2 min read

Retrieve behavioral data for the whole account over a time period

array Extrait_Periode( login, motdepasse, type, periode)

Description

Retrieve the list of failed addresses (bounces) for all campaigns since periode.

Parameters (required)

login: customer ID (nichandle)

motdepasse: the password

periode: the time period in seconds. The maximum value is 864000 seconds (10 days).

type: the extraction type. This variable can take the following values:

  • NPAI (bounces)
  • ouvreurs (openers)
  • desinscrits (unsubscribers)

Return value

An array where each row contains an email address:

  • [id] => email address

Error messages

No field must be left empty login

No field must be left empty motdepasse

Authentication error (invalid login / password)

No field must be left empty ope

No field must be left empty type

This campaign does not appear to belong to you

Unknown type value

The periode parameter must not exceed 864000 (10 days)

Example with NuSOAP

//Function call include('nusoap/nusoap.php');

$client = new soapclient('https://www.eml-srv.com/_soap/control.php'); // Remove the 's' from https if CURL is not installed

$parametres = array( 'login'=>'your_login', 'motdepasse'=>'your_password', 'type'=>'NPAI', 'periode'=>'86000' );

$variable=$client->call('Extrait_Periode', $parametres);

// Retrieve the error, if any
if($client->fault)
die("Error:Code: {$client->faultcode}"
. "Detail: {$client->faultactor}"
. "Solution: {$client->faultstring}");

// Display print_r($variable);

Which gives a result like:

Array
(
    [0] => support@ediware.net
    [1] => info@ediware.net
)

Example with PHP5

// Function call try { $client = new SoapClient(null, array('location' => "https://www.eml-srv.com/_soap/control_v2.php", 'uri'      => "https://www.eml-srv.com", 'encoding'=>'ISO-8859-1'  ));

$variable = $client->Extrait_Periode('your_login','your_password','NPAI','86000'); print_r($variable); } catch (SoapFault $fault) {
trigger_error("SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_USER_ERROR);

}

Which gives a result like:

Array
(
    [0] => support@ediware.net
    [1] => info@ediware.net
)
Last updated on