VPS.org API

@ action

Affiliates API

Read your affiliate record, referrals, commissions and payouts, change your payout settings and request a payout. Every endpoint acts on the affiliate account that owns the API token.

Ƙarshen maki 7 endpoints
Hanyar Tushe /api/v1/affiliates

Endpoints and Token Scopes

Create a token in Account, then Developers, and give it the scopes the endpoints below need. An account that is not an affiliate gets 404 from every endpoint except signup.

Endpoint Scope @ action
GET /affiliates/me/affiliates:readYour affiliate record, balance and referral link
GET /affiliates/referrals/affiliates:readAsusun da suka yi rajista ta hanyar alaƙarka
GET /affiliates/commissions/affiliates:readCommissions earned on your referrals' payments
GET /affiliates/payouts/affiliates:readPayouts requested and paid
PATCH /affiliates/settings/affiliates:updateCanja hanyar biyan kuɗi, imel na PayPal, asusun Stripe ko adadin biyan kuɗi mafi ƙaranci min_payout_amount ≥ 10.00
POST /affiliates/request-payout/affiliates:createRequest a payout of your balance once it reaches your minimum. Only one pending payout at a time.
POST /affiliates/signup/affiliates:createJoin the affiliate program. Send payout_method (paypal or stripe) with paypal_email or stripe_account_id.

An yi wa jerin shawarwarin, kwamiti da biyan kuɗi shafi: kowace amsa tana da adadin, gaba, baya da sakamakon. Yi amfani da shafi don motsa ta cikinsu da page_size don canza yawan abubuwan da kowane shafi ke da su. An mayar da kimar kudi kamar wata maƙala ta ɗari. page_size: 25 (default), 100 (max)

SAMU /api/v1/affiliates/me/

Comment=Saƙonnin rubutu daga KDE

Buƙatar Misali

cURL
Python
JavaScript
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);

Misalin Amsar

{
  "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"
}

Wuraren Amsawa

@ action Nau'i @ action
statusstringpending, active, suspended or terminated. Only active affiliates can request payouts.
commission_ratedecimal string%s: An kasa ganewa 20.00 = 20%
cookie_daysintegerDa yawa na kwanakin da za'a tuna da danna kan alaƙarka
balancedecimal stringEarned and not yet paid out
total_earned / total_paiddecimal stringAn samu wani kuɗaɗen shiga na rayuwa kuma an biya kuɗaɗen shiga na rayuwa

Referrals, Commissions and Payouts

Each item in results has these fields:

Endpoint @ action
/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

%s: An dakatar da halin da ake ciki na canzawa, mai aiki ko an dakatar da shi. An dakatar da halin da ake ciki na biyan kudi, an amince da shi, an biya shi ko an dakatar da shi. An dakatar da halin biyan kudi, an yi aiki da shi, an kammala shi ko an kasa.

{
  "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"
    }
  ]
}

Lambobin Matsayin Amsawa

200 Success
403 An rasa ko kuma an karya tabbacin API, ko kuma tabbacin bai da izinin da ake bukata
404 Wannan asusun bai zama mai alaƙa ba har yanzu

OpenAPI Specification

An rubuta kayan aikin da za'a iya karantawa ga kowace maɓalli na ƙarshe, ciki har da waɗannan, a ƙasa, kuma zaka iya bincika shi cikin haɗin kai a kan shafi na alamar API.

https://admin.vps.org/api/v1/schema/

Rate limit per account: 1000 / hour