REST API v1: GET logfiles names

Warning: You are viewing the documentation for the old REST API. We recommend using our latest version of the REST API.

Copernica keeps logfiles about several things such as clicks, opens, errors, accepted messages, etc. These logfiles can be downloaded with the API. By sending an HTTP GET request to the following URL you will get a list of all log files for a particular date.

https://api.copernica.com/v1/logfiles/$date?access_token=xxxx

where $date is the date for which you want to see the logfiles.

Returned fields

This method returns a JSON array of logfile name. The types of logfiles are provided in the table below.

prefix type of information
cdm-attempts General info about mails sent with Marketing Suite (MS)
cdm-abuse Info about mails sent via MS that triggered a notification
cdm-click Info about clicks generated from mails sent with MS
cdm-delivery Info about delivered mails sent with MS
cdm-error Info about mails sent with MS that triggered an error
cdm-impression Info about impressions from mails sent with MS
cdm-retry Info about mails sent via MS for which we retry a delivery
cdm-unsubscribe Info about mails sent via MS that triggered an unsubscribe
pom-attempts General info about mails sent with Publisher
pom-abuses Info about mails sent via Publisher that triggered an notification
pom-clicks info about clicks generated from mails sent with Publisher
pom-deliveries Info about delivered mails sent with Publisher
pom-errors Info about failed mails sent with Publisher
pom-impressions Info about impressions from mails sent with Publisher
pom-retries Info about mails sent via Publisher for which we retry a delivery
pom-unsubscribes Info about mails sent via Publisher that triggered an unsubscribe

To download a log file please see the links under "More information".

PHP Example

The following PHP script demonstrates how to use the API method:

// dependencies
require_once('copernica_rest_api.php');

// change this into your access token
$api = new CopernicaRestApi("your-access-token");

// do the call, and print result
print_r($api->get("logfiles/2017-02-12"));

The example above requires the CopernicaRestApi class.

More information