请求补充
符合条件的 completed 或 partial 订单在等待 24 小时后可创建补单请求。没有总尝试次数限制,但同一时间只能有一个处于 pending、processing 或审核中的补单。
POST
https://notpanel.com/api/v3action=refill需要 API key受速率限制(共享账户 + IP + action)请求体:
application/x-www-form-urlencoded参数
| 名称 | 类型 | 描述 |
|---|---|---|
| key必需 | string | 你的 API key。 |
| action必需 | string | 必须是字面字符串 “refill”。 |
| order | string | 单个订单 ID。使用 order 或 orders;若两者同时提供,以 orders 为准。 |
| orders | string (CSV) | 用于批量补充的、以逗号分隔的最多 100 个订单 ID。返回一个数组——每一行包含一个补充 ID 或该订单的错误信息。 |
请求示例
将 YOUR_API_KEY 替换为在你仪表盘 API 页面下生成的 key。
curl -X POST https://notpanel.com/api/v3 \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "key=YOUR_API_KEY&action=refill&order=7001"const res = await fetch("https://notpanel.com/api/v3", {
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: new URLSearchParams({
key: "YOUR_API_KEY",
action: "refill",
order: "7001",
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"https://notpanel.com/api/v3",
data={
"key": "YOUR_API_KEY",
"action": "refill",
"order": "7001",
},
)
print(res.json())<?php
$body = http_build_query([
'key' => 'YOUR_API_KEY',
'action' => 'refill',
'order' => '7001',
]);
$response = file_get_contents('https://notpanel.com/api/v3', false, stream_context_create([
'http' => [
'method' => 'POST',
'header' => "Content-Type: application/x-www-form-urlencoded\r\n",
'content' => $body,
'ignore_errors' => true,
],
]));
print_r(json_decode($response, true));
响应示例
{
"refill": 8001
}常见错误
| 状态 | 响应体 | 原因 |
|---|---|---|
| 400 | {"error":"Order not found"} | 订单 ID 不存在或不属于你的账户。 |
| 400 | {"error":"Refill only available for completed or partial orders"} | 订单不是 completed 或 partial。其他订单状态均不符合补单条件。 |
| 400 | {"error":"Service does not support refills"} | 底层服务的 refill=false。在提交补充请求前请查看服务目录。 |
| 400 | {"error":"A refill request is already pending for this order"} | 请等待上一个补充完成后再创建新的补充。 |
| 400 | {"error":"Refill is available 24 hours after the order is completed"} | 订单完成时间不足 24 小时。 |