Exports
in package
Start an export, or get information on export jobs in progress.
Table of Contents
Properties
- $master : mixed
Methods
- __construct() : mixed
- activity() : struct
- Begins an export of your activity history. The activity will be exported to a zip archive containing a single file named activity.csv in the same format as you would be able to export from your account's activity view. It includes the following fields: Date, Email Address, Sender, Subject, Status, Tags, Opens, Clicks, Bounce Detail. If you have configured any custom metadata fields, they will be included in the exported data.
- getList() : array<string|int, mixed>
- Returns a list of your exports.
- info() : struct
- Returns information about an export job. If the export job's state is 'complete', the returned data will include a URL you can use to fetch the results. Every export job produces a zip archive, but the format of the archive is distinct for each job type. The api calls that initiate exports include more details about the output format for that job type.
- rejects() : struct
- Begins an export of your rejection blacklist. The blacklist will be exported to a zip archive containing a single file named rejects.csv that includes the following fields: email, reason, detail, created_at, expires_at, last_event_at, expires_at.
- whitelist() : struct
- Begins an export of your rejection whitelist. The whitelist will be exported to a zip archive containing a single file named whitelist.csv that includes the following fields: email, detail, created_at.
Properties
$master
public
mixed
$master
Methods
__construct()
public
__construct(Client $master) : mixed
Parameters
- $master : Client
activity()
Begins an export of your activity history. The activity will be exported to a zip archive containing a single file named activity.csv in the same format as you would be able to export from your account's activity view. It includes the following fields: Date, Email Address, Sender, Subject, Status, Tags, Opens, Clicks, Bounce Detail. If you have configured any custom metadata fields, they will be included in the exported data.
public
activity([string $notifyEmail = null ][, string $dateFrom = null ][, string $dateTo = null ][, array<string|int, mixed> $tags = null ][, array<string|int, mixed> $senders = null ][, array<string|int, mixed> $states = null ][, array<string|int, mixed> $apiKeys = null ]) : struct
Parameters
- $notifyEmail : string = null
-
an optional email address to notify when the export job has finished
- $dateFrom : string = null
-
start date as a UTC string in YYYY-MM-DD HH:MM:SS format
- $dateTo : string = null
-
end date as a UTC string in YYYY-MM-DD HH:MM:SS format
- $tags : array<string|int, mixed> = null
-
an array of tag names to narrow the export to; will match messages that contain ANY of the tags
- tags[] string a tag name
- $senders : array<string|int, mixed> = null
-
an array of senders to narrow the export to
- senders[] string a sender address
- $states : array<string|int, mixed> = null
-
an array of states to narrow the export to; messages with ANY of the states will be included
- states[] string a message state
- $apiKeys : array<string|int, mixed> = null
-
an array of api keys to narrow the export to; messsagse sent with ANY of the keys will be included
- api_keys[] string an API key associated with your account
Return values
struct —information about the activity export job that was started
- id string the unique identifier for this Export. Use this identifier when checking the export job's status
- created_at string the date and time that the export job was created as a UTC string in YYYY-MM-DD HH:MM:SS format
- type string the type of the export job
- finished_at string the date and time that the export job was finished as a UTC string in YYYY-MM-DD HH:MM:SS format, or null for jobs that have not run
- state string the export job's state
- result_url string the url for the export job's results, if the job is complete
getList()
Returns a list of your exports.
public
getList() : array<string|int, mixed>
Return values
array<string|int, mixed> —the account's exports
- return[] struct the individual export info
- id string the unique identifier for this Export. Use this identifier when checking the export job's status
- created_at string the date and time that the export job was created as a UTC string in YYYY-MM-DD HH:MM:SS format
- type string the type of the export job - activity, reject, or whitelist
- finished_at string the date and time that the export job was finished as a UTC string in YYYY-MM-DD HH:MM:SS format
- state string the export job's state - waiting, working, complete, error, or expired.
- result_url string the url for the export job's results, if the job is completed.
info()
Returns information about an export job. If the export job's state is 'complete', the returned data will include a URL you can use to fetch the results. Every export job produces a zip archive, but the format of the archive is distinct for each job type. The api calls that initiate exports include more details about the output format for that job type.
public
info(string $id) : struct
Parameters
- $id : string
-
an export job identifier
Return values
struct —the information about the export
- id string the unique identifier for this Export. Use this identifier when checking the export job's status
- created_at string the date and time that the export job was created as a UTC string in YYYY-MM-DD HH:MM:SS format
- type string the type of the export job - activity, reject, or whitelist
- finished_at string the date and time that the export job was finished as a UTC string in YYYY-MM-DD HH:MM:SS format
- state string the export job's state - waiting, working, complete, error, or expired.
- result_url string the url for the export job's results, if the job is completed.
rejects()
Begins an export of your rejection blacklist. The blacklist will be exported to a zip archive containing a single file named rejects.csv that includes the following fields: email, reason, detail, created_at, expires_at, last_event_at, expires_at.
public
rejects([string $notifyEmail = null ]) : struct
Parameters
- $notifyEmail : string = null
-
an optional email address to notify when the export job has finished
Return values
struct —information about the rejects export job that was started
- id string the unique identifier for this Export. Use this identifier when checking the export job's status
- created_at string the date and time that the export job was created as a UTC string in YYYY-MM-DD HH:MM:SS format
- type string the type of the export job
- finished_at string the date and time that the export job was finished as a UTC string in YYYY-MM-DD HH:MM:SS format, or null for jobs that have not run
- state string the export job's state
- result_url string the url for the export job's results, if the job is complete
whitelist()
Begins an export of your rejection whitelist. The whitelist will be exported to a zip archive containing a single file named whitelist.csv that includes the following fields: email, detail, created_at.
public
whitelist([string $notifyEmail = null ]) : struct
Parameters
- $notifyEmail : string = null
-
an optional email address to notify when the export job has finished
Return values
struct —information about the whitelist export job that was started
- id string the unique identifier for this Export. Use this identifier when checking the export job's status
- created_at string the date and time that the export job was created as a UTC string in YYYY-MM-DD HH:MM:SS format
- type string the type of the export job
- finished_at string the date and time that the export job was finished as a UTC string in YYYY-MM-DD HH:MM:SS format, or null for jobs that have not run
- state string the export job's state
- result_url string the url for the export job's results, if the job is complete