List sub-affiliates
curl --request GET \
--url https://api.goyappr.com/affiliates/downline \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/affiliates/downline"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.goyappr.com/affiliates/downline', 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.goyappr.com/affiliates/downline",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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.goyappr.com/affiliates/downline"
req, _ := http.NewRequest("GET", url, nil)
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.goyappr.com/affiliates/downline")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/affiliates/downline")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"ref_code": "<string>",
"customers": 123,
"downline_revenue_cents": 123,
"my_override_cents": 123,
"my_override_payable_cents": 123,
"my_direct_cents": 123
}
]
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Affiliates
List sub-affiliates
The partners enrolled beneath you, and the tier-2 override you have earned
through each. Driven from the referral graph rather than from revenue, so a
partner enrolled yesterday with no customers yet is a row of zeros rather
than a missing row. Required scope affiliates:read.
Enrolment is an explicit act by Yappr — a customer who happens to share their own referral link never appears here, and their name and revenue are never disclosed to you. Most workspaces get an empty list.
All amounts are integer US cents. downline_revenue_cents is the revenue
base, not your commission; my_override_cents is what you earned on it, and
my_override_payable_cents is the part past the hold window.
GET
/
affiliates
/
downline
List sub-affiliates
curl --request GET \
--url https://api.goyappr.com/affiliates/downline \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/affiliates/downline"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.goyappr.com/affiliates/downline', 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.goyappr.com/affiliates/downline",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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.goyappr.com/affiliates/downline"
req, _ := http.NewRequest("GET", url, nil)
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.goyappr.com/affiliates/downline")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/affiliates/downline")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"ref_code": "<string>",
"customers": 123,
"downline_revenue_cents": 123,
"my_override_cents": 123,
"my_override_payable_cents": 123,
"my_direct_cents": 123
}
]
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}The partners enrolled beneath you, and the second-tier override you have earned through each of them.
Required scope:
Your override does not come out of your sub-affiliate’s commission. They earn their own full rate on their own customers; yours is paid on top by Yappr.
The second row is a partner enrolled recently who has not referred anyone yet. That is the expected shape, not an empty result.
affiliates:read.
Most workspaces get
{"data": []} here. Sub-affiliates are part of a partner arrangement, not a self-serve feature — see Who appears here.Scoping
LikeGET /affiliates/stats, this endpoint always reports on the workspace that issued the API key. There is no company id parameter anywhere in the request, and supplying company_id returns 400.
There are no query parameters and no request body.
Who appears here
A row exists only for a partner Yappr has explicitly enrolled beneath you. Two consequences worth being clear about:- A customer who happens to share their own referral link does not become your sub-affiliate, does not appear in this list, and their customers’ revenue is never disclosed to you.
- A partner enrolled yesterday who has referred nobody yet does appear — as a row of zeros. The list is built from the referral graph, not from revenue, so “enrolled, nothing yet” is a visible state rather than an absent one. Do not treat a zero row as a bug or filter it out.
Response fields
Every row is one enrolled sub-affiliate. All amounts are integer US cents — divide by 100 for dollars.| Field | Type | Meaning |
|---|---|---|
company_id | uuid | The sub-affiliate’s workspace. |
name | string | Their company name. |
ref_code | string | Their own referral code — the code their customers signed up with. |
customers | integer | Paying customers they referred that generate an override for you. |
downline_revenue_cents | integer | Billed revenue those customers generated. This is the base, not your commission. |
my_override_cents | integer | Your tier-2 commission on downline_revenue_cents, at override_rate_pct from GET /affiliates/stats. |
my_override_payable_cents | integer | The part of my_override_cents that has aged past hold_days and is claimable now. |
my_direct_cents | integer | Your tier-1 commission on this partner’s own spend with Yappr. They are your direct referral as well as your recruiter, and this column is that side of the relationship. |
my_override_cents and my_override_payable_cents differ for exactly the reason described under “Earned vs payable” on Affiliate stats — recent revenue is still inside the hold window and is not yet claimable.
Summing my_override_cents across every row reconciles to summary.override_earned_cents on GET /affiliates/stats, and summing my_direct_cents gives the part of summary.direct_earned_cents that came from your sub-affiliates’ own spend rather than from your ordinary customers.
Example request
curl "https://api.goyappr.com/affiliates/downline" \
-H "Authorization: Bearer $YAPPR_API_KEY"
Example response
{
"data": [
{
"company_id": "3f2a91c4-7d18-4e26-b053-9c1a5e8f0021",
"name": "Bright Harbor Media",
"ref_code": "EF56GH78",
"customers": 1,
"downline_revenue_cents": 40000,
"my_override_cents": 1000,
"my_override_payable_cents": 0,
"my_direct_cents": 1200
},
{
"company_id": "a25e1162-3c4d-4f88-9b01-1d5e7c2a0004",
"name": "Meridian Growth Studio",
"ref_code": "7C13B0AE",
"customers": 0,
"downline_revenue_cents": 0,
"my_override_cents": 0,
"my_override_payable_cents": 0,
"my_direct_cents": 0
}
]
}
Errors
| HTTP | Code | When |
|---|---|---|
| 400 | — | A company_id parameter was supplied. |
| 401 | INSUFFICIENT_SCOPE | API key lacks affiliates:read. |
| 401 | INVALID_KEY | Key not found, revoked, or expired. |
| 403 | AFFILIATE_FORBIDDEN | Affiliate data is not readable for this workspace. |
| 429 | RATE_LIMIT | 60 requests/minute exceeded. |
| 500 | — | The figures could not be computed. Safe to retry. |