GET/api/v1/subscriptions/:subscriptionId查看订阅详情

返回指定订阅;订阅所属用户与管理员可查。

Request

Headers

NameData TypeRequiredDescription
AuthorizationstringYes会话令牌认证,格式 `Bearer <sessionToken>`
type RequestHeaders = {
  /** 会话令牌认证,格式 `Bearer <sessionToken>` */
  Authorization: string
}

URL Parameters

Name Data Type Description
subscriptionId string 订阅 ID

Response

Body

NameData TypeRequiredDescription
subscriptionIdstringYes订阅 ID
userIdstringYes用户 ID
titlestringYes订阅标题
businessServicestringYes业务服务
amountnumberYes周期金额
currencystringYes币种
intervalstringYesmonthly / yearly
statusstringYesactive / canceled / expired
nextRenewalAtstringNo下次续订时间
canceledAtstringNo取消时间
createdAtstringYes创建时间
type ResponseBody = {
  /** 订阅 ID */
  subscriptionId: string
  /** 用户 ID */
  userId: string
  /** 订阅标题 */
  title: string
  /** 业务服务 */
  businessService: string
  /** 周期金额 */
  amount: number
  /** 币种 */
  currency: string
  /** monthly / yearly */
  interval: string
  /** active / canceled / expired */
  status: string
  /** 下次续订时间 */
  nextRenewalAt?: string
  /** 取消时间 */
  canceledAt?: string
  /** 创建时间 */
  createdAt: string
}
{
  "subscriptionId": "01JD8SOBHV0C3D9JD",
  "userId": "01JD8SEGQ0P9N2XK4L7VDH3T6C",
  "title": "Xeegam Cloud · 专业版",
  "businessService": "cloud",
  "amount": 28,
  "currency": "USD",
  "interval": "monthly",
  "status": "active",
  "nextRenewalAt": "2026-11-13T09:00:00Z",
  "createdAt": "2026-10-14T15:30:00Z"
}

HTTP Code

HTTP Status Meaning Notes
200 成功 返回订阅详情

Response Code

响应使用统一信封 {id, code, messages, result},其 code 字段:

code Meaning Notes
0 成功 返回订阅详情

Examples

GET /api/v1/subscriptions/01JD8SOBHV0C3D9JD
Authorization: Bearer st_7c1f9e05b28d4a63
{
  "id": "01JD8SSVLQ0L8NG",
  "code": 0,
  "messages": [],
  "result": {
    "subscriptionId": "01JD8SOBHV0C3D9JD",
    "userId": "01JD8SEGQ0P9N2XK4L7VDH3T6C",
    "title": "Xeegam Cloud · 专业版",
    "businessService": "cloud",
    "amount": 28,
    "currency": "USD",
    "interval": "monthly",
    "status": "active",
    "nextRenewalAt": "2026-11-13T09:00:00Z",
    "createdAt": "2026-10-14T15:30:00Z"
  }
}