获取商品列表
企业可通过接口获取商城中心的商品列表信息
请求方式: POST(HTTPS)
请求地址: https://open.wshoto.com/openapi/valetorder/goods/list?access_token=x
Query参数:
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
access_token | string | 是 | 调用接口凭证 |
Body参数:
{
"page":1,
"size":10,
"category_id":111,
"goods_name":"测试",
"up_status":1
}
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
page | int | 是 | 当前页数 |
size | int | 是 | 每页条数 |
category_id | long | 否 | 分类id |
goods_name | string | 否 | 商品名称 |
up_status | int | 否 | 上架状态 1 销售中,11 已售罄,0 已下架 |
返回值:
{
"code": 0,
"msg": "请求成功",
"data": {
"total": 4,
"records": [
{
"id": "1528573122730778625",
"category_name": "子分类4",
"category_id": null,
"category_parent_id": null,
"goods_name": "测试商品新鲜的千禧圣女果",
"stock_num": 10,
"sale": 0,
"up_time": 1653973589,
"up_status": 1,
"sale_status": null,
"del_status": null,
"pic_url": "https://javatest-1253767630.file.myqcloud.com/mall-3337571a-8852-4ff5-a35e-ffa20129744d.jpeg",
"type": 0,
"price": 2999,
"act_price": null,
"keywords": null,
"show_status": 1,
"alert_stock": null,
"use_attr": "0",
"goods_coupon_mark": null,
"act_type": null,
"min_buy_quantity": null,
"basic_price": null,
"enjoy": 0,
"activity_boo": null,
"activity_type": null
},
{
"id": "1528573122223267842",
"category_name": "子分类3",
"category_id": null,
"category_parent_id": null,
"goods_name": "测试商品好吃的山东水蜜桃",
"stock_num": 20,
"sale": 0,
"up_time": 1653973589,
"up_status": 1,
"sale_status": null,
"del_status": null,
"pic_url": "https://javatest-1253767630.file.myqcloud.com/mall-131c1630-8be8-4b21-944f-f5862cd34c79.jpeg",
"type": 1,
"price": 999,
"act_price": null,
"keywords": null,
"show_status": 1,
"alert_stock": null,
"use_attr": "0",
"goods_coupon_mark": null,
"act_type": null,
"min_buy_quantity": null,
"basic_price": null,
"enjoy": 0,
"activity_boo": null,
"activity_type": null
},
{
"id": "1528573121971609601",
"category_name": "子分类2",
"category_id": null,
"category_parent_id": null,
"goods_name": "测试商品好看的短袖上衣",
"stock_num": 10,
"sale": 0,
"up_time": 1653973589,
"up_status": 1,
"sale_status": null,
"del_status": null,
"pic_url": "https://javatest-1253767630.file.myqcloud.com/mall-8e83ef9e-8716-4c2a-84c6-eeaf600e7206.jpeg",
"type": 0,
"price": 1999,
"act_price": null,
"keywords": null,
"show_status": 1,
"alert_stock": null,
"use_attr": "0",
"goods_coupon_mark": null,
"act_type": null,
"min_buy_quantity": null,
"basic_price": null,
"enjoy": 0,
"activity_boo": null,
"activity_type": null
},
{
"id": "1528573120679763970",
"category_name": "子分类1",
"category_id": null,
"category_parent_id": null,
"goods_name": "测试商品漂亮的连衣裙",
"stock_num": 10,
"sale": 0,
"up_time": 1653973589,
"up_status": 1,
"sale_status": null,
"del_status": null,
"pic_url": "https://javatest-1253767630.file.myqcloud.com/mall-bbd12dc2-5ca9-4382-9563-5fc006ed9179.jpeg",
"type": 0,
"price": 3999,
"act_price": null,
"keywords": null,
"show_status": 1,
"alert_stock": null,
"use_attr": "0",
"goods_coupon_mark": null,
"act_type": null,
"min_buy_quantity": null,
"basic_price": null,
"enjoy": 0,
"activity_boo": null,
"activity_type": null
}
]
}
}
参数说明:
参数 | 类型 | 说明 |
---|---|---|
code | int | 返回码 |
msg | string | 对返回码的文本描述内容 |
data | object[] | 返回数据 |
total | int | 总量 |
records | Order[] | 订单列表 |
id | long | 商品id(spuId) |
category_name | string | 二级分类 |
category_id | long | 二级分类ID |
category_parent_id | long | 分类父ID |
goods_name | string | 商品名称 |
stock_num | int | 库存 |
sale | int | 销量 |
up_time | long | 上架时间 |
up_status | int | 销售状态:10可售卖、11已售罄、12部分售罄、13团购商品未售罄、14秒杀商品未售罄 |
del_status | string | 是否删除: 0.未删除 1.已删除 |
pic_url | string | 缩略图 |
type | int | 商品类型 0普通商品、1团购商品、2秒杀商品、3预售商品 |
price | long | 显示价格 |
act_price | long | 活动价格 |
keywords | string | 搜索关键字 |
show_status | int | 商品状态:0下架、1销售中、-1预览 、11已售罄、12部分售罄、13团购商品未售罄、14秒杀商品未售罄 |
alert_stock | boolean | 当前库存是否低于预警库存 |
use_attr | string | 是否使用了规格 |
goods_coupon_mark | string | 活动标识 |
act_type | int | 根据活动时间查出来已有的活动类型 |
min_buy_quantity | int | 起购数量 |
basic_price | long | 商品原价 |
enjoy | int | 能否分享---移动端用到 |
activity_boo | boolean | 是否享受活动价格 |
activity_type | int | 活动类型:0-常规秒杀;1-员工拉新;2-客户群拉新;3-客户群促活;只有参加了秒杀活动的这个字段才有值 |