Get available referrals
curl --request GET \
--url https://api.firstpromoter.com/api/v2/company/referrals \
--header 'Account-ID: <account-id>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.firstpromoter.com/api/v2/company/referrals"
headers = {
"Account-ID": "<account-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Account-ID': '<account-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.firstpromoter.com/api/v2/company/referrals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.firstpromoter.com/api/v2/company/referrals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Account-ID: <account-id>",
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.firstpromoter.com/api/v2/company/referrals"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Account-ID", "<account-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.firstpromoter.com/api/v2/company/referrals")
.header("Account-ID", "<account-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firstpromoter.com/api/v2/company/referrals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Account-ID"] = '<account-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": 123,
"email": "jsmith@example.com",
"uid": "<string>",
"state": "subscribed",
"metadata": {},
"entry_source": "api",
"created_at": "2023-11-07T05:31:56Z",
"customer_since": "2023-11-07T05:31:56Z",
"promoter_campaign": {
"id": 123,
"campaign_id": 123,
"promoter_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"promoter": {
"id": 123,
"email": "jsmith@example.com",
"name": "<string>"
},
"campaign": {
"id": 123,
"name": "<string>",
"color": "<string>"
}
},
"fraud_check": "no_suspicion",
"created_by_user_email": "jsmith@example.com",
"username": "<string>",
"split_details": [
{
"promoter_campaign_id": 123,
"promoter_id": 123,
"percentage": 123
}
],
"first_name": "<string>",
"last_name": "<string>",
"website": "<string>",
"comment": "<string>",
"is_expired": true
}
]{}{
"message": "<string>",
"code": "<string>",
"errors": {}
}Referrals
Get available referrals
Get available referrals
HTTP Request
GET https://api.firstpromoter.com/api/v2/company/referralsGET
/
referrals
Get available referrals
curl --request GET \
--url https://api.firstpromoter.com/api/v2/company/referrals \
--header 'Account-ID: <account-id>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.firstpromoter.com/api/v2/company/referrals"
headers = {
"Account-ID": "<account-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Account-ID': '<account-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.firstpromoter.com/api/v2/company/referrals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.firstpromoter.com/api/v2/company/referrals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Account-ID: <account-id>",
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.firstpromoter.com/api/v2/company/referrals"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Account-ID", "<account-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.firstpromoter.com/api/v2/company/referrals")
.header("Account-ID", "<account-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firstpromoter.com/api/v2/company/referrals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Account-ID"] = '<account-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": 123,
"email": "jsmith@example.com",
"uid": "<string>",
"state": "subscribed",
"metadata": {},
"entry_source": "api",
"created_at": "2023-11-07T05:31:56Z",
"customer_since": "2023-11-07T05:31:56Z",
"promoter_campaign": {
"id": 123,
"campaign_id": 123,
"promoter_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"promoter": {
"id": 123,
"email": "jsmith@example.com",
"name": "<string>"
},
"campaign": {
"id": 123,
"name": "<string>",
"color": "<string>"
}
},
"fraud_check": "no_suspicion",
"created_by_user_email": "jsmith@example.com",
"username": "<string>",
"split_details": [
{
"promoter_campaign_id": 123,
"promoter_id": 123,
"percentage": 123
}
],
"first_name": "<string>",
"last_name": "<string>",
"website": "<string>",
"comment": "<string>",
"is_expired": true
}
]{}{
"message": "<string>",
"code": "<string>",
"errors": {}
}Authorizations
Headers
Query Parameters
Response
List of referrals
Entry source of the referral. This shows where the referral was captured from. Cookie is set if the referral was captured using the tid cookie, Coupon is for when the referral is captured via a coupon code. Manual admin is for when the referral is added manually by an admin. Manual affiliate is for when the referral is added manually by an affiliate.
Available options:
api, coupon, cookie, manual_admin, manual_affiliate Fraud check (suspicion) status of the referral. no_suspicion means the referral is clean or was manually cleared. same_ip_suspicion means the referral shares an IP with the promoter. same_promoter_email means the referral email matches the promoter email. ad_source means the referral arrived via a paid ad click.
Available options:
no_suspicion, same_ip_suspicion, same_promoter_email, ad_source