API
取消发货(lma.shipment.cancel)
更新时间: 2019-09-26 09:48:15 访问次数:866
接口说明

卖家或第三方通过该接口订单取消发货

接口英文名称

lma.shipment.cancel

使用场景

卖家或第三方通过该接口订单取消发货

备注

  • 1. 支持批量取消
  • 2. 只允许订单(状态为草稿)变为取消发货订单
    取消部分失败,将返回部分成功,部分失败,失败list并提示每一单失败的原因

请求说明
URL http://openapi.winit.com.cn/openapi/service
接口测试 http://openapi.sandbox.winit.com.cn/openapi/service
验证方法 Token,md5
格式 json
字符编码 UTF-8
http请求方式 http
请求数限制 默认每分钟1000,有需要可申请加大。
请求入参
名称 类型 必填 说明 示例
winitOrderNOs Array Y winit 订单号

请求示例
1.单个取消
	{
    "action":"lma.shipment.cancel",
    "app_key":"rebecca",
"client_id":"ODJKMDU1YZCTYJQ5YY00ZWZLLTK5N2QTOWY4MZI5OGMWNDG2",
    "data":{
        "winitOrderNOs":[
            "LMA010000000900CN"
        ]
    },
    "format":"json",
    "language":"zh_CN",
    "platform":"OWNERERP",
    "sign":"449C8E1323640037A770307F01E434D7",
    "sign_method":"md5",
    "timestamp":"2016-07-10 23:04:52",
"client_sign":"8F7C8CB1493D6E3EB24A54DF79E2A216",
    "version":"1.0"
}
2.批量取消
{
    "action":"lma.shipment.cancel",
    "app_key":"rebecca",
"client_id":"ODJKMDU1YZCTYJQ5YY00ZWZLLTK5N2QTOWY4MZI5OGMWNDG2",
    "data":{
        "winitOrderNOs": ["LMA010000001104CN","LMA010000001110CN","LMA010000001124CN","LMA010000001124CN","LMA010000001110CN","LMA010000001104CN","LMA010000001094CN","LMA010000001087CN","LMA010000001071CN","LMA010000001068CN","LMA010000001056CN","LMA010000001048CN","LMA010000001033CN","LMA010000001138CN","LMA010000001140CN","LMA010000001158CN","LMA010000001161CN","LMA010000001178CN","LMA010000001181CN","LMA010000001197CN"]
       
    },
    "format":"json",
    "language":"zh_CN",
    "platform":"OWNERERP",
    "sign":"E03F50DDE3762A2A4D13B4D5D270EFA6",
    "sign_method":"md5",
    "timestamp":"2018-07-10 23:04:52",
"client_sign":"4C57FDDA368958A2F78020957EE0E08B",
    "version":"1.0"
}

                            
返回出参
名称 类型 必填 说明 示例
errorMsgs Array Y

-|orderNo
String(50)
YWinit订单号

-|errorCode
String(255)
Y错误码(为空表示成功,否则显示相应错误码)
012341111111
-|errorMsg
String(255)
Y错误信息(为空表示成功,否则显示相应错误信息)
订单状态下不允许修改
successCount
IntegerY成功个数

failedCount
IntegerY失败个数

返回示例
1.取消成功
{
   "code": "0",
   "msg": "操作成功",
   "data":    {
      "failedCount": 0,
      "successCount": 1
   }
}
2.取消失败
{
   "code": "0",
   "msg": "操作成功",
   "data":    {
      "failedCount": 10,
      "successCount": 10,
      "errorMsg":       [
         "订单LMA010000001124CN当前状态下不能取消",
         "订单LMA010000001110CN当前状态下不能取消",
         "订单LMA010000001104CN当前状态下不能取消",
         "订单LMA010000001094CN当前状态下不能取消",
         "订单LMA010000001087CN当前状态下不能取消",
         "订单LMA010000001071CN当前状态下不能取消",
         "订单LMA010000001068CN当前状态下不能取消",
         "订单LMA010000001056CN当前状态下不能取消",
         "订单LMA010000001048CN当前状态下不能取消",
         "订单LMA010000001033CN当前状态下不能取消"
      ]
   }
}

                            
关键词