获取商品详情信息
接口地址:/open-api/product/spu/info
请求方式:GET
接口描述: 根据商品id获取商品详情信息
公共请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | 示例值 |
|---|---|---|---|---|---|
| appId | 应用ID | header | true | string | test |
| nonce | 随机字符串 | header | true | string | 75ba4a58-8db0-4ce0-b403-2ccc8dbaea72 |
| timestamp | 时间戳 | header | true | string | 1772763315016 |
| sign | 签名串 | header | true | string | 89f4ad32ea7151cc33477215c24e8020bfb801a9a805a1369d9d6ceddc67a7e4 |
业务请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | 示例值 |
|---|---|---|---|---|---|
| id | 商品id | query | true | number | 1 |
请求示例
https://fjgs-gateway.imageco.cn/open-api/product/spu/info?id=1
响应参数:
| 参数名称 | 参数说明 | 类型 | 示例值 |
|---|---|---|---|
| code | 返回码 | integer | 0 |
| msg | 返回信息 | string | |
| data | 业务数据 | JSONObject | 参考data业务数据 |
data 业务数据 (JSONObject)
| 参数名称 | 参数说明 | 类型 | 示例值 |
|---|---|---|---|
| id | 商品id | number | 1711064111 |
| name | 商品名称 | string | 测试商品名称 |
| introduction | 商品简介 | string | 555 |
| description | 商品详细描述 | string | 商品描述 |
| categoryId | 分类id | number | 1036135111 |
| categoryName | 分类名称 | string | 饮料 |
| brandId | 品牌id | number | 1100111025 |
| brandName | 品牌名称 | string | 测试品牌001 |
| independentOperation | 是否独立运营[0:否, 1:是] | number | 0 |
| shelfLife | 保质期数值 | number | 5 |
| shelfLifeUnit | 保质期单位[1-天,2-月,3-年] | number | 1 |
| isSupportNoReasonReturn | 是否支持7天无理由退货[0:否, 1:是] | boolean | true |
| picUrl | 主图URL | string | url |
| sliderPicUrls | 轮播图URL数组 | array of string | [“url”,”url1”,”url2”] |
| mediaUrl | 媒体文件URL(视频等) | string / null | null |
| keyword | 关键词 | string | 55 |
| attributes | 自定义属性数组[json数组] | array | [] |
| serviceTel | 服务电话 | string | “55555555” |
| traceabilityUrl | 追溯信息URL | string / null | null |
| specType | 是否多规格 | boolean | true |
| price | 商品售价(单位:分) | number | 100 |
| marketPrice | 市场价(单位:分) | number | 531500 |
| stock | 总库存 | number | 114208 |
| type | 商品类型[1:普通商品, 2:虚拟商品, 3:票付通商品] | number | 1 |
| deliveryTypes | 配送方式数组[1:快递发货, 2:用户自提, 3:卡密卡号, 4:电子券码] | array of number | [1,2] |
| skus | SKU列表(详见下方子表) | array of object | 见子表 |
| salesCount | 销量 | number | 2 |
skus 子表(每个SKU对象字段):
| 参数名称 | 参数说明 | 类型 | 示例值 |
|---|---|---|---|
| id | SKU id | number | 50321821 |
| properties | 规格属性数组 | array of object | [{“propertyId”:425,”propertyName”:”口味”,”valueId”:60243938,”valueName”:”西瓜”}] |
| price | SKU售价(分) | number | 100 |
| marketPrice | SKU市场价(分) | number | 5500 |
| vipPrice | 会员价(分),可为null | number / null | null |
| picUrl | SKU图片URL | string | “” |
| stock | SKU库存 | number | 553 |
| weight | 重量(千克) | number | 0 |
| volume | 体积(立方米) | number | 0 |
响应成功示例:
{"code": 0,"msg": "","data": {"code": 0,"msg": "","data": {"id": 1711064111,"name": "测试商品名称","introduction": "555","description": "商品描述","categoryId": 1036135111,"categoryName": "饮料","brandId": 1100111025,"brandName": "测试品牌001","independentOperation": 0,"shelfLife": 5,"shelfLifeUnit": 1,"isSupportNoReasonReturn": true,"picUrl": "url","sliderPicUrls": ["url","url1","url2"],"mediaUrl": null,"keyword": "55","attributes": [],"serviceTel": "55555555","traceabilityUrl": null,"specType": true,"price": 100,"marketPrice": 531500,"stock": 114208,"type": 1,"deliveryTypes": [1,2],"skus": [{"id": 50321821,"properties": [{"propertyId": 425,"propertyName": "口味","valueId": 60243938,"valueName": "西瓜"}],"price": 100,"marketPrice": 5500,"vipPrice": null,"picUrl": "","stock": 553,"weight": 0,"volume": 0},{"id": 501493822,"properties": [{"propertyId": 425,"propertyName": "口味","valueId": 60242936,"valueName": "苹果"}],"price": 100,"marketPrice": 5500,"vipPrice": null,"picUrl": "","stock": 555,"weight": 0,"volume": 0}],"salesCount": 2}}}
响应失败示例:
{"code": 400,"msg": "签名不正确","data": null}
{"code": 200,"msg": "","data": null}


