Home / Export / subscribers

Export ‐ subscribers


Description:

Retrieve all the subscribers from certain date

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 email parameter is required.
- The email parameter is invalid.
- The selected subscriber does not exist.
- An id/list of ids are required.
- The since parameter is required.
- The since parameter can not be empty
- You requested more subscribers than there are in the database

Example:

You should call this function as followed:
- rest/v2/export/subscribers?token=TOKEN&database=DATABASE_ID&offset=0&records=1000&since=2012-01-01

                require_once 'Rest.php';

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

                $rest = new Rest($username, $password, $database);
                $result = $rest->call('export/subscribers', [
                	'offset' => '0',
'records' => '1000',
'since' => '2012-01-01' ], 'GET'); var_dump($result);

Parameters:

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

key: offset
values: integer, not required
what: start from record number

key: records
values: integer, not required
what: How many subscribers do you want back (max 5000)

key: since
values: String, any value that can be converted by php/strtotime, required
what: The start date from when the subscribers must be retrieved

See:

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