get different statusses of a email adress in given databases
The following errors can occur:
- The email parameter is required
- The email parameter has the wrong format
- the parameter database_ids or customer_id are mandatory
- database_ids parameter cannot have a Multidimensional array.
- values of the the array database_ids are not a number
- customer_id parameter is not a number
- No access to some of the given database_ids
Hash
if hashed, then first encrypt the email with the public key, after that run it through base64 encode. This will be the value
which you need to be entering in the email parameter
You should call this function as followed:
- rest/v2/subscriber/subscriptionDetails?token=TOKEN&database=DATABASE_ID&email=EMAIL&database_ids[0]=DATABASE_ID&hash=0
(or &customer_id=CUSTOMER_ID )
- rest/v2/subscriber/subscriptionDetails?token=TOKEN&database=DATABASE_ID&email=EMAIL&database_ids[0]=DATABASE_ID&hash=1
(or &customer_id=CUSTOMER_ID )
require_once 'Rest.php';
$username = 'my_username';
$password = 'my_password';
$database = '999';
$rest = new Rest($username, $password, $database);
$result = $rest->call('subscriber/subscriptionDetailsCrypted', [
'email' => [
' => 'EMAIL',
' => 'EMAIL'
],
'database_ids' => [
'DATABASE_ID',
'DATABASE_ID'
]
], 'GET');
var_dump($result);
The following parameters this method can/should be called with:
key: email
values: String, required
what: The email of a subscriber
key: hash
values: Integer, optional
what: 0 for disable hashing (default), 1 for enable hashing
key: database_ids
values: Array, required (database_ids or customer_id)
what: An array with database_ids
key: customer_id
values: Integer, required (database_ids or customer_id)
what: The id of the customer you want the db's returned
The following items:
- user/login For the TOKEN.
- user/database For the DATABASE_ID
- subscriber/findByEmail For the SUBSCRIBER_ID