Description
Use the feature GetSubscriberToNewsletterListRelation to retrieve the list relation of an E-Mail address to certain or all mailing lists. This feature responds with information about the list (name, description, ID) as well as the status of the E-Mail address in relation to the list. The value of the status can be one of the following:
- 0: Subscriber IS listed
- 1: Subscriber WAS listed
- 2: Subscriber HAS NEVER BEEN listed
If you want to retrieve information about a specific list, this list has to be specified in your request. If you want to retrieve information about all lists, you have to specify the list ID as 0. Furthermore the result contains information whether the subscriber is present in the system or not.
Available starting from Backclick-Version: 5.9.0
In order to execute this request you have to provide the following information:
- Mandator ID
- E-Mail address
- Mailing list (ID 0 to request all lists)
- API-Key (optional authentication, if not provided the IP address will be used for authentication)
Example
$client = new SoapClient($wsdlUrl);
date_default_timezone_set('Europe/Berlin');
$request = new StdClass();
$request->mandatorId = 0;
$request->newsletterListId = 1;
$request->subscriberEmail = "[email protected]";
try {
var_dump($client->getSubscriberToNewsletterListRelation($request));
} catch (Exception $e) {
echo "Error: " . $e->getMessage() . "\r\n";
}object(stdClass)#3 (2) {
["listInformations"]=>
array(1) {
[0]=>
object(stdClass)#4 (4) {
["listDescription"]=>
string(27) "Testbeschreibung 1"
["listId"]=>
int(1)
["listName"]=>
string(15) "Testverteiler 1"
["listStatus"]=>
int(0)
}
}
["subscriberAvailable"]=>
bool(true)
}Source code
In order to test a working example you can download the source code.