cURL
curl --request GET \
--url https://api.example.com/v1/account/referralsimport requests
url = "https://api.example.com/v1/account/referrals"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/account/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.example.com/v1/account/referrals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/v1/account/referrals"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/v1/account/referrals")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/account/referrals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"program": {
"enabled": true,
"currency": "<string>",
"inviterRewardMinor": 123,
"inviteeRewardMinor": 123,
"qualification": "<string>",
"attributionValidityDays": 123,
"inviterRewardCap": 123,
"rewardExpiryDays": 123,
"termsUrl": "<string>"
},
"code": "<string>",
"link": "<string>",
"linkAvailable": true,
"invited": 123,
"qualified": 123,
"pending": 123,
"rejected": 123,
"rewardedMinor": 123,
"reversedMinor": 123,
"rewardCount": 123,
"currency": "<string>",
"rewards": {
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "inviter",
"state": "pending",
"amountMinor": 123,
"currency": "<string>",
"grantedAt": "2023-11-07T05:31:56Z",
"reversedAt": "2023-11-07T05:31:56Z"
}
],
"nextCursor": "<string>"
},
"linkReason": "public_url_not_configured",
"remainingSlots": 123
}account
Get v1accountreferrals
The customer’s code, its shareable link, the program’s terms, and the reward history. A reversed reward is excluded from the earned total and from the cap count, because an operator reverses one when the referral turns out to be abuse and the slot it consumed should come back.
GET
/
v1
/
account
/
referrals
cURL
curl --request GET \
--url https://api.example.com/v1/account/referralsimport requests
url = "https://api.example.com/v1/account/referrals"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/account/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.example.com/v1/account/referrals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/v1/account/referrals"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/v1/account/referrals")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/account/referrals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"program": {
"enabled": true,
"currency": "<string>",
"inviterRewardMinor": 123,
"inviteeRewardMinor": 123,
"qualification": "<string>",
"attributionValidityDays": 123,
"inviterRewardCap": 123,
"rewardExpiryDays": 123,
"termsUrl": "<string>"
},
"code": "<string>",
"link": "<string>",
"linkAvailable": true,
"invited": 123,
"qualified": 123,
"pending": 123,
"rejected": 123,
"rewardedMinor": 123,
"reversedMinor": 123,
"rewardCount": 123,
"currency": "<string>",
"rewards": {
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "inviter",
"state": "pending",
"amountMinor": 123,
"currency": "<string>",
"grantedAt": "2023-11-07T05:31:56Z",
"reversedAt": "2023-11-07T05:31:56Z"
}
],
"nextCursor": "<string>"
},
"linkReason": "public_url_not_configured",
"remainingSlots": 123
}Query Parameters
Opaque keyset cursor from the previous page.
Required range:
1 <= x <= 100Response
200 - application/json
Referrals
Show child attributes
Show child attributes
Excludes reversed rewards.
Show child attributes
Show child attributes
Why no link could be built. The code is still shown; a link to nowhere is not.
Available options:
public_url_not_configured, no_code