The downloadList() method downloads a single member list, optionally restricting the download to members who have unsubscribed and/or bounced. To specify such restrictions, include “bounced” or “unsubscribed” (or both) in the restrict_to argument. The fields_to_include argument can be filled with the names of fields in the specified list. A delimiter or “csv” or “tab” must be provided. The resulting file will be available for download, and its location will be provided in the result.
Input
session_id [xsd:string] (required)
Your API session id.
list_id [xsd:int] (required)
The id of the list to download.
delimiter [xsd:string] (required)
The type of result file to create: either “csv” or “tab”.
fields_to_include [vrtypens:ArrayOfString] (required)
An array of the names of list fields to include as columns in the result.
restrict_to [vrtypens:ArrayOfString]
An array of record types to restrict the result to (default is an empty array).
Valid items for this array are:
Valid items for this array are:
- bounced
- unsubscribed
notification_email_address [xsd:string]
This is required for the background version of this method. When the result is ready, this email
address will receive a notification that includes a link that can be used to download the list.
address will receive a notification that includes a link that can be used to download the list.
Output
Examples
Perl
$vrapi->downloadList ( { session_id => $sid, list_id => $lid, delimiter => 'csv', fields_to_include => [ email_address, first_name, last_name ], } );
PHP
$vrapi->downloadList ( array( 'session_id' => $sid, 'list_id' => $lid, 'delimiter' => 'csv', 'fields_to_include' => array( 'email_address', 'first_name', 'last_name' ), ) );
Ruby
vr.downloadList({ 'session_id' => sid, 'list_id' => lid, 'delimiter' => 'csv', 'fields_to_include' => [ 'email_address', 'first_name', 'last_name'] })
C#.NET
downloadListArgs objDownloadList = new downloadListArgs(); objDownloadList.session_id = _sSessionId; objDownloadList.list_id = iListId; objDownloadList.fields_to_include = new string[] {"email_address", "first_name"}; objDownloadList.delimiter = "csv"; objVR.downloadList(objDownloadList);