REST Email Marketing API Documentation

Referrals — list

List the referrals for one specific referrer or all those in the database.

HTTP VERB

Get

URL

/API/Rest/Referrals

ARGUMENTS

(optional)emailAddress

Required permission

ViewMember

ERRORS

No Permission
Database error
Unknown error

RETURNS

The return results depend on whether the emailAddress is provided or not. If it is, the results shouldn't be too large, so the data is returned inline. If no emailAddress is provided, the results could be large, so the large result set format is used. The inline format look like this:



EXAMPLE

Get the referrals for a specific recipient:

[{"emailAddress":"j.smith@aol.com","requestDate":"2019-07-03T16:49:37.56","enrollDate":null}, {"emailAddress":"Fred.jones@aol.com","requestDate":"2019-07-03T16:53:25.293","enrollDate":null}, {"emailAddress":"Lisa.Baker@aol.com","requestDate":"2019-07-03T17:03:25.147","enrollDate":null}, {"emailAddress":"Pilot@tdn.com","requestDate":"2019-07-03T17:03:25.15","enrollDate":null}, {"emailAddress":"Daeshona.hill@doctors.com","requestDate":"2019-07-03T17:03:25.15","enrollDate":null}]

Here is the data when no email address is provided. The columns are: Email address, enroll date, request date.
{"downloadGuid":"a34b7fc5-74e6-4d4e-b078-c3070c108498","totalRows":5,"userData":[ ["j.smith@aol.com","","7/3/2019 11:49 PM"], ["Fred.jones@aol.com","","7/3/2019 11:53 PM"], ["Lisa.Baker@aol.com","","7/4/2019 12:03 AM"], ["Pilot@tdn.com","","7/4/2019 12:03 AM"], ["Daeshona.hill@doctors.com","","7/4/2019 12:03 AM"]]}
using System;
using System.Net.Http;

string url = "https://example.com/API/Rest/Referrals?accountName=acme&login=ApiUser&emailAddress=joe@example.com";

// Reuse HttpClient for multiple requests in production code.
using (var client = new HttpClient())
using (var request = new HttpRequestMessage(HttpMethod.Get, url))
{
	request.Headers.Add("Password", "YOUR_PASSWORD");

	using (HttpResponseMessage response = await client.SendAsync(request))
	{
		response.EnsureSuccessStatusCode();
		Console.WriteLine(await response.Content.ReadAsStringAsync());
	}
}
			
# encoding: utf-8
require 'rest-client'
require 'json'

url = 'https://example.com/API/Rest/Referrals?accountName=acme&login=ApiUser&emailAddress=joe@example.com'
response = RestClient.get(url, {:Password => "YOUR_PASSWORD"})
puts response
						
import requests

url = "https://example.com/API/Rest/Referrals?accountName=acme&login=ApiUser&emailAddress=joe@example.com"
headers = {'password':'YOUR_PASSWORD'}
resp = requests.get(url, headers=headers)
if resp.status_code == 200:
	print(resp.text)

https://example.com/API/Rest/Referrals?accountName=acme&login=ApiUser&password=YOUR_PASSWORD&emailAddress=joe@example.com