Home / Selections / getSubscriberIds

Selections ‐ getSubscriberIds


Description:

Get ids of the subscribers from selection

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.
- This database could not be found
- The selection id parameter is required.
- The requested selection does not exist
- The requested selection is deleted.

Example:

You should call this function as followed:
- rest/v2/selections/getSubscribersIds?token=TOKEN&database=DATABASE_ID&id=SELECTION_ID
- rest/v2/selections/getSubscribersIds?token=TOKEN&database=DATABASE_ID&id=SELECTION_ID&page=3&records_per_page=500

                require_once 'Rest.php';

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

                $rest = new Rest($username, $password, $database);
                $result = $rest->call('selections/getSubscriberIds', [
                	'id' => 'SELECTION_ID',
'page' => '3',
'records_per_page' => '500' ], 'GET'); var_dump($result);

Parameters:

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

key: id
values: integer, unsigned integer, required
what: The ID of a selection

key:    page
values: integer, >= 0, defaults 0
what:   The offset-page the result-list should start at.

key:    records_per_page
values: integer, >= 5 & <= 5000, defaults to 1000
what:   How much records you want to retrieve.

See:

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