Table of Contents
6.7 订阅档位列表【基础探测通过,待数据联调】
GET /tieup/api/v1/subscription-plans
查询参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
artist_id |
integer | 是 | 艺人 ID;用于附加该艺人的自动续订能力,档位本身按当前渠道、平台、市场和业务启用状态返回。 |
响应字段:
| 字段 | 类型 | 说明 |
|---|---|---|
data |
array | 订阅档位数组;无可用档位时为空数组 [] |
data[].plan_code |
string | 订阅档位编码;创建订阅订单时作为 subscription_plan_code 传入 |
data[].subscription_plan_code |
string | 订阅档位业务编码,与 plan_code 相同 |
data[].plan_name |
string | 订阅档位名称,直接用于 APP 展示 |
data[].price_amount |
string | 普通月费金额,单位元,固定两位小数;所有平台保持同一口径 |
data[].annual_original_price_amount |
string | 普通年费原价,单位元,固定两位小数;按 price_amount * 12 计算 |
data[].ios_month_price_amount |
string/null | iOS 月费展示金额,单位元,固定两位小数;后台未配置时为 null |
data[].ios_year_price_amount |
string/null | iOS 年费展示金额,单位元,固定两位小数;后台未配置时为 null |
data[].duration_days |
integer | 月费订阅有效天数,当前默认 30 天 |
data[].auto_renew_methods.month |
string[] | 该艺人和档位的月费自动续订渠道;无匹配启用配置时为 [],本期实际接通渠道为 apple_iap |
data[].auto_renew_methods.year |
string[] | 该艺人和档位的年费自动续订渠道;无匹配启用配置时为 [],本期实际接通渠道为 apple_iap |
data[].config |
object/null | 后台展示扩展配置;不包含第三方商品或模板标识 |
data[].config.annual_discount |
number | 年度折扣;仅后台已配置时返回,例如 8 表示 8 折 |
data[].config.annual_price_amount |
string | 普通年度折后年费,单位元,固定两位小数;仅后台已配置普通年费时返回 |
响应示例:
{
"code": 200,
"message": "成功",
"data": [
{
"plan_code": "month_30",
"subscription_plan_code": "month_30",
"plan_name": "30元月度订阅",
"price_amount": "30.00",
"annual_original_price_amount": "360.00",
"ios_month_price_amount": "39.00",
"ios_year_price_amount": "374.00",
"duration_days": 30,
"auto_renew_methods": {
"month": ["apple_iap"],
"year": ["apple_iap"]
},
"config": {
"visible": true,
"tag": "推荐",
"annual_discount": 8,
"annual_price_amount": "288.00"
}
},
{
"plan_code": "month_68",
"subscription_plan_code": "month_68",
"plan_name": "68元月度订阅",
"price_amount": "68.00",
"annual_original_price_amount": "816.00",
"ios_month_price_amount": null,
"ios_year_price_amount": null,
"duration_days": 30,
"auto_renew_methods": {
"month": ["apple_iap"],
"year": ["apple_iap"]
},
"config": {
"visible": true,
"tag": ""
}
}
]
}
前端使用说明:
- 本接口只返回启用状态订阅档位;禁用档位不会出现在列表中。
- 本接口
data始终是候选档位数组,与艺人详情中的单个对象字段subscription_plan不是同一种结构;APP 不得混用解析模型。 - 普通月费和年费继续读取
price_amount、annual_original_price_amount、config.annual_price_amount;这些字段不随客户端平台变化。 - iOS 客户端展示 Apple 订阅价格时读取
ios_month_price_amount、ios_year_price_amount;字段为null时由 APP 决定隐藏入口或回退展示,服务端不代替前端选择。 - 本接口金额字段均为元字符串,不再返回分字段;不要按旧版
price_cent、annual_price_cent读取。 - 年度折扣和折后年费从
config.annual_discount、config.annual_price_amount读取;第三方商品和模板 ID 不对 APP 返回。 -
config.annual_price_amount表示普通年度折后年费;annual_original_price_amount表示按普通月费乘以 12 得出的年费原价。X-App-Platform: ios创建的订阅订单使用独立 iOS 月费或年费作为实付金额,其他平台继续使用普通价格。
说明:未传 artist_id 返回 422。本接口返回当前渠道、平台和市场可供艺人选择的全部业务档位,并按“艺人 + 档位”附加自动续订能力;没有后台自动续订配置时 auto_renew_methods.month/year 为 [],仅表示不能使用对应自动续订渠道,不影响微信、支付宝普通单次订阅。该列表是候选目录,创建粉丝订阅订单时仍必须使用艺人在 8.8 中保存的当前唯一 subscription_plan_code。