1.1. 商品详情(线上对外展示的商品数据)
1.1.1. 基本信息
Path: /v1/spu/detail
Method: GET
接口描述:
此接口返回商品审核通过后的商品信息。如商品编辑后触发系统审核机制,处于审核中时,只会返回上次审核通过的商品信息快照,而不是当前审核中的商品信息。
如要查看首次创建的商品数据,可调用商品编辑详情
1.1.2. 请求参数
Query
| 参数名称 | 是否必须 | 示例 | 备注 |
|---|---|---|---|
| spuId | 是 | 111 | 商品spuId |
1.1.3. 返回数据
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| code | number | 非必须 | 状态码:1000成功,非1000异常 | ||
| message | string | 非必须 | |||
| content | object | 非必须 | |||
| ├─ id | number | 非必须 | 商品ID即spuId | ||
| ├─ type | number | 非必须 | 商品类型:1成本商品,2预付商品 | ||
| ├─ status | number | 非必须 | 状态,0待上线,1已上线,2已下架 | ||
| ├─ auditStatus | number | 非必须 | 商品审核状态:0待提交,1待审核,2审核通过,3审核驳回 | ||
| ├─ limitStores | object | 非必须 | 限制购买的店铺 key是店铺ID value是店铺名称 | ||
| ├─ effectTimeType | number | 非必须 | 有效期类型,0长久有效,1购买后n天有效,2指定日期前有效 | ||
| ├─ effectTimeParam | string | 非必须 | 有效期 | ||
| ├─ name | string | 非必须 | 商品名称 | ||
| ├─ showPrice | number | 非必须 | 展示价格 | ||
| ├─ marketPrice | number | 非必须 | 市场价格 | ||
| ├─ posterType | number | 非必须 | 海报样式,0用户上传,1默认样式 | ||
| ├─ poster | string | 非必须 | 海报地址 | ||
| ├─ video | string | 非必须 | 视频 | ||
| ├─ sellSTime | number | 非必须 | 销售开始时间 时间戳 | ||
| ├─ sellETime | number | 非必须 | 销售结束时间 时间戳 | ||
| ├─ auditRemark | string | 非必须 | 审核备注 | ||
| ├─ historySale | number | 非必须 | 历史销量 | ||
| ├─ payerNumber | number | 非必须 | 真实付款人数 | ||
| ├─ payerNumberBase | number | 非必须 | 付款人数基数,对外展示为payerNumber+payerNumberBase | ||
| ├─ version | number | 非必须 | 当前商品spu版本号 | ||
| ├─ deleted | number | 非必须 | 0未删除,1已删除 | ||
| ├─ auditUserId | number | 非必须 | 审核人userId | ||
| ├─ subAuditTime | number | 非必须 | 提交审核时间 时间戳 | ||
| ├─ auditTime | number | 非必须 | 审核时间 | ||
| ├─ sort | number | 非必须 | 商品排序,数也大越排前面 | ||
| ├─ createTime | number | 非必须 | 创建时间 时间戳 | ||
| ├─ updateTime | number | 非必须 | 更新时间 时间戳 | ||
| ├─ createUserId | number | 非必须 | 创建人ID | ||
| ├─ createUserName | string | 非必须 | 创建人名称 | ||
| ├─ updateUserId | number | 非必须 | 更新人ID | ||
| ├─ updateUserName | string | 非必须 | 更新人姓名 | ||
| ├─ description | string | 非必须 | 图文描述 | ||
| ├─ usageNotice | string | 非必须 | 使用须知 | ||
| ├─ spuGroupData | object [] | 非必须 | item 类型: object | ||
| ├─ name | string | 必须 | 分组名称 | ||
| ├─ id | number | 必须 | 分组ID | ||
| ├─ spuKeyList | object [] | 非必须 | 商品属性名称列表 | item 类型: object | |
| ├─ id | number | 必须 | 商品属性名称ID 即spuKeyId | ||
| ├─ keyName | string | 必须 | 商品属性名称 | ||
| ├─ major | number | 必须 | 是否为主规格,0否,1是 | ||
| ├─ spuValList | object [] | 必须 | 商品属性值列表 | item 类型: object | |
| ├─ id | number | 必须 | 商品属性值ID 即spuValId | ||
| ├─ val | string | 必须 | 商品属性值 | ||
| ├─ pic | string | 必须 | 属性展示图片 主规格的属性值才有图片返回 | ||
| ├─ skuList | object | 非必须 | |||
| ├─ 0#0_1#0 | object | 非必须 | skukey,0#0_1#0解释:0#0表示第一个规格的第一个属性值即颜色暗黑,1#0表示第二个规格的第一个属性值即版本6G 128G | ||
| ├─ id | number | 非必须 | skuId | ||
| ├─ price | number | 非必须 | 售价 单位元 | ||
| ├─ marketPrice | number | 非必须 | 市场价 | ||
| ├─ proxyStandPrice | number | 非必须 | 代理标准价 | ||
| ├─ deduct | number | 非必须 | 预付商品的抵扣金额,单位分 | ||
| ├─ stock | number | 非必须 | 库存 | ||
| ├─ commission | number | 非必须 | 佣金 | ||
| ├─ buyLimitPer | number | 非必须 | 每人限购份数,0无限购 | ||
| ├─ kvIds | string [] | 非必须 | item 类型: string | ||
| ├─ | 非必须 | 商品spuKeyId-spuValId | |||
| ├─ 0#0_1#1 | object | 非必须 | 同上解释 | ||
| ├─ id | number | 非必须 | |||
| ├─ price | number | 非必须 | |||
| ├─ marketPrice | number | 非必须 | |||
| ├─ proxyStandPrice | number | 非必须 | |||
| ├─ deduct | number | 非必须 | |||
| ├─ stock | number | 非必须 | |||
| ├─ commission | number | 非必须 | |||
| ├─ buyLimitPer | number | 非必须 | |||
| ├─ kvIds | string [] | 非必须 | item 类型: string | ||
| ├─ | 非必须 | ||||
| ├─ 0#1_1#0 | object | 非必须 | 同上解释 | ||
| ├─ id | number | 非必须 | |||
| ├─ price | number | 非必须 | |||
| ├─ marketPrice | number | 非必须 | |||
| ├─ proxyStandPrice | number | 非必须 | |||
| ├─ deduct | number | 非必须 | |||
| ├─ stock | number | 非必须 | |||
| ├─ commission | number | 非必须 | |||
| ├─ buyLimitPer | number | 非必须 | |||
| ├─ kvIds | string [] | 非必须 | item 类型: string | ||
| ├─ | 非必须 | ||||
| ├─ 0#1_1#1 | object | 非必须 | 同上解释 | ||
| ├─ id | number | 非必须 | |||
| ├─ price | number | 非必须 | |||
| ├─ marketPrice | number | 非必须 | |||
| ├─ proxyStandPrice | number | 非必须 | |||
| ├─ deduct | number | 非必须 | |||
| ├─ stock | number | 非必须 | |||
| ├─ commission | number | 非必须 | |||
| ├─ buyLimitPer | number | 非必须 | |||
| ├─ kvIds | string [] | 非必须 | item 类型: string | ||
| ├─ | 非必须 | ||||
| ├─ 0#2_1#0 | object | 非必须 | 同上解释 | ||
| ├─ id | number | 非必须 | |||
| ├─ price | number | 非必须 | |||
| ├─ marketPrice | number | 非必须 | |||
| ├─ proxyStandPrice | number | 非必须 | |||
| ├─ deduct | number | 非必须 | |||
| ├─ stock | number | 非必须 | |||
| ├─ commission | number | 非必须 | |||
| ├─ buyLimitPer | number | 非必须 | |||
| ├─ kvIds | string [] | 非必须 | item 类型: string | ||
| ├─ | 非必须 | ||||
| ├─ 0#2_1#1 | object | 非必须 | 同上解释 | ||
| ├─ id | number | 非必须 | |||
| ├─ price | number | 非必须 | |||
| ├─ marketPrice | number | 非必须 | |||
| ├─ proxyStandPrice | number | 非必须 | |||
| ├─ deduct | number | 非必须 | |||
| ├─ stock | number | 非必须 | |||
| ├─ commission | number | 非必须 | |||
| ├─ buyLimitPer | number | 非必须 | |||
| ├─ kvIds | string [] | 非必须 | item 类型: string | ||
| ├─ | 非必须 | ||||
| ├─ album | string [] | 非必须 | 商品相册 | item 类型: string | |
| ├─ | 非必须 |
返回示例
{
"code": 1000,
"message": "success",
"content": {
"id": 1920,
"type": 1,
"status": 2,
"auditStatus": 2,
"limitStores": {
"111": "门店A"
},
"effectTimeType": 0,
"effectTimeParam": "0",
"name": "K40 pro 高通骁龙888 5G智能游戏手机",
"showPrice": 5,
"marketPrice": 0.03,
"posterType": 1,
"poster": "",
"video": "",
"sellSTime": 1615824000,
"sellETime": 1647446399,
"auditRemark": "",
"historySale": 21,
"payerNumber": 22,
"payerNumberBase": 99999,
"version": 0,
"subAuditTime": 1615877593,
"auditTime": 1615877631,
"sort": 0,
"createTime": 1615877588,
"updateTime": 1619681201,
"description": "<p><img src=\"https:\/\/ufile.xiaozancloud.com\/20210316\/329664e9cc0ce33fcce818ab75824c7e.jpg\" style=\"max-width:100%;\"><img src=\"https:\/\/ufile.xiaozancloud.com\/20210316\/25ec322b563854c10c7c995b82c7de13.jpg\" style=\"max-width: 100%;\"><br> <\/p>",
"usageNotice": "",
"spuGroupData": [{
"name": "嘿嘿嘿",
"id": 77
}, {
"name": "下雨了",
"id": 78
}],
"spuKeyList": [{
"id": 1151,
"keyName": "颜色",
"major": 1,
"spuValList": [{
"id": 2015,
"val": "暗夜",
"pic": "https:\/\/ufile.xiaozancloud.com\/20210316\/48ea52e437a24689b8bf4353f4fbf5f3.jpg"
}, {
"id": 2016,
"val": "幻境",
"pic": "https:\/\/ufile.xiaozancloud.com\/20210316\/f7a3493d0b508c89ba8a564a42294512.jpg"
}, {
"id": 2017,
"val": "晴雪",
"pic": "https:\/\/ufile.xiaozancloud.com\/20210316\/b7f239c728e404e2c58e808525731e67.jpg"
}]
}, {
"id": 1152,
"keyName": "版本",
"major": 0,
"spuValList": [{
"id": 2018,
"val": "6G 128G",
"pic": ""
}, {
"id": 2019,
"val": "6G 256G",
"pic": ""
}]
}],
"skuList": {
"0#0_1#0": {
"id": 2633,
"price": 5,
"marketPrice": 0.03,
"proxyStandPrice": 5,
"deduct": 0,
"stock": 9995,
"commission": 1,
"buyLimitPer": 0,
"kvIds": ["1151-2015", "1152-2018"]
},
"0#0_1#1": {
"id": 2634,
"price": 0.02,
"marketPrice": 0.03,
"proxyStandPrice": 0.02,
"deduct": 0,
"stock": 1,
"commission": 0.03,
"buyLimitPer": 0,
"kvIds": ["1151-2015", "1152-2019"]
},
"0#1_1#0": {
"id": 2635,
"price": 0.02,
"marketPrice": 0.03,
"proxyStandPrice": 0.02,
"deduct": 0,
"stock": 9993,
"commission": 1,
"buyLimitPer": 0,
"kvIds": ["1151-2016", "1152-2018"]
},
"0#1_1#1": {
"id": 2636,
"price": 0.02,
"marketPrice": 0.03,
"proxyStandPrice": 0.02,
"deduct": 0,
"stock": 9997,
"commission": 1,
"buyLimitPer": 0,
"kvIds": ["1151-2016", "1152-2019"]
},
"0#2_1#0": {
"id": 2637,
"price": 0.02,
"marketPrice": 0.03,
"proxyStandPrice": 0.02,
"deduct": 0,
"stock": 9995,
"commission": 1,
"buyLimitPer": 0,
"kvIds": ["1151-2017", "1152-2018"]
},
"0#2_1#1": {
"id": 2638,
"price": 0.02,
"marketPrice": 0.03,
"proxyStandPrice": 0.02,
"deduct": 0,
"stock": 0,
"commission": 1,
"buyLimitPer": 0,
"kvIds": ["1151-2017", "1152-2019"]
}
},
"album": ["https:\/\/ufile.xiaozancloud.com\/20210316\/2da81b7c34d566e98a27fabbb2d37c0b.jpg", "https:\/\/ufile.xiaozancloud.com\/20210316\/d26d3652e2ff89202a541dff8f10614c.jpg", "https:\/\/ufile.xiaozancloud.com\/20210316\/f2e27cd2afdeeb16363262ecc37487d8.jpg"]
}
}