POST/api/v1/admin/subscriptions/:subscriptionId/extend延长订阅
Try it 面板需要启用 JavaScript。
以自然日为单位延长订阅;下次续订时间相应顺延。
Request
| Name | Data Type | Required | Description |
| Authorization | string | Yes | 会话令牌认证,格式 `Bearer <sessionToken>` |
| Content-Type | string | Yes | 请求体内容类型(默认值 "application/json") |
type RequestHeaders = {
/** 会话令牌认证,格式 `Bearer <sessionToken>` */
Authorization: string
/** 请求体内容类型,默认值 "application/json" */
Content-Type: string
}
{
"Authorization": "Bearer st_7c1f9e05b28d4a63",
"Content-Type": "application/json"
}
URL Parameters
| Name |
Data Type |
Description |
| subscriptionId |
string |
订阅 ID |
Body
| Name | Data Type | Required | Description |
| days | number | Yes | 延长天数(1-365) |
| reason | string | Yes | 延长原因(写入审计日志) |
type RequestBody = {
/** 延长天数(1-365) */
days: number
/** 延长原因(写入审计日志) */
reason: string
}
{
"days": 14,
"reason": "服务故障补偿"
}
Response
Body
| Name | Data Type | Required | Description |
| subscriptionId | string | Yes | 订阅 ID |
| status | string | Yes | 订阅状态 |
| nextRenewalAt | string | Yes | 顺延后的下次续订时间 |
type ResponseBody = {
/** 订阅 ID */
subscriptionId: string
/** 订阅状态 */
status: string
/** 顺延后的下次续订时间 */
nextRenewalAt: string
}
{
"subscriptionId": "01JD8SOBHV0C3D9JD",
"status": "active",
"nextRenewalAt": "2026-11-27T09:00:00Z"
}
HTTP Code
| HTTP Status |
Meaning |
Notes |
| 200 |
成功 |
返回顺延后的订阅 |
| 409 |
状态不允许 |
订阅已过期 |
Response Code
响应使用统一信封 {id, code, messages, result},其 code 字段:
| code |
Meaning |
Notes |
| 0 |
成功 |
返回顺延后的订阅 |
| 2805 |
订阅状态不允许该操作 |
订阅已过期 |
Examples
POST /api/v1/admin/subscriptions/01JD8SOBHV0C3D9JD/extend
Authorization: Bearer st_7c1f9e05b28d4a63
Content-Type: application/json
{
"days": 14,
"reason": "服务故障补偿"
}
{
"id": "01JD8STG6L1G4H8",
"code": 0,
"messages": [],
"result": {
"subscriptionId": "01JD8SOBHV0C3D9JD",
"status": "active",
"nextRenewalAt": "2026-11-27T09:00:00Z"
}
}