REST API v4: GET hyperlink extensions (drag and drop template)

This method can be used if you want to retrieve the hyperlink extensions of Marketing Suite (drag and drop) mailings. By sending a GET request to the following URL, you can fetch the hyperlink extensions:

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

{
    "data": [
    {
         "parameter": "utm_source",
         "value": "copernica",
         "type": "setparameter",
         "last": false,
         "unique": false,
         "checks": []
    },
    {
         "parameter": "utm_medium",
         "value": "email",
         "type": "setparameter",
         "last": false,
         "unique": false,
         "checks": []
    },
    {
         "parameter": "utm_campaign",
         "value": "test_message",
         "type": "setparameter",
         "last": false,
         "unique": false,
         "checks": []
    },
    {
         "parameter": "utm_content",
         "value": "button",
         "type": "setparameter",
         "last": false,
         "unique": false,
         "checks": []
    },
    {
         "parameter": "utm_content",
         "value": "link",
         "type": "setparameter",
         "last": false,
         "unique": false,
         "checks": [
         {
             "type": "domain",
             "value": "copernica.com",
             "comparison": "contains"
         }]
    }]
}

PHP example

The following PHP script calls this API method:

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

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

// do the call, and print result
print_r($api->get("draganddrop/emailing/$id/hyperlinkextensions", $parameters));

The example above requires the CopernicaRestApi class.

More information