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"]]}
string url = "http://example.com/api/rest/Referrals?accountName=acme&login=ApiUser&emailAddress=joe@example.com";
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://www.example.com/api/rest/Referrals?accountName=acme&login=ApiUser&emailAddress=joe@example.com'
response = RestClient.get(url, "", {:Password => "sfhdf6df5fdy"})
puts response
import requests
url = "http://www.example.com/api/rest/Referrals?accountName=acme&login=ApiUser&emailAddress=joe@example.com";
headers = {'password':'sfhdf6df5fdy'}
resp = requests.get(url, headers=headers)
if resp.status_code == 200:
print resp.text
http://www.example.com/api/rest/Referrals ?accountName=acme &login=ApiUser &password=fsdfsdfw4sef &emailAddress=joe@example.com