查询企业商城下可用的 spu 列表,仅实物,不支持虚拟商品
https://openapi.guanaitong.tech/commerce/product/spu/list
正式环境和测试环境的域名请见通用协议
POST
| 参数名称 | 是否必须 | 参数类型 | 长度限制 | 描述 |
| inventory_id | 是 | Integer | 清单ID,对接前给出,需关爱通先配置商城 | |
| category_id | 否 | Long | 商品清单分类ID,需通过路由接口查询出 | |
| search_key_word | 否 | String | [1-50] | 搜索关键字 |
| page_index | 否 | Integer | 页码 | |
| page_size | 否 | Integer | [1-100] | 每页数量,最大100,默认50 |
POST /commerce/produc/spu/list HTTP/1.1
Host: openapi.guanaitong.tech
Content-Type: application/x-www-form-urlencoded
cache-control: no-cache
access_token=48b3b588d536ef9082223f8368a17140&sign=39c4b425ce9aaba0ff9ae2bc8fa82837b4c294d9
&inventory_id=10001×tamp=1573784826&page_index=1&page_size=20
| 参数名称 | 描述 |
| code | 返回码。详见错误代码。 |
| msg | 如果错误,返回错误信息。 |
| data | Page<Spu>对象 |
| Page<Spu>对象 | |
|---|---|
| total_count | int类型,符合条件的总数量 |
| has_next | boolean类型,分页查询时返回,表示是否有更多数据 |
| data_list | List<Spu>对象 |
| Spu对象 | |
| spu_code | String类型,商品编号 |
| spu_name | String类型,商品名称 |
| product_title | String类型,商品标题 |
| selling_point | String类型,卖点/特色描述 |
| seller_id | Long类型,该商品所属的商家 ID 标识 |
| brand_name | String类型,品牌名称 |
| spu_head_pic_url | String类型,商品宣传图 |
| price | BigDecimal类型,商品价格 |
| stock | Integer类型,商品库存 |
| product_url | 商品详情地址(需额外配置才有) |
{
"code":0,
"msg":"OK",
"data":{
"data_list":[
{
"spu_name":"椒盐虾",
"spu_code":"PC20041400000001",
"price":55,
"brand_name":"美味",
"product_title":"美味椒盐虾一盘500g",
"selling_point":"椒盐虾一盘500g,现炒",
"stock":3997,
"seller_id":608,
"spu_head_pic_url":"https://img1.guanaitong.com/grus-gfs/dev/gmall-seller-mgr/by-days/2020-04-14/617559cf2954033813c6e0a06dcd5f3a.jpeg",
"product_url":"https://a.guanaitong.tech/commerce-front/gmall/productDetail/PC20041400000001"
},
{
"spu_name":"椒盐虾升级版",
"spu_code":"PC20041300000008",
"price":300,
"brand_name":"美味",
"product_title":"美味椒盐虾一盘500g",
"selling_point":"椒盐虾一盘500g,现炒",
"stock":10,
"seller_id":608,
"spu_head_pic_url":"https://img1.guanaitong.com/grus-gfs/dev/gmall-seller-mgr/by-days/2020-04-13/630d18cd949953dd329361a00be09d2b.jpg",
"product_url":"https://a.guanaitong.tech/commerce-front/gmall/productDetail/PC20041300000008"
}
],
"total_count":2,
"has_next":false
}
}
{"code":1000210002,"data":null,"msg":"sign check failed!"}