REST API: GET destinations (MS mailing)

You can retrieve the destinations for an emailing by sending an HTTP GET call to the following URL:$id/destinations

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

Optional parameters

  • Unsubscribed: Set to 'true' for retrieving the unsubscribed destinations.

Returned fields

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

  • ID: Unique ID of the destination.
  • mailing: ID of the mailing sent to this destination.
  • timestampsent: Timestamp of sending to the destination.
  • profile: Profile ID of the destination.
  • subprofile: Subprofile ID of the destination.

JSON example

The destination might look something like this:

   "timestampsent":"2015-06-08 13:53:45",

PHP example

This script demonstrates how to use this API method:

// dependencies

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

// execute the call

This example requires the REST API class.

More information