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>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}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 paid customer
service revenue, excluding gifts and taxes. override_basis on GET /affiliates/stats
says whether your tier-2 rate applies to that revenue or to your partner’s earned
direct commission. Their full commission is unchanged and yours is paid on top.
my_override_cents is what you earned; my_override_payable_cents is the part
past the hold window. Refunds reduce earnings at the original payment’s rates.
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>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}affiliates:read.
{"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 | Paid service revenue those customers generated, excluding tax and gifts. It stays customer revenue even when your override is based on your partner’s commission. |
my_override_cents | integer | Your tier-2 commission. override_basis from GET /affiliates/stats says whether the rate applies to customer revenue or your partner’s earned direct commission. Historical terms, refunds and rounding are already included. |
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. |
override_basis: "affiliate_commission", a partner who earns $5 on a $100 paid purchase keeps that $5. Your 15% share is $0.75, not $15. Gift and promotional credits earn neither commission, and taxes are excluded. `downline_revenue_cents` still reports the $100 customer revenue; use my_override_cents for your actual earnings rather than multiplying the revenue column yourself.
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 | AFFILIATES_QUERY_INVALID | A query parameter was sent (company_id included — the workspace is always the key’s own). This read takes none, and the message names it. |
| 403 | INSUFFICIENT_SCOPE | API key lacks affiliates:read. |
| 401 | MISSING_KEY / INVALID_KEY / EXPIRED_KEY | No key, an unknown or revoked key, or an expired one. |
| 403 | AFFILIATE_FORBIDDEN | Affiliate data is not readable for this workspace. |
| 429 | RATE_LIMIT | 60 requests/minute exceeded. |
| 500 | INTERNAL_ERROR | The figures could not be computed. Safe to retry. |
Authorizations
Your Yappr API key (e.g. ypr_live_...). Generate one in the dashboard under Settings → API Keys. No key is 401 MISSING_KEY; a key that is not one of ours, or is revoked, is 401 INVALID_KEY; an expired one is 401 EXPIRED_KEY. A valid key without the scope an operation needs is 403 INSUFFICIENT_SCOPE on every operation, and the message names the scope. Every response, a 401 included, carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset: the budget is 60 requests a minute per API key. Every 429, whatever its code, carries Retry-After (whole seconds, never zero): the per-key budget's RATE_LIMIT asks for what is left of the minute, a route's daily cap (RATE_LIMITED) for the time until that cap resets. All four headers are listed in Access-Control-Expose-Headers, so a browser can read them. A path the API does not serve (an unknown sub-path, an id left empty) is 404 ROUTE_NOT_FOUND, and a method a served path does not take is 405 METHOD_NOT_ALLOWED with an Allow header; both are answered before any scope check, and nothing is read or changed. A trailing slash is ignored where it cannot be an id left empty (POST /calls/ is POST /calls) and refused where it can (GET /calls/). A doubled slash inside a path is merged into one before the request reaches the API (GET //calls is GET /calls).