GET 前台商品配置信息
接口概览
| 项目 | 内容 |
|---|---|
| 文档类型 | 前台接口 |
| 请求方式 | GET |
| 接口地址 | /console/v1/reidcsmart_common/product/{product_id}/configoption |
| 所属业务 | 模块 |
| 来源模块/系统 | 通用代理(自定义配置) |
| 认证方式 | Bearer Token(用户令牌) |
完整请求
请求
正在加载示例…失败请求
正在加载示例…接口说明
前台商品配置信息
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| product_id | path | integer(int32) | 是 | 商品ID |
成功响应
正在加载示例…失败响应 400:请求参数或业务校验失败
正在加载示例…失败响应 401:未认证或登录已失效
正在加载示例…失败响应 403:无权执行当前操作
正在加载示例…失败响应 404:接口或业务资源不存在
正在加载示例…失败响应 500:服务器内部错误
正在加载示例…响应状态
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 成功响应 | 内联对象 |
| 400 | Bad Request | 请求参数或业务校验失败 | 内联对象 |
| 401 | Unauthorized | 未认证或登录已失效 | 内联对象 |
| 403 | Forbidden | 无权执行当前操作 | 内联对象 |
| 404 | Not Found | 接口或业务资源不存在 | 内联对象 |
| 500 | Internal Server Error | 服务器内部错误 | 内联对象 |
响应参数
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| status | integer(int32) | 否 | — | — | 状态码 |
| msg | string | 否 | — | — | 提示信息 |
| data | object | 否 | — | — | — |
| data.common_product | object | 否 | — | — | 商品基础信息 |
| data.common_product.name | string | 否 | — | — | 商品名称 |
| data.common_product.order_page_description | string | 否 | — | — | 订购页面html |
| data.common_product.allow_qty | string | 否 | — | — | 是否允许选择数量:1是,0否默认 |
| data.common_product.pay_type | string | 否 | — | — | 付款类型(免费free,一次onetime,周期先付recurring_prepayment,周期后付recurring_postpaid |
| data.common_product.product_id | integer(int32) | 否 | — | — | — |
| data.configoptions | [object] | 否 | — | — | 配置项信息 |
| data.configoptions[].id | integer(int32) | 否 | — | — | 配置项ID |
| data.configoptions[].product_id | integer(int32) | 否 | — | — | 商品ID |
| data.configoptions[].option_name | string | 否 | — | — | 配置项名称 |
| data.configoptions[].option_type | string | 否 | — | — | 配置项类型:select下拉单选,multi_select下拉多选,radio点击单选,quantity数量输入,quantity_range数量拖动,yes_no是否,area区域,cascade级联 |
| data.configoptions[].qty_min | integer(int32) | 否 | — | — | 数量时最小值 |
| data.configoptions[].qty_max | integer(int32) | 否 | — | — | 数量时最大值 |
| data.configoptions[].unit | string | 否 | — | — | 单位 |
| data.configoptions[].allow_repeat | integer(int32) | 否 | — | — | 数量类型时:是否允许重复:开启后,前台购买时,可通过点击添加按钮,自动创建一个新的配置项,取名如bw1 |
| data.configoptions[].max_repeat | integer(int32) | 否 | — | — | 最大允许重复数量 |
| data.configoptions[].description | string | 否 | — | — | 说明 |
| data.configoptions[].qty_change | integer(int32) | 否 | — | — | 数量变化值 |
| data.configoptions[].subs | [object] | 否 | — | — | 子项信息 |
| data.configoptions[].subs[].id | integer(int32) | 否 | — | — | 子项ID |
| data.configoptions[].subs[].option_name | string | 否 | — | — | 子项名称 |
| data.configoptions[].subs[].qty_min | integer(int32) | 否 | — | — | 子项最小值 |
| data.configoptions[].subs[].qty_max | integer(int32) | 否 | — | — | 子项最大值 |
| data.configoptions[].tree | [object] | 否 | — | — | 级联配置项的树形结构数据(仅当option_type为cascade时返回) |
| data.configoptions[].tree[].item_id | integer(int32) | 否 | — | — | 级联项ID |
| data.configoptions[].tree[].item_name | string | 否 | — | — | 级联项名称 |
| data.configoptions[].tree[].fee_type | string | 否 | — | — | 计费类型 |
| data.configoptions[].tree[].group_id | integer(int32) | 否 | — | — | 级联组ID |
| data.configoptions[].tree[].is_leaf | integer(int32) | 否 | — | — | 是否为末端项:1是,0否 |
| data.configoptions[].tree[].order | integer(int32) | 否 | — | — | 排序 |
| data.configoptions[].tree[].hidden | integer(int32) | 否 | — | — | 是否隐藏:1是,0否 |
| data.configoptions[].tree[].children | [string] | 否 | — | — | 子级联项(递归结构) |
| data.configoptions[].tree[].price | [string] | 否 | — | — | 价格信息(仅末端项有此字段) |
| data.configoptions[].cascade_group | [object] | 否 | — | — | 级联组信息(仅当option_type为cascade时返回) |
| data.configoptions[].cascade_group[].id | integer(int32) | 否 | — | — | 级联组ID |
| data.configoptions[].cascade_group[].group_name | string | 否 | — | — | 级联组名称 |
| data.cycles | object | 否 | — | — | 周期({"onetime":1.00}) |
| data.custom_cycles | [object] | 否 | — | — | 自定义周期 |
| data.custom_cycles[].id | integer(int32) | 否 | — | — | 自定义周期ID |
| data.custom_cycles[].name | string | 否 | — | — | 自定义周期名称 |
| data.custom_cycles[].cycle_time | integer(int32) | 否 | — | — | 自定义周期时长 |
| data.custom_cycles[].cycle_unit | string | 否 | — | — | 自定义周期单位 |
| data.custom_cycles[].amount | string | 否 | — | — | 商品自定义周期金额 |
| data.custom_cycles[].cycle_amount | string | 否 | — | — | (商品+配置项)自定义周期金额 |
| data.custom_cycles[].amount_client_level_discount | string | 否 | — | — | 商品自定义周期金额等级折扣 |
| data.custom_cycles[].cycle_amount_client_level_discount | string | 否 | — | — | (商品+配置项)自定义周期金额等级折扣 |
失败状态码 400、401、403、404、500 共用以下结构:
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| status | integer(int32) | 是 | — | — | 错误状态码 |
| msg | string | 是 | — | — | 错误提示 |