REST Email Marketing API Documentation

DOCUMENTS — COMPLAINTS

List the email addresses that have complained to their ISP about your mail.

HTTP VERB

Get

URL

/API/Rest/Documents/Complaints

ARGUMENTS

(Optional) documentName
(Optiona) startTime
(Optional) endTime

Required permission

StandardReports

ERRORS

No Permission
Invalid document name
Database error
Unknown error

RETURNS

A list of email addresses, in the format for large data sets.


{"downloadGuid":"9f3566f3-683c-4fda-861a-0a4a1e7c59b3","totalRows":3,"userData":[["joe@comcast.net"],["sam@yahoo.com"],["abe@COMCAST.NET"]]}

EXAMPLE

Retrieve the complaints registered between two dates.

string url = "http://example.com/api/rest/Complaints?accountName=acme&login=ApiUser&startTime=1/1/2018&endTime=6/1/2018";

try
{
	System.Net.HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
	request.Headers.Add("Password", "34teh6i6j565ydw4h");
	using (System.Net.WebResponse response = request.GetResponse())
		using (Stream responseStream = response.GetResponseStream())
			using (StreamReader reader = new StreamReader(responseStream, Encoding.UTF8))
				System.Console.WriteLine(reader.ReadToEnd());
}
catch (System.Net.WebException ex)
{
	System.Diagnostics.Debug.Fail(ex.Message);
}
							
# encoding: utf-8
require 'rest-client'
require 'json'

url = 'http://example.com/api/rest/Documents/Complaints?accountName=acme&login=ApiUser&startTime=1/1/2018&endTime=6/1/2018'
response = RestClient.get(url, "", {:Password => "sfhdf6df5fdy"})
puts response
						
import requests

url = "http://www.example.com/api/rest/Documents/Complaints?accountName=acme&login=ApiUser&startTime=1/1/2018&endTime=6/1/2018";
headers = {'password':'sfhdf6df5fdy'}
resp = requests.get(url, headers=headers)
if resp.status_code == 200:
	print resp.text
						

http://example.com/api/rest/Documents/Complaints?accountName=acme &login=ApiUser &password=sdgf343tfer &startTime=1/1/2018 &endTime=6/1/2018

Share this: