Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time

REST API: GET MS destinations (subprofile)

You can retrieve the Marketing Suite destinations for a subprofile by sending an HTTP GET call to the following URL:

https://api.copernica.com/v3/subprofile/$id/ms/destinations?access_token=xxxx

Where the $id should be replaced with the ID of the subprofile. This method also support the use of the fields parameter for the timestampsent field.

Returned fields

The method returns a JSON object with several destinations. For each destination the following information is available:

  • ID: The ID of the destination.
  • timestampsent: The timestamp on which the mailing was sent to this recipient.
  • profile: The ID of the profile of the destination.
  • subprofile: The ID of the subprofile of the destination.
  • mailing: The ID of the mailing.

PHP example

This script demonstrates how to use this API method:

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

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

// execute the call
print_r($api->get("subprofile/{$subprofileID}/ms/destinations/"));

This example requires the REST API class.

More information