Description
Use this feature to add a Robinson entry to the system. It is possible to add a single or multiple E-Mail address(es). By default the Robinson entry is added to the permanent Robinson list. To add the entry or entries to the temporary Robinson list instead you can set the flag addToTemporaryRobinson.
Available starting from Backclick-Version: 5.7.5
In order to use this feature you have to provide the following information:
- Mandator ID
- API-Key (optional authentication, if not provided the IP address will be used for authentication)
- E-Mail addresses as an array
Optionally you can provide the information whether the E-Mail address is supposed to be added to the temporary list instead of the permanent list.
You will get information about success or failure as a result. Additionally you will be provided with information about the amount of entries added and how many entries were present before.
The following error messages can occur in a faulty request:
- No emailaddress are given for adding to robinson list!
- Mandator-ID can not be lower than 0! => You entered an invalid Mandator ID.
Example
Â
$client = new SoapClient($wsdlUrl);
$request = new StdClass();
$request->mandatorId = 0;
$request->addToTemporaryRobinson = false;
$request->subscriberEmails = array();
array_push($request->subscriberEmails, "[email protected]");
try {
$result = $client->addRobinsonEntry($request);
var_dump($result);
} catch (Exception $e) {
echo "Fehler aufgetreten: " . $e->getMessage() . "\r\n";
}object(stdClass)#2 (3) {
["success"]=>
bool(true)
["numAdded"]=>
int(0)
["numAlreadyExists"]=>
int(2)
}Source code
In order to test a working example you can download the source code.