REST API v3: GET data request data

You can request the data of your data request by sending an HTTP GET call to the following URL:

https://api.copernica.com/v3/datarequest/$id/data?access_token=xxxx

where $id is the request identifier of interest. You may first want to check if the data is available with the data request status.

Returned fields

A file containing a JSON with all available information. The JSON contains two members, info and data. The info member has also two members type and id. The type provides the type of info, which can be email, profile, or subprofile, the id is the email address, or the numeric identifier of the profile or subprofile.

The data member in the JSON contains an array of arrays with all the info we have found. Examples of the information that is in the data member are:

  • Complete MIMEs that where sent,
  • Opens, and clicks information,
  • Filled in surveys
  • etc.

If the data are not yet available, this returns in a 404.

PHP example

// required scripts
require_once('copernica_rest_api.php');

// insert your access token here
$api = new CopernicaRestAPI("your-access-token", 3);

// get the status of the data request
$api->get("datarequest/{$requestID}/data")

This example requires the REST API class.

More information