文档中心 电商接口 查询sku列表

查询sku列表

1.功能说明

查询企业商城下的 sku 列表,仅实物,不支持虚拟商品

2.接口调用说明

请求URL

https://openapi.guanaitong.tech/commerce/product/sku/list

正式环境和测试环境的域名请见通用协议

HTTPS请求方式

POST

输入参数说明

(1)公共参数

发送请求是必须传入公共参数,详见公共参数

(2)私有参数

参数名称 是否必须 参数类型 长度限制 描述
inventory_id Integer 清单ID,对接前给出,需关爱通先配置商城
search_key_word String [1-50] 搜索关键字
page_index Integer 页码
page_size Integer [1-100] 每页数量,最大100,默认50
请求示例
POST /commerce/product/sku/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=101&timestamp=1573784826&page_index=1&page_size=20
                    
返回参数说明
参数名称 描述
code 返回码。详见错误代码
msg 如果错误,返回错误信息。
data Page<SkuListResponse>对象
Page<SkuListResponse>对象
total_count int类型,符合条件的总数量
has_next boolean类型,分页查询时返回,表示是否有更多数据
data_list List<SkuListResponse>对象
SkuListResponse对象
spu_code String类型,商品spu编号
sku_code String类型,商品具体某个规格的 sku 的编号
sku_name String类型,商品名称
product_title String类型,商品标题
seller_id Long类型,该商品所属的商家 ID 标识
pic_url String类型,商品宣传图
pic_url_pc String类型,商品在 PC 端的宣传图
price BigDecimal类型,商品价格
stock Integer类型,商品库存
正确返回示例
{
	"code": 0,
	"data": {
		"property_list": [{
			"property_value": "16",
			"property_name": "尺寸"
		}, {
			"property_value": "2000g",
			"property_name": "重量"
		}, {
			"property_value": "1年",
			"property_name": "是否延保"
		}],
		"price": 111.0,
		"product_status": 0,
		"selling_point": "高清屏,大内存",
		"brand_name": "苹果",
		"picture_list": [{
			"picture_index": 1.0,
			"picture_type": 1,
			"picture_size_type": 3,
			"picture_url": "https://img1.guanaitong.com/a4cf387c49e23f4e1a913c15c1923967.jpg"
		}, {
			"picture_index": 1.0,
			"picture_type": 2,
			"picture_size_type": 3,
			"picture_url": "https://img1.guanaitong.com/254973bc0bc441dffda39ae42f27c541.jpg"
		}, {
			"picture_index": 1.0,
			"picture_type": 2,
			"picture_size_type": 2,
			"picture_url": "https://img1.guanaitong.com/254973bc0bc441dffda39ae42f27c541.jpg"
		}],
		"stock": 110,
		"product_name": "小明的笔记本",
		"product_title": "测试商品"
	},
	"msg": "OK"
}
                    
错误返回示例
{"code":1000210002,"data":null,"msg":"sign check failed!"}