អានកំណត់ហេតុដៃគូរបស់អ្នក, ការណែនាំ, គណៈកម្មការនិងការទូទាត់, ផ្លាស់ប្តូរការកំណត់ការទូទាត់របស់អ្នកនិងស្នើសុំការទូទាត់. ចំណុចបញ្ចប់ទាំងអស់ធ្វើសកម្មភាពនៅលើគណនីដៃគូដែលកាន់តួអក្សរ API ។
បង្កើត សញ្ញា មួយ ក្នុង គណនី, បន្ទាប់មក អ្នក អភិវឌ្ឍន៍, និង ផ្តល់ ឱ្យ វា វិសាលភាព ចំណុច បញ្ចប់ ខាងក្រោម ត្រូវការ. គណនី ដែល មិន ជា ដៃគូ ទទួល 404 ពី ចំណុច បញ្ចប់ ទាំងអស់ លើកលែង តែ ការ ចុះ ឈ្មោះ.
| ចំណុចបញ្ចប់ | វិសាលភាព | សេចក្ដីពិពណ៌នា |
|---|---|---|
GET /affiliates/me/ | affiliates:read | កំណត់ត្រាដៃគូរបស់អ្នក, សន្សំនិងតំណយោង |
GET /affiliates/referrals/ | affiliates:read | គណនីដែលបានចុះឈ្មោះតាមរយៈតំណរបស់អ្នក |
GET /affiliates/commissions/ | affiliates:read | គណៈកម្មការបានទទួលនៅលើការទូទាត់របស់អ្នកដែលបានណែនាំ |
GET /affiliates/payouts/ | affiliates:read | សំណើការទូទាត់ប្រាក់ និងការបង់ប្រាក់ |
PATCH /affiliates/settings/ | affiliates:update | ផ្លាស់ប្តូរវិធីសាស្រ្តទូទាត់, អ៊ីម៉ែល PayPal, គណនី Stripe ឬចំនួនទឹកប្រាក់ទូទាត់អប្បបរមា min_payout_amount ≥ 10.00 |
POST /affiliates/request-payout/ | affiliates:create | ស្នើសុំការទូទាត់ប្រាក់នៃសល់របស់អ្នកនៅពេលវាដល់អប្បបរមារបស់អ្នក។ មានតែការទូទាត់ប្រាក់មួយប៉ុណ្ណោះដែលរង់ចាំនៅពេលមួយ។ |
POST /affiliates/signup/ | affiliates:create | ចូលរួមកម្មវិធីដៃគូ។ ផ្ញើ payout_method (PayPal ឬ stripe) ជាមួយ paypal_email ឬ stripe_account_id ។ |
ការយោង, គណៈកម្មការ និង បញ្ជី ប្រាក់ រង្វាន់ ត្រូវ បាន ទំព័រ: ចម្លើយ នីមួយៗ មាន ចំនួន, បន្ទាប់, មុន និង លទ្ធផល. ប្រើ ទំព័រ ដើម្បី ផ្លាស់ ប្តូ រ តាមរយៈ ពួក គេ និង page_size ដើម្បី ផ្លាស់ ប្តូ រ ចំនួន ធាតុ ទំព័រ នីមួយៗ កាន់. តម្លៃ ប្រាក់ ត្រូវ បាន ត្រឡប់ ជា ខ្សែអក្សរ ដប់ ខ្ទង់. 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"
}
| វាល | ប្រភេទ | សេចក្ដីពិពណ៌នា |
|---|---|---|
status | string | រង់ចាំ, សកម្ម, ផ្អាកឬបញ្ចប់. មានតែសមាជិកសកម្មអាចស្នើសុំការទូទាត់ប្រាក់. |
commission_rate | decimal string | គណៈកម្មការជាភាគរយ, មិនប្រភាគ 20.00 = 20% |
cookie_days | integer | ចំនួនថ្ងៃដែលបានចងចាំការចុចលើតំណរបស់អ្នក |
balance | decimal string | រកបានហើយមិនទាន់បានបង់នៅឡើយទេ |
total_earned / total_paid | decimal string | ប្រាក់រង្វាន់ជីវិតដែលបានរកបាន និងចំនួនប្រាក់ដែលបានបង់ចេញ |
ធាតុនីមួយៗក្នុងលទ្ធផលមានវាលទាំងនេះ ៖
| ចំណុចបញ្ចប់ | វាល |
|---|---|
/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 |
ស្ថានភាពនៃការណែនាំគឺកំពុងរង់ចាំ, សកម្មឬបានបោះបង់ចោល. ស្ថានភាពគណៈកម្មការគឺកំពុងរង់ចាំ, បានអនុម័ត, បានបង់ឬបានបោះបង់ចោល. ស្ថានភាពការទូទាត់គឺកំពុងរង់ចាំ, ដំណើរការ, បានបញ្ចប់ឬបរាជ័យ.
{
"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 | ជោគជ័យ |
| 403 | បាត់ ឬមិនត្រឹមត្រូវ API token ឬ token ខ្វះសិទ្ធិដែលត្រូវការ |
| 404 | គណនីនេះមិនមែនជាគណនីដែលបានភ្ជាប់នៅឡើយទេ |
ម៉ាស៊ីនអានបានបញ្ជាក់សម្រាប់ចំណុចបញ្ចប់នីមួយៗរួមទាំងនេះគឺនៅខាងក្រោម ហើយអ្នកអាចរកមើលវាដោយអន្តរកម្មនៅលើទំព័រយោង API ។
https://admin.vps.org/api/v1/schema/
ដែនកំណត់អត្រាក្នុងមួយគណនី ៖ 1000 / hour