# Class Mandrill_Exports

Located at Mandrill/Exports.php

Methods summary
`public` | # `__construct( `Mandrill` $master )`

`public struct`

# `info( string $id )`

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.

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.

#### Parameters

$id
  `string`
  $id an export job identifier

#### Returns

`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.

`public array`

# `getList( )`

Returns a list of your exports.

Returns a list of your exports.

#### Returns

`array`
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.

`public struct`

# `rejects( string $notify_email = null )`

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.

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.

#### Parameters

$notify_email
  `string`
  $notify_email an optional email address to notify when the export job has finished.

#### Returns

`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

`public struct`

# `whitelist( string $notify_email = null )`

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.

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.

#### Parameters

$notify_email
  `string`
  $notify_email an optional email address to notify when the export job has finished.

#### Returns

`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

`public struct`

# `activity( string $notify_email = null, string $date_from = null, string $date_to = null, array $tags = null, array $senders = null, array $states = null, array $api_keys = null )`

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.

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.

#### Parameters

$notify_email
  `string`
  $notify_email an optional email address to notify when the export job has finished
$date_from
  `string`
  $date_from start date as a UTC string in YYYY-MM-DD HH:MM:SS format
$date_to
  `string`
  $date_to end date as a UTC string in YYYY-MM-DD HH:MM:SS format
$tags
  `array`
  $tags 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`
  $senders an array of senders to narrow the export to - senders[] string a sender address
$states
  `array`
  $states an array of states to narrow the export to; messages with ANY of the states will be included - states[] string a message state
$api_keys
  `array`
  $api_keys 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

#### Returns

`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