獲取流量套餐列表

查詢動態流量套餐,用於下單頁展示可選套餐。

介面資訊

GET /client/ip/dynamics/planConfig

請求頭

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

請求參數

參數名稱必選類型說明
capacity否String套餐流量容量(GB)
title否String套餐標題關鍵字
pageNum否Long頁碼,預設 1
pageSize否Long每頁條數

請求示例

const response = await fetch('/client/ip/dynamics/planConfig?pageNum=1&pageSize=10', {
  method: 'GET',
  headers: {
    'x-merchant-token': 'your-token-here',
    'x-merchant-code': 'your-merchant-code'
  }
})

const result = await response.json()

回應示例

{
  "total": 2,
  "rows": [
    {
      "id": 101,
      "title": "Dynamic 50GB",
      "capacity": 50,
      "price": 399,
      "discount": 1,
      "days": 30,
      "status": "Y"
    }
  ],
  "code": 200,
  "msg": "查詢成功"
}

回應參數說明

參數名稱類型說明
totalLong符合條件的總記錄數
rowsArray當前頁的套餐列表
codeInteger業務狀態碼
msgString提示資訊
rows[].idLong套餐設定 ID,下單時作為 configPlanId
rows[].titleString套餐標題
rows[].capacityNumber流量容量(GB)
rows[].priceNumber價格
rows[].discountNumber折扣相關數值(以實際業務為準)
rows[].daysInteger有效天數
rows[].statusString上架狀態,Y 表示可用

注意事項

  1. 介面僅返回可用套餐。
  2. 返回體不包含 tenantId、merchantId、tenantPrice、createTime、updateTime。
  3. 常用字段為 id/title/capacity/price/discount/days/status。