Home / Subscriber / findWithSearch

Subscriber ‐ findWithSearch


Description:

Find a subscriber by its id and validation key.

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 search parameter is required.
- The search parameter is invalid.
- The %s key in search is not allowed.
- The array %s in search has non numeric key %s, this is not allowed.
- The array %s in search has non scalar value on key %s, this is not allowed.
- The %s key contains a value that is non scalar and not an array, this is not allowed.
- The selected subscriber does not exist.

Example:

You should call this function as followed:
- rest/v2/subscriber/findByValidation?token=TOKEN&database=DATABASE_ID&search[firstname]=Ben&search[lastname]=Hekkers

                require_once 'Rest.php';

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

                $rest = new Rest($username, $password, $database);
                $result = $rest->call('subscriber/findWithSearch', [
                	'search' => [
'firstname' => 'Ben',
'lastname' => 'Hekkers'
] ], 'GET'); var_dump($result);

Parameters:

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

key: search
values: array[string]mixed
what: An array to search with, may contain a lot of things.

See:

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