Home / Mail / availables

Mail ‐ availables


Description:

Using this method you can retrieve all the available mailings
you can use to send (Open mails are not being showed).

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.

Example:

You should call this function as followed:
- rest/v2/mail/availables?token=TOKEN&database=DATABASE_ID
- rest/v2/mail/availables?token=TOKEN&database=DATABASE_ID&usable=yes
- rest/v2/mail/availables?token=TOKEN&database=DATABASE_ID&offset=150&records=50

                require_once 'Rest.php';

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

                $rest = new Rest($username, $password, $database);
                $result = $rest->call('mail/availables', [
                	'offset' => '150',
'records' => '50' ], 'GET'); var_dump($result);

Parameters:

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

key: usable
values: 1, true, yes
what: Shows you only the mails you can use for mailing (sendContinuesMail, etc.)

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

key: records
values: integer, >= 5 & <= 50, defaults to 25
what: How much records you want to retrieve

See:

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