Home / Statistics / sentMailingsBySubscriber

Statistics ‐ sentMailingsBySubscriber


Description:

Get all sent mailings from a subscriber based on subscriber_id or email

The following errors can occur:
- Token not present in request.
- Token not in the required format.
- Session does not exist.
- Session has expired.
- The user does not exist.
- No database specified.
- Database parameter not in correct format.
- You are not allowed to access this database.
- The subscriber_id or email parameter is required.
- The subscriber doesn't exists
- The page parameter has the wrong format

Example:

You should call this function as follows:
- rest/v2/statistics/sentMailingsBySubscriber?token=TOKEN&database=DATABASE_ID
- rest/v2/statistics/sentMailingsBySubscriber?token=TOKEN&database=DATABASE_ID&subscriber_id=SUBSCRIBER_ID
- rest/v2/statistics/sentMailingsBySubscriber?token=TOKEN&database=DATABASE_ID&subscriber_id=SUBSCRIBER_ID&page=INTEGER
- rest/v2/statistics/sentMailingsBySubscriber?token=TOKEN&database=DATABASE_ID&email=EMAIL
- rest/v2/statistics/sentMailingsBySubscriber?token=TOKEN&database=DATABASE_ID&email=EMAIL&page=INTEGER

                require_once 'Rest.php';

                $username = 'my_username';
                $password = 'my_password';
                $database = '999';

                $rest = new Rest($username, $password, $database);
                $result = $rest->call('statistics/sentMailingsBySubscriber', [
                	'subscriber_id' => 'SUBSCRIBER_ID',
'email' => 'EMAIL',
'page' => 'INTEGER' ], 'GET'); var_dump($result);

Parameters:

The following parameters this method can/should be called with:

key: subscriber_id
values: Integer, required (subscriber_id or email parameter)
what: The id of a subscriber

key: email
values: string, valid e-mail address, required (subscriber_id or email parameter)
what: E-mail address of the subscriber

key: page
values: integer, not required
what: records are per 100, starting with page 0

See:

The following items:
- user/login For the TOKEN.
- user/database For the DATABASE_ID