VPS.org API

Uxwebhu lwe-REST API

I-API ye-Affiliates

Funda irekhodi lakho lothungelwano, izikhokelo, iinkokheli kunye nemali ehlawulwayo, tshintsha imimiselo yakho yothungelwano kwaye ucele imali ehlawulwayo. Indawo nganye egqithisileyo isebenza kwi-akhawunti yothungelwano ephethe i-API token.

Iindawo zokugqibela 7 endpoints
Indlela Esisiseko /api/v1/affiliates

Iindawo eziphelelayo neToken Scopes

Dala i-token kwi-Akhawunti, emva koko Ababhekisi phambili, kwaye unikezele ngeenjongo ezifunekayo kwizinto ezigqityiweyo ezantsi. I-akhawunti engasebenziyo ifumana i-404 kwizinto ezigqityiweyo zonke ngaphandle kobhaliso.

Incopho yesiphelo Injongo Inkcazelo
GET /affiliates/me/affiliates:readIinkcukacha zakho zobulungu, i-saldo kunye nekhonkco lokubhekisa
GET /affiliates/referrals/affiliates:readIi-akhawunti ezibhaliswe nge-imeyili
GET /affiliates/commissions/affiliates:readIikomishoni ezifunyanwa kwiinkxaso-mali zakho
GET /affiliates/payouts/affiliates:readIimali ezifunwa
PATCH /affiliates/settings/affiliates:updateTshintsha indlela yokufumana ityala, i-imeyili ye-PayPal, i-akhawunti ye-Stripe okanye umyinge wenzala omncinane min_payout_amount ≥ 10.00
POST /affiliates/request-payout/affiliates:createIsicelo sokukhutshelwa komyinge wenzala xa ifike kwinqanaba eliphantsi. Kufuneka kubekho ukutshatyalaliswa okuqhubekayo olunye kuphela ngexesha.
POST /affiliates/signup/affiliates:createUbhalise kwinkqubo yothungelwano. Thumela i-payment_method (i-paypal okanye i-stripe) nge-paypal_email okanye i-stripe_account_id.

The referrals, commissions and payouts lists are paginated: each response has count, next, previous and results. Use page to move through them and page_size to change how many items each page holds. Money values are returned as decimal strings. page_size: 25 (default), 100 (max)

FUMANA /api/v1/affiliates/me/

Fumana i-Record yakho ye-Affiliate

Isicelo somzekelo

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);

Impendulo yoMzekelo

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

IiNdawo zeMpendulo

Iindawo Uhlobo Inkcazelo
statusstringi-ATM, i-ATM ekwi-Intanethi, i-ATM ekwi-Intanethi, i-ATM ekwi-Intanethi,
commission_ratedecimal stringIKomishoni njengeepesenti, hayi njengenxalenye 20.00 = 20%
cookie_daysintegerIintsuku ezili-12 zokunqakraza kwikhonkco lakho ligcinwa
balancedecimal stringIimali ezifunyenwe
total_earned / total_paiddecimal stringI-commission efunyenwe ngexesha lokuphilayo kunye ne-

IiNkqubo zoPhuhliso lweNkqubo

Izinto nganye kwiziphumo zineendawo ezilandelayo:

Incopho yesiphelo Iindawo
/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

Referral status is pending, active or cancelled. Commission status is pending, approved, paid or cancelled. Payout status is pending, processing, completed or failed.

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

Iikhowudi zeMeko yokuphendula

200 Uphumelele
403 I-API token elahlekile okanye engasebenziyo, okanye i-token ayinazimvumelwano ezifunekayo
404 Le akhawunti ayikho ehambelanayo

Ukhankaso lwe OpenAPI

I-machine-readable spec yendawo nganye yesiphelo, kubandakanya ezi, iphantsi, kwaye ungakhangela ngokunxibelelana kwiphepha lokubhekisa kwi-API.

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

Umda wexabiso kwi akhawunti nganye: 1000 / hour