智简魔方文档

GET 商品详情

接口概览

项目内容
文档类型后台接口
请求方式GET
接口地址/DIR_ADMIN/v1/product/{id}
所属业务商品管理
来源模块/系统商品管理
认证方式Bearer Token(管理员令牌)

完整请求

请求

bash
正在加载示例…

失败请求

bash
正在加载示例…

接口说明

商品详情

请求参数

名称位置类型必选说明
idpathinteger(int32)商品ID

成功响应

json
正在加载示例…

失败响应 400:请求参数或业务校验失败

json
正在加载示例…

失败响应 401:未认证或登录已失效

json
正在加载示例…

失败响应 403:无权执行当前操作

json
正在加载示例…

失败响应 404:接口或业务资源不存在

json
正在加载示例…

失败响应 500:服务器内部错误

json
正在加载示例…

响应状态

状态码状态码含义说明数据模型
200OK成功响应内联对象
400Bad Request请求参数或业务校验失败内联对象
401Unauthorized未认证或登录已失效内联对象
403Forbidden无权执行当前操作内联对象
404Not Found接口或业务资源不存在内联对象
500Internal Server Error服务器内部错误内联对象

响应参数

状态码 200

名称类型必选约束说明
statusinteger(int32)状态码
msgstring提示信息
dataobject
data.productobject商品
data.product.idinteger(int32)ID
data.product.namestring商品名称
data.product.product_group_idinteger(int32)所属商品组ID
data.product.descriptionstring商品描述
data.product.hiddeninteger(int32)是否隐藏 0显示 1隐藏
data.product.stock_controlinteger(int32)库存控制 1启用 0关闭
data.product.qtyinteger(int32)库存数量
data.product.product_idinteger(int32)父商品ID
data.product.plugin_custom_fields[string]自定义字段
data.product.showinteger(int32)是否展示在会员中心 0否 1是
data.product.renew_rulestring续费规则 due到期日 current当前时间
data.product.auto_renew_in_advanceinteger(int32)自动续费提前开关 0关闭 1开启
data.product.auto_renew_in_advance_numinteger(int32)自动续费提前时间数
data.product.auto_renew_in_advance_unitstring自动续费提前时间单位 minute分钟 hour小时 day天
data.product.natural_month_prepaidinteger(int32)自然月预付费开关 0关闭 1开启
data.product.recommendinteger(int32)推荐开关 0关闭 1开启
data.product.recommend_textstring推荐文案
data.product.recommend_colorstring推荐标签颜色 HEX格式如#FF5733
data.product.sync_stockinteger(int32)
data.product.pay_typestring
data.product.auto_setupinteger(int32)
data.product.typestring
data.product.rel_idinteger(int32)
data.product.pricestring
data.product.cyclestring
data.product.show_base_infointeger(int32)
data.product.pay_ontrial[任意类型]
data.product.upgrade[任意类型]
data.product.product_group_id_firstinteger(int32)
data.product.modulestring
data.modestring代理模式 only_api仅调用接口 sync同步商品
data.supplier_namestring供应商名称
data.profit_typeinteger(int32)利润类型 0百分比价格方案 1自定义金额
data.show_base_infointeger(int32)产品列表是否展示基础信息 1是 0否
data.modulestring商品对应模块
data.plugin_custom_fieldsobject插件钩子返回的自定义字段
data.pay_ontrialobject试用配置
data.pay_ontrial.statusinteger(int32)是否开启
data.pay_ontrial.cycle_typestring时长单位 hour day month
data.pay_ontrial.cycle_numinteger(int32)时长
data.pay_ontrial.client_limitstring用户限制 no不限制 new新用户 host用户必须存在激活中的产品
data.pay_ontrial.account_limitstring账户限制 email绑定邮件 phone绑定手机 certification实名
data.pay_ontrial.old_client_exclusivestring老用户专享商品ID 逗号分隔
data.pay_ontrial.maxinteger(int32)单用户最大试用数量

失败状态码 400、401、403、404、500 共用以下结构:

名称类型必选约束说明
statusinteger(int32)错误状态码
msgstring错误提示