查询产品配置与生效营销策略
接口说明
- 适用场景:【签约前查询】拉取产品配置及当前生效中的定价策略列表。
- 方法:
POST - 路径:
/v1/subscription/product/query
请求字段
| 字段 | 类型 | 必填 | 约束 | 匹配后(key / 中文名) | 说明 |
|---|---|---|---|---|---|
external_product_code |
string | 否 | ≤64 | external_product_code / 外部产品码 |
外部产品编号 |
响应字段
data[] 每项包含 product 与 strategies:
data[].product:
| 字段 | 类型 | 必填 | 匹配后(key / 中文名) | 说明 |
|---|---|---|---|---|
product_code |
string | 是 | product_code / 产品码 |
产品编码 |
external_product_code |
string | 是 | external_product_code / 外部产品码 |
外部产品编号 |
product_name |
string | 是 | product_name / 产品名称 |
产品名称 |
period_type |
string | 是 | period_type / 周期类型 |
周期类型 |
period_value |
integer | 是 | period_value / 周期值 |
周期值 |
fixed_day |
integer | 否 | fixed_day / 固定扣款日 |
固定扣款日 |
period_amount |
integer | 是 | period_amount / 每期扣款金额 |
每期扣款金额(分) |
total_period |
integer | 否 | total_period / 总期数 |
总期数 |
currency |
string | 是 | currency / 货币类型 |
币种 |
product_status |
string | 是 | product_status / 产品状态 |
产品状态(见 1.7) |
description |
string | 否 | description / 商品描述 |
描述 |
data[].strategies[]:
| 字段 | 类型 | 必填 | 匹配后(key / 中文名) | 说明 |
|---|---|---|---|---|
strategy_code |
string | 是 | strategy_code / 策略码 |
策略编码 |
product_code |
string | 是 | product_code / 产品码 |
产品编码 |
pricing_type |
string | 是 | pricing_type / 定价类型 |
定价类型 |
priority |
integer | 是 | priority / 优先级 |
优先级(降序) |
strategy_params |
string | 是 | strategy_params / 策略参数 |
策略参数 JSON |
effective_start |
string | 是 | effective_start_time / 生效开始时间 |
生效开始时间 |
effective_end |
string | 是 | effective_end_time / 生效结束时间 |
生效结束时间 |
strategy_status |
string | 是 | strategy_status / 策略状态 |
策略状态(见 1.8) |
请求示例:
{
"external_product_code": "MONTHLY_VIP"
}
响应示例(成功):
[
{
"product": {
"product_code": "PC202603260001",
"external_product_code": "MONTHLY_VIP",
"product_name": "月度会员",
"period_type": "MONTH",
"period_value": 1,
"fixed_day": null,
"period_amount": 1990,
"total_period": 12,
"currency": "CNY",
"product_status": "ENABLED",
"description": "月度VIP会员订阅"
},
"strategies": [
{
"strategy_code": "STR202603260001",
"product_code": "PC202603260001",
"pricing_type": "FIRST_PERIOD_DISCOUNT",
"priority": 100,
"strategy_params": "{\"discount_rate\":0.8}",
"effective_start": "2026-05-25T16:00:00+08:00",
"effective_end": "2026-05-25T16:00:00+08:00",
"strategy_status": "ENABLED"
}
]
}
]
响应示例(失败):
{
"code": "NOT_FOUND",
"message": "产品未命中"
}
###