API Documentation V2
Exports collection allows scheduling (asynchronous) exports of lists and segments. Data is exported in CSV format.
You may choose what fields will be exported (system and custom fields) by sending a POST request with different parameters.
Export status may be then checked by sending a GET request and when the export is ready, the request will return an URL to file available for download.
Data part of request for scheduling an export.
Data element children:
Field element children:
Property element children:
Available system fields to export:
*It is only valid when Doublt Opt-In list is exported. Otherwise, trying to use it will result in an "Unknown field name" error.
For customers with SMS/MMS integration enabled there are additional fields available:
Method returns ID of scheduled export. ID can be used to get export status using GET method.
Response Data element:
Simple list export
Request:
POST https://api.esv2.com/v2/Api/Exports HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/xml
User-Agent: Jakarta Commons-HttpClient/3.1
Host: api.esv2.com
Content-Length: 411
<ApiRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<ApiKey>test_api_key1</ApiKey>
<Data>
<Type>List</Type>
<ListId>11</ListId>
<Fields>
<Field>Email</Field>
<Field>FirstName</Field>
<Field>LastName</Field>
</Fields>
<FileFormat>Csv</FileFormat>
</Data>
</ApiRequest>
Exporting a segment with custom properties
Request:
POST https://api.esv2.com/v2/Api/Exports HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/xml
User-Agent: Jakarta Commons-HttpClient/3.1
Host: api.esv2.com
Content-Length: 411
<ApiRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<ApiKey>test_api_key1</ApiKey>
<Data>
<Type>Segment</Type>
<SegmentId>93</SegmentId>
<Fields>
<Field>Email</Field>
<Field>FirstName</Field>
<Field>LastName</Field>
</Fields>
<Properties>
<Property>5</Property>
<Property>12</Property>
</Properties>
</Data>
</ApiRequest>
Response:
HTTP/1.1 201 Created
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNetMvc-Version: 3.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Mon, 25 Nov 2013 16:40:14 GMT
Content-Length: 147
<ApiResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Data>12</Data>
</ApiResponse>