あなたのアフィリエイト記録、推薦、委託、支払いを読み、支払い設定を変更し、支払いを要求します。すべてのエンドポイントは、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 | 関連プログラムに参加します。paypal_emailまたは stripe_account_idとpayment_method (paypalまたは stripe)を送信します。 |
推薦、委託、支払いリストはページ化されます。各応答には数、次、前、結果があります。 page を使って移動し、 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 トークンが無効か欠けています。または、トークンには必要な権限がありません。 |
| 404 | このアカウントはまだアフィリエイトではありません |
これらを含む各エンドポイントの機械読み取り可能な仕様は以下に示されており、API参照ページで対話的にブラウズすることができる。
https://admin.vps.org/api/v1/schema/
アカウントごとの速度制限: 1000 / hour