REST API v4: GET snapshot (drag and drop mailing)

You can retrieve a snapshot of a drag and drop mailing by sending an HTTP GET request to the following URL:

https://api.copernica.com/v4/draganddrop/emailing/$id/snapshot

Where the $id should be replaced with the ID of the mailing.

Returned fields

The data field of returned JSON object contains the snapshot information. The following fields are available:

  • template: The ID of the template used for the mailing.
  • name: The name of the snapshot.
  • from_address: The 'from address' from the mailing.
  • subject: The subject of the mailing.

JSON example

The JSON for the snapshot might look something like this:

{  
   "template":"58",
   "name":"New emailing",
   "from_address":"\"Test\" <test@copernica.com>",
   "subject":"Title!"
}

PHP example

This script demonstrates how to use this API method:

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

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

// execute the call
print_r($api->get("draganddrop/emailing/{$emailingID}/snapshot/"));

This example requires the REST API class.

More information