开放平台

扒书 ERP Open API

订阅增值服务

下单订阅指定的增值服务,返回订阅后的最新状态。

请求方式POST
接口路径/api/valueAdded/subscription/subscribe
Content-Typeapplication/json
鉴权X-Nideshop-Token

请求体字段

字段类型必填说明
subscriptionTypeString否{
monthsInteger否1 / 3 / 6 / 12

curl 调用

curl -s 'https://www.8shu8.com/api/valueAdded/subscription/subscribe' \
  -H 'X-Nideshop-Token: YOUR_LOGIN_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "subscriptionType": "string",
  "months": 1
}'

响应示例

{
  "code": 200,
  "message": "操作成功",
  "success": true,
  "data": {
    "subscriptionType": "string",
    "typeLabel": "string",
    "typeDesc": "string",
    "active": true,
    "expireTime": "string",
    "freeTrialUsed": 1,
    "freeTrialLimit": 1,
    "freeTrialRemaining": 1,
    "freeTrialTip": "string",
    "durationPrices": [
      "..."
    ],
    "months": 1,
    "label": "string",
    "price": 0.0
  }
}

返回字段(data)

字段类型说明
subscriptionTypeString-
typeLabelString-
typeDescString-
activeboolean-
expireTimeLocalDateTime-
freeTrialUsedInteger-
freeTrialLimitInteger-
freeTrialRemainingInteger-
freeTrialTipString-
durationPrices对象数组-
monthsint-
labelString-
priceBigDecimal-