📘 BACKCLICK Doku
Anmelden
Hinweisbox:

Description

Use the feature GetSubscribers to retrieve personal information and the lists subscribed to for specific E-Mail addresses. If an address is not present in the system it will be displayed in the status field of the response object. You can validate and export up to 1000 addresses this way.

Available starting from Backclick-Version: 5.9.0

In order to export data you have to provide the following information:

  • Mandator ID
  • API-Key (optional authentication, if not provided the IP address will be used for authentication)
  • Do you want to export personal data as well? (default: “fillSubscriberFields” => false); optional
  • List of E-Mail addresses to be exported

You will get an object with all information requested as a result. A “-1” in the "status" field of this object means that the corresponding E-Mail address is not present in the system.

The following error messages can occur in a faulty request:

  • Too many emailaddresses in request! Max email addresses per request: n

Example

$client = new SoapClient($wsdlUrl);
date_default_timezone_set('Europe/Berlin');
$getSubscribersRequest = new StdClass();
$getSubscribersRequest->mandatorId = 0;
$getSubscribersRequest->emailAddresses = array();
array_push($getSubscribersRequest->emailAddresses, '[email protected]');
$getSubscribersRequest->fillSubscriberFields = true;
 
try {
  $result = $client->getSubscribers($getSubscribersRequest);
  var_dump($result);
} catch (Exception $e) {
  echo "Error: " . $e->getMessage() . "\n";
}
object(stdClass)#3 (1) {
  ["subscribers"]=>
  object(stdClass)#4 (1) {
    ["item"]=>
    object(stdClass)#5 (5) {
      ["subscriberEmail"]=>
      string(22) [email protected]"
      ["status"]=>
      int(1)
      ["mandatorId"]=>
      int(0)
      ["newsletterListIds"]=>
      string(7) "1"
      ["subscriberFields"]=>
      object(stdClass)#6 (1) {
        ["item"]=>
        array(2) {
          [0]=>
          object(stdClass)#7 (2) {
            ["fieldName"]=>
            string(7) "VORNMER"
            ["fieldValue"]=>
            string(3) "User"
          }
        }
      }
    }
  }
}

Source code

In order to test a working example you can download the source code.

Example for exporting subscriber data

Abbrechen