Export Process Overview

Exports are intended to deal with requests for large data sets where it doesn't make sense to use the normal process of working with JSON and paging through results.

Step 1: Request Export

Make a call to get the export you need from the list of export methods. The response will contain the jobID you'll need to check the status of the export job.

GET
/exports/emails?startDate=2020-07-29&endDate=2020-08-29
cURL
Copy
Response Data

Duplicate Jobs

A job is considered a duplicate when there is an existing job with a status of "Pending" for the same call (e.g. /exports/emails/) with the same parameters (i.e. the same date range). If a duplicate job exists, an error will be returned. Consider preventing your app from making the exact same call so quickly. Bulk export data is not intended to change rapidly.

GET
/exports/emails?startDate=2020-07-29&endDate=2020-08-29
cURL
Copy
Response Data

Step 2: Check Job Status

Using the jobID returned from your export request, make a call to request the status of the job. Keep checking periodically until the job status is "Completed" or "Failed". Under normal circumstances, jobs will be completed within a few minutes of the original request. For a list of all possible statuses, see /exports/jobStatus.

Job Not Completed

GET
/exports/jobStatus?jobID=123
cURL
Copy
Response Data

Job Completed with No Records

If no records are returned, a file will not be generated and the process is complete.

GET
/exports/jobStatus?jobID=123
cURL
Copy
Response Data

Job Completed with Records

This is the response you're looking for. When the job is completed and has records, the response will contain the fileKey you will use to retrieve the file (see Step 3). The file will be available until the time specified by the fileExpiration (remember, all times are GMT).

GET
/exports/jobStatus?jobID=123
cURL
Copy
Response Data

Step 3: Retrieve File

For details on the response file format, see /exports/getFile.

GET
/exports/getFile?fileKey=acc38381-965b-0a9e-95a7-20b7f3cc45cc
cURL
Copy
Response Data