简要描述:
商品详情信息接口
请求URL:
http(s)://平台域名/api/v1/goods/info
请求方式:
POST
请求参数:
Header 参数 | 类型 | 是否必填 | 描述 | 示例值 |
---|---|---|---|---|
Sign | string | 是 | 签名 | 点击查看签名规范 |
Timestamp | string | 是 | 13位时间戳(毫秒) | 1696644296195 |
UserId | string | 是 | 您的用户接口appid | 2uIkTrXNdAFc7OKhbRenzjDtgPoZ6s5C |
Body 参数 | 类型 | 是否必填 | 描述 | 示例值 |
---|---|---|---|---|
id | int | 是 | 商品ID | 1 |
签名示例:
1696654563249{"id":1}e3yw37fe2zhb4wb6p2zzmxerpr835pjy
返回示例:
{ "code": 200, "msg": "成功", "data": { "id": 1, "goods_name": "test自营手工", "goods_img": "http://hy.ziyuanting.com/Uploads%2FAttachment%2F2022-10-25%2F63578b642b6c1.jpg", "goods_type": 2, "face_value": "2.00", "goods_price": "2.00", "status": 1, "stock_num": 9999, "goods_info": "测试商品详情内容", "goods_notice": "", "start_count": 1, "end_count": 10, "attach": [ { "key": "recharge_account", "type": "text", "tip": "测试1", "name": "测试1" }, { "key": "lblName1", "type": "text", "tip": "测试2", "name": "测试2" } ] } }
返回data说明:
参数名 | 类型 | 描述 |
---|---|---|
id | int | 商品ID |
goods_name | string | 商品名称 |
goods_img | string | 商品图片 |
goods_type | int | 商品类型:1=卡密商品,2=虚拟商品 |
face_value | string | 商品面值 |
goods_price | string | 商品价格 |
status | int | 商品状态:1=销售,2=暂停,3=禁售 |
stock_num | int | 商品库存 |
goods_info | string | 商品详情 |
goods_notice | string | 注意事项 |
start_count | int | 最小购买数量 |
end_count | int | 最大购买数量 |
attach | array | 虚拟商品下单模板(卡密商品此数组为空) |
返回attach说明:
参数名 | 类型 | 描述 |
---|---|---|
key | string | 下单参数模板变量名 |
type | string | 类型:text=文本,password=密码框,checkbox=多选框,select=下拉,radio=单选框,cascader=级联组合 |
tip | string | 下单参数提示信息 |
name | string | 下单参数名称 |
options | string | 多选框、单选框、下拉框、 级联组合类型才存在此参数,其他类型无此参数 |