API v2 ドキュメント
自分のパネルやスクリプトから、サービス一覧の取得、注文、ステータスの確認ができます。形式は多くのSMMパネルと同じです。
基本情報
- アドレス
https://panelclo.com/api/v2- メソッド
POST- 形式
- フォームの値でもJSONでも受け付けます。応答は常にJSONです。
- キー
- すべてのリクエストで、key という項目にAPIキーを入れます。
- 制限
- キー1つにつき1分300回まで。10分間に誤ったキーが30回送られると、そのネットワークはしばらく止められます。
キーはダッシュボードのAPIページにあります。 APIキーを開く
サービス一覧action=services
全サービスの番号、名前、カテゴリ、1,000あたりの料金(rate)、最小と最大の注文数、リフィルとキャンセルの可否を返します。
| 項目 | 意味 |
|---|---|
key | APIキー |
action | services |
リクエスト
curl -X POST https://panelclo.com/api/v2 \
-d key=YOUR_API_KEY \
-d action=servicesレスポンス
[
{
"service": 159,
"name": "YouTube Views, Quick",
"type": "Default",
"category": "YouTube Views",
"rate": "0.4290",
"min": 500,
"max": 1000000,
"refill": false,
"cancel": true
}
]新規注文action=add
注文を作成し、残高から金額を引きます。新しい注文番号を返します。
| 項目 | 意味 |
|---|---|
key | APIキー |
action | add |
service | サービス番号 |
link | アカウントか投稿の公開リンク |
quantity | サービスの範囲内の数量 |
リクエスト
curl -X POST https://panelclo.com/api/v2 \
-d key=YOUR_API_KEY \
-d action=add \
-d service=159 \
-d link=https://www.youtube.com/watch?v=aBcD1234EfG \
-d quantity=1000レスポンス
{
"order": "48213907"
}注文のステータスaction=status
1件の注文の金額、開始時の数、ステータス、残りの数を返します。ステータスはPending、In progress、Completed、Partial、Canceledのいずれかです。
| 項目 | 意味 |
|---|---|
key | APIキー |
action | status |
order | 注文番号 |
リクエスト
curl -X POST https://panelclo.com/api/v2 \
-d key=YOUR_API_KEY \
-d action=status \
-d order=48213907レスポンス
{
"charge": "0.4290",
"start_count": 0,
"status": "Pending",
"remains": 1000,
"currency": "USD"
}複数の注文のステータスaction=status
注文番号をカンマ区切りで100件まで送れます。応答は注文番号ごとに返ります。
| 項目 | 意味 |
|---|---|
key | APIキー |
action | status |
orders | カンマ区切りの注文番号 |
リクエスト
curl -X POST https://panelclo.com/api/v2 \
-d key=YOUR_API_KEY \
-d action=status \
-d orders=48213907,51190264レスポンス
{
"48213907": {
"charge": "0.4290",
"start_count": 0,
"status": "Pending",
"remains": 1000,
"currency": "USD"
},
"51190264": {
"error": "Incorrect order ID"
}
}残高action=balance
残高を米ドルで返します。
| 項目 | 意味 |
|---|---|
key | APIキー |
action | balance |
リクエスト
curl -X POST https://panelclo.com/api/v2 \
-d key=YOUR_API_KEY \
-d action=balanceレスポンス
{
"balance": "42.5000",
"currency": "USD"
}リフィルaction=refill
リフィル付きプランで完了した注文のリフィルを、リフィル期間内に申請します。リフィル申請番号を返します。
| 項目 | 意味 |
|---|---|
key | APIキー |
action | refill |
order | 注文番号 |
リクエスト
curl -X POST https://panelclo.com/api/v2 \
-d key=YOUR_API_KEY \
-d action=refill \
-d order=48213907レスポンス
{
"refill": "R-K7M2QX"
}キャンセルaction=cancel
待機中の注文をキャンセルし、金額を残高に戻します。注文番号はカンマ区切りで100件までです。
| 項目 | 意味 |
|---|---|
key | APIキー |
action | cancel |
orders | カンマ区切りの注文番号 |
リクエスト
curl -X POST https://panelclo.com/api/v2 \
-d key=YOUR_API_KEY \
-d action=cancel \
-d orders=48213907レスポンス
[
{
"order": "48213907",
"cancel": 1
}
]エラー
エラーは error 項目を持つJSONで返ります。
Invalid API key- キーが間違っているか、新しいキーに替わっています。
Invalid service- その番号のサービスはありません。
Invalid link- リンクが http(s) から始まる完全なアドレスではありません。
Quantity out of range- 数量が最小より少ないか、最大より多いです。
Not enough funds on balance- チャージしてから、もう一度注文を送ってください。
Incorrect order ID- あなたのアカウントにその番号の注文はありません。
Too many requests- 1分待ってから、もう一度送ってください。
例はサービス #159(1,000あたり$0.429)で作っています。例の注文番号と残高は仮の値です。