跳到主要内容

修改工单商品

请求地址

环境服务地址(HTTP/HTTPS)
V2正式环境(推荐)https://gw.superboss.cc/router

2022年4月1日以后申请的APP Key,统一使用V2正式环境的请求地址:https://gw.superboss.cc/router

公共参数

调用任何一个API都必须传入的参数,目前支持的公共参数有:

参数名称参数类型是否必须参数描述
methodstringAPI接口名称
appKeystring分配给应用的AppKey
timestampstring时间戳,时区为GMT+8,例如:2020-09-21 16:58:00。API服务端允许客户端请求最大时间误差为10分钟
formatstring响应格式。默认为json格式,可选值:json
versionstringAPI协议版本 可选值:1.0
sign_methodstring签名的摘要算法(默认 hmac),可选值为:hmac,md5,hmac-sha256。
signstring签名
sessionstring授权会话信息 (即access_token,由系统分配)

请求头

全部展开
参数名
类型
描述
必填
Content-Type
string
application/x-www-form-urlencoded;charset=UTF-8
必填

API接口地址

全部展开
参数名
类型
描述
必填
method
string
erp.aftersale.workorder.item.update
必填

请求参数

全部展开
参数名
类型
描述
必填
workOrderId
long
售后工单ID
必填
type
int
商品类型 1-退货商品 2-补发商品
必填
itemList
string
商品修改列表JSON字符串
必填
outerId
string
商家编码(作为商品标识)
必填
count
int
修改后的数量(必须大于0)
goodItemCount
int
修改后的良品数量
badItemCount
int
修改后的次品数量
refundMoney
double
修改后的系统实退金额(单位:元)
receivableCount
int
修改后的申请数量
remark
string
修改后的备注

请求示例

{
"workOrderId": 1234567890,
"type": 1,
"itemList": "[{\"outerId\":\"SKU001\",\"count\":2,\"goodItemCount\":1,\"badItemCount\":1,\"refundMoney\":10.50,\"receivableCount\":1,\"remark\":\"修改备注\"}]"
}

响应参数

全部展开
参数名
类型
描述
必填
code
string
错误码
必填
msg
string
错误信息
必填
reports
array
操作结果报告列表
必填
isSuc
boolean
是否成功
必填
errorMsg
string
错误信息(失败时返回)
reportKey
string
报告标识(商家编码)
必填
trace_id
string
示例:3553483395407017
必填

响应示例

{
"code": "",
"msg": "",
"reports": [
{
"isSuc": true,
"reportKey": "SKU001"
},
{
"isSuc": false,
"errorMsg": "商品不存在",
"reportKey": "SKU002"
}
],
"trace_id": "3553483395423660"
}

异常示例

{
"code": "25",
"msg": "服务方法(erp.aftersale.workorder.item.update:1.0)的签名无效",
"success": false,
"trace_id": "3553483395423660"
}

错误码解释

错误码错误信息解决方案
content1content2content3

注意事项

  1. 商家编码(outerId)为必填项,作为商品标识
  2. 商品数量(count)如果传入,必须大于0
  3. 如果传入了数量(count),且良品或次品有值,则良品数量(goodItemCount) + 次品数量(badItemCount) 必须等于商品数量(count)
  4. 商品类型(type)必须为1(退货商品)或2(补发商品)
  5. 修改结果通过reports数组返回,每个商品对应一个执行结果报告