Bala li-record tsa hau tsa li-affiliate, li-referrals, li-commissions le li-payments, fetola li-setting tsa hau tsa ho lefa le ho kopa ho lefa. Li-endpoint tsohle li sebetsa ho ak'haonte ea li-affiliate e nang le token ea API.
E etsa token ka Account, ka mor'a moo Developers,'me u mo fa li-scopes tse ka tlase ho hlokang. Akaunti e seng e le mokhatlo e fumana 404 ho tloha ho e mong le e mong o ka tlase ho ho ngolisa.
| Sebopeho sa leqephe | Bophara | Bophara |
|---|---|---|
GET /affiliates/me/ | affiliates:read | Li-record tsa hau tsa li-affiliate, li-balance le li-link tsa ho ngolisa |
GET /affiliates/referrals/ | affiliates:read | Li-account tse neng li ngolisoa ka ho sebelisa sehokela sa hau |
GET /affiliates/commissions/ | affiliates:read | Lichelete tse fumanehang ka lichelete tsa hau tsa ho tlisetsa |
GET /affiliates/payouts/ | affiliates:read | Lichelete li hlokahale'me li lefisoa |
PATCH /affiliates/settings/ | affiliates:update | Change payout method, PayPal email, Stripe account or minimum payout amount min_payout_amount ≥ 10.00 |
POST /affiliates/request-payout/ | affiliates:create | Reka ho lefa ka lichelete tsa hau ha li fihla ho tlase. Lefa leng feela le le sa lebaleheng ka nako. |
POST /affiliates/signup/ | affiliates:create | E-na le ho etsa kopo ea ho fumana li-affiliates. E-na le ho etsa kopo ea ho fumana li-affiliates. |
Li-referrals, li-commissions le li-payments li tlalehiloe ka li-page: karabo e ngoe le e ngoe e na le palo, e latelang, e fetileng le litlamorao. Sebelisa leqephe ho tsamaea ka tsona le page_size ho fetola hore na leqephe le leng leng le na le lintho tse kae. Litheko tsa chelete li khutlisoa e le li-strings tsa decimal. page_size: 25 (default), 100 (max)
curl -X GET "https://admin.vps.org/api/v1/affiliates/me/" \
-H "Authorization: Bearer YOUR_API_TOKEN"
import requests
headers = {"Authorization": "Bearer YOUR_API_TOKEN"}
base = "https://admin.vps.org/api/v1/affiliates"
me = requests.get(f"{base}/me/", headers=headers).json()
print(me["balance"], me["total_earned"])
# Walk every page of commissions
url = f"{base}/commissions/?page_size=100"
while url:
page = requests.get(url, headers=headers).json()
for c in page["results"]:
print(c["created_at"], c["amount"], c["status"])
url = page["next"]
const res = await fetch('https://admin.vps.org/api/v1/affiliates/me/', {
headers: { 'Authorization': 'Bearer YOUR_API_TOKEN' }
});
const me = await res.json();
console.log(me.balance, me.referral_url);
{
"uuid": "9f2c4e7a1b3d4c5e8f6a7b8c9d0e1f2a",
"user_email": "you@example.com",
"referral_code": "AB12CD34",
"referral_url": "https://vps.org/?ref=AB12CD34",
"status": "active",
"commission_rate": "20.00",
"cookie_days": 90,
"payout_method": "paypal",
"paypal_email": "you@example.com",
"stripe_account_id": null,
"min_payout_amount": "10.00",
"balance": "42.50",
"total_earned": "142.50",
"total_paid": "100.00",
"created_at": "2026-09-01T12:00:00Z"
}
| Setereke | Mofuta | Bophara |
|---|---|---|
status | string | e sa tsoa etsoa, e sebetsang, e sa tsoa etsoa kapa e fela. |
commission_rate | decimal string | Commission e le karoloana, eseng karoloana 20.00 = 20% |
cookie_days | integer | Na ho tobetsa konopo ea hau ho hopola letsatsi le kae |
balance | decimal string | E fumaneha'me ha e fihle |
total_earned / total_paid | decimal string | Lichelete tsa bophelo li fumaneha le chelete ea bophelo e lefisoa |
Mofuta o mong le o mong oa liphetho o na le libaka tsena:
| Sebopeho sa leqephe | Setereke |
|---|---|
/affiliates/referrals/ | uuid, referred_email, status, created_at |
/affiliates/commissions/ | uuid, referred_email, amount, rate, original_amount, status, created_at |
/affiliates/payouts/ | uuid, amount, method, status, created_at, processed_at, error_message |
Ho se be le boemo ba ho tlisetsa ho e-na le ho e-na le, ho sebetsa kapa ho hlakoloa. Ho se be le boemo ba ho tlisetsa ho e-na le ho e-na le, ho amoheloa, ho lefa kapa ho hlakoloa. Ho se be le boemo ba ho lefa ho e-na le ho e-na le, ho sebetsa, ho phetheloa kapa ho hloleha.
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"uuid": "3b1e9c0d2a4f4e6b8c7d5e4f3a2b1c0d",
"referred_email": "customer@example.com",
"amount": "2.00",
"rate": "20.00",
"original_amount": "10.00",
"status": "approved",
"created_at": "2026-09-20T08:15:00Z"
}
]
}
| 200 | Bophelo bo botle |
| 403 | Token ea API e sa nepahalang kapa e sa fumaneheng, kapa token e na le litokelo tse hlokahalang |
| 404 | Akaunti ena ha e le teng |
Li-spec tsa mochini o balanang bakeng sa li-endpoint tsohle, ho kenyeletsoa le tsena, li ka tlase,'me u ka li bona ka ho interactive ho leqephe la ho ngola la API.
https://admin.vps.org/api/v1/schema/
Li-account tse _ka-moholo: 1000 / hour