yougou.inventory.update 更新商家库存信息
更新商家库存信息
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 |
应用级输入参数:
参数名称 | 参数类型 | 是否必填 | 参数说明 | 取值说明 | 默认值 |
---|---|---|---|---|---|
third_party_code |
String | 是 | 商家货品条码 |
||
update_type |
String | 否 | 可选,库存更新类型。有效取值范围:0=全局(默认即覆盖更新)、1=增量(即基础上更新) |
0=全局、1=增量 |
0 |
quantity |
Number | 是 | 更新数量,数值为负数表示扣减操作,数值为正数表示增加操作 |
返回结果:
参数名称 | 参数类型 | 取值说明 | 参数说明 |
---|---|---|---|
code |
String | 业务结果代码(200=成功|500=系统异常|XXX=业务异常) |
|
message |
String | 业务结果消息(异常消息|true|false) |
|
third_party_code |
String | ||
modified |
Date |
返回实例:
JSON
{ "yougou_inventory_update_response": { "message": "", "item": { "third_party_code": "abc123453", "modified": "2012-03-28 12:12:47" }, "code": "200" } }
XML
<?xml version="1.0" encoding="UTF-8"?> <yougou_inventory_update_response> <message></message> <item> <third_party_code>abc123453</third_party_code> <modified>2012-03-28 12:12:47</modified> </item> <code>200</code> </yougou_inventory_update_response>
错误码:
错误码 | 错误描述 | 解决方案 |
暂无数据 |