REST API v4: 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/v4/datarequest/$id/data
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('CopernicaRestAPI.php');
// insert your access token here
$api = new CopernicaRestAPI("your-access-token", 4);
// get the status of the data request
$api->get("datarequest/{$requestID}/data")
This example requires the REST API class.