獲取套餐詳情

查詢當前帳號的動態流量套餐詳情,用於展示總流量、剩餘流量、到期時間等資訊。

介面資訊

GET /client/plan/detail

請求頭

參數名稱必選類型說明
x-merchant-token是string商戶訪問令牌
x-merchant-code是string商戶編碼

請求參數

無

請求示例

const response = await fetch('/client/plan/detail', {
  method: 'GET',
  headers: {
    'x-merchant-token': 'your-token-here',
    'x-merchant-code': 'your-merchant-code'
  }
})

const result = await response.json()

回應示例

{
  "code": 200,
  "msg": "操作成功",
  "data": {
    "id": 1001,
    "merchantId": 20001,
    "planType": "residential",
    "planTrafficGb": 50,
    "planResidueTrafficGb": 30,
    "expirationDate": "2026-12-31 00:00:00",
    "expired": 0,
    "createTime": "2026-01-01 10:00:00",
    "updateTime": "2026-04-01 12:00:00"
  }
}

回應參數說明

參數名稱類型說明
codeInteger業務狀態碼,成功一般為 200
msgString提示資訊
dataObject當前商戶的訂閱計劃;無計劃時為 null
data.idLong計劃記錄 ID
data.merchantIdLong商戶 ID(與令牌對應商戶一致)
data.planTypeString計劃類型,如 residential(住宅)、datacenter(數據中心)
data.planTrafficGbNumber套餐總流量(GB)
data.planResidueTrafficGbNumber剩餘可分配流量(GB)
data.expirationDateString套餐到期時間
data.expiredInteger是否過期:0 否,1 是
data.createTimeString創建時間
data.updateTimeString更新時間