yougou.inventory.query 查询商家库存信息
查询商家库存信息
API用户授权:需要
系统级输入参数 | 应用级输入参数 | 返回结果 | 返回实例 | 错误码
系统级输入参数:
参数名称 | 参数类型 | 是否必填 | 参数说明 | 取值说明 | 默认值 |
---|---|---|---|---|---|
method |
String | 是 | API接口名称 |
||
timestamp |
String | 是 | 时间戳,格式为yyyy-MM-dd HH:mm:ss允许与优购系统时间误差正负6分钟,例如:2012-03-25 20:00:00 |
||
app_key |
String | 是 | 优购分配给商家应用的APP_KEY |
||
sign |
String | 是 | API输入参数签名结果 |
||
sign_method |
String | 否 | 可选,指定签名方式。系统默认md5,支持方式有:md5、sha-1 |
md5、sha-1 |
md5 |
app_version |
String | 否 | 可选,指定API版本。系统默认1.0,支持版本有:1.0 |
1.0 |
1.0 |
format |
String | 否 | 可选,指定响应格式。系统默认xml,支持响应格式有:xml、json |
应用级输入参数:
参数名称 | 参数类型 | 是否必填 | 参数说明 | 取值说明 | 默认值 |
---|---|---|---|---|---|
brand_no |
String | 否 | 货品品牌编号 |
||
cat_no |
String | 否 | 货品分类编号 |
||
years |
String | 否 | 货品上市年份,如:2012 |
||
commodity_status |
String | 否 | 可选,销售状态。系统默认-1,有效取值范围:1=停售、2=在售、4=待进货、5=待售、6=预售 |
1=停售、2=在售、4=待进货、5=待售、6=预售 |
-1 |
order_distribution_side |
String | 否 | 可选,订单配送方。系统默认-1,有效取值范围:0=优购、1=商家 |
0=优购、1=商家 |
-1 |
third_party_code |
String | 否 | 商家货品条码 |
||
page_index |
Number | 是 | 指定页码。有效取值范围:>=1 |
>=1 |
|
page_size |
Number | 是 | 指定页大小。有效取值范围:1至50 |
[1-50] |
|
product_no |
String | 否 | 优购货品编码 |
||
style_no |
String | 否 | 商品款号 |
返回结果:
参数名称 | 参数类型 | 取值说明 | 参数说明 |
---|---|---|---|
code |
String | 业务结果代码(200=成功|500=系统异常|XXX=业务异常) |
|
message |
String | 业务结果消息(异常消息|true|false) |
|
third_party_code |
String | 商家商品条码 |
|
modified |
String | 最后更新时间 |
|
total_stock_quantity |
Number | 总库存数量 |
|
product_no |
String | 优购货品编码 |
|
commodity_name |
String | 商品名称 |
|
commodity_status |
String | 商品状态 |
|
commodity_status_name |
String | 商品状态名称 |
|
supplier_code |
String | 供应商款色编码 |
|
commodity_image |
String | 商品默认图片 |
|
sale_price |
Number | 销售价 |
|
public_price |
Number | 市场价 |
|
commodity_items_page |
String | 优购商品单品页URL |
|
commodity_no |
String | 优购商品编码 |
返回实例:
JSON
{ "yougou_inventory_query_response": { "message": "", "items": [ { "supplier_code": "AHUF024-1", "commodity_image": "http://i2.ygimg.cn/pics/lining/2011/123445678/123445678_01_s.jpg", "sale_price": 149, "public_price": 299, "product_no": "BRX999-2BD1A36", "commodity_items_page": "http://www.yougou.com/xxx/sku-xxxx-12345678.shtml", "total_stock_quantity": 0, "third_party_code": "BRX999-2BD1A36", "commodity_name": "BELLE/百丽2014辣妈米色羊皮女单鞋 999-2B", "modified": "2012-05-23 14:26:47", "commodity_status_name": "在售", "commodity_status": 2, "commodity_no": "99850110" } ], "code": "200", "total_count": 1 } }
XML
<?xml version="1.0" encoding="UTF-8"?> <yougou_inventory_query_response> <code>200</code> <message></message> <total_count>1</total_count> <items> <item> <supplier_code>xxxxxxx-1</supplier_code> <commodity_image>http://i2.ygimg.cn/pics/lining/2011/12345678/12345678_01_s.jpg</commodity_image> <sale_price>149.00</sale_price> <commodity_status_name>在售</commodity_status_name> <public_price>299.00</public_price> <total_stock_quantity>95</total_stock_quantity> <product_no>12345678001</product_no> <commodity_items_page>http://www.yougou.com/c-lining/sku-xxxxxxx-12345678.shtml</commodity_items_page> <commodity_status>2</commodity_status> <third_party_code>xxxxxxx-1-6.5</third_party_code> <commodity_name>BELLE/百丽2014辣妈米色羊皮女单鞋 999-2B</commodity_name> <modified>2013-03-27 16:27:17</modified> <commodity_no>12345678</commodity_no> </item> </items> </yougou_inventory_query_response>
错误码:
错误码 | 错误描述 | 解决方案 |
暂无数据 |