TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
LogisticsWmsOpexceptionReportRequest req = new LogisticsWmsOpexceptionReportRequest();
LogisticsWmsOpexceptionReportRequest.OpExceptionReportDTO obj1 = new LogisticsWmsOpexceptionReportRequest.OpExceptionReportDTO();
obj1.setOwnerCode("AX766232");
obj1.setWarehouseCode("STA");
obj1.setAbnormalOrderId("EX8980023");
obj1.setAbnormalType("1001");
obj1.setScenarioType("EX8980023");
obj1.setOrderCode("MFC500229888570");
obj1.setOperateTime("2023-12-16 10:05:00");
obj1.setStatus("REGISTER");
obj1.setMailNo("ZT1701659322083");
obj1.setLogisticsCode("ZTO");
obj1.setLogisticsName("中通");
LogisticsWmsOpexceptionReportRequest.SenderInfoDTO obj2 = new LogisticsWmsOpexceptionReportRequest.SenderInfoDTO();
obj2.setName("张三");
obj2.setPhone("14420231217");
obj2.setProvince("浙江省");
obj2.setCity("杭州市");
obj2.setArea("余杭区");
obj2.setTown("横加桥");
obj2.setDetailAddress("文一西路969号");
obj1.setSenderInfoDto(obj2);
List<LogisticsWmsOpexceptionReportRequest.AbnormalLineDTO> list4 = new ArrayList<LogisticsWmsOpexceptionReportRequest.AbnormalLineDTO>();
LogisticsWmsOpexceptionReportRequest.AbnormalLineDTO obj5 = new LogisticsWmsOpexceptionReportRequest.AbnormalLineDTO();
list4.add(obj5);
obj5.setAbnormalLineId("LI0010");
obj5.setBarCode("69888721");
obj5.setItemCode("75266262");
obj5.setItemName("眼霜");
obj5.setQty(5L);
obj5.setInventoryType("ZP");
obj5.setAttachmentUrls("http://a.demo.com/a.jpg");
obj5.setRemark("商品销售包装瑕疵");
obj5.setSn("sn编码");
obj1.setAbnormalLineDtoList(list4);
obj1.setExtendProps("{}");
obj1.setOutBizCode("123");
req.setOpExceptionReport(obj1);
LogisticsWmsOpexceptionReportResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
LogisticsWmsOpexceptionReportRequest req = new LogisticsWmsOpexceptionReportRequest();
LogisticsWmsOpexceptionReportRequest.OpExceptionReportDTODomain obj1 = new LogisticsWmsOpexceptionReportRequest.OpExceptionReportDTODomain();
obj1.OwnerCode = "AX766232";
obj1.WarehouseCode = "STA";
obj1.AbnormalOrderId = "EX8980023";
obj1.AbnormalType = "1001";
obj1.ScenarioType = "EX8980023";
obj1.OrderCode = "MFC500229888570";
obj1.OperateTime = "2023-12-16 10:05:00";
obj1.Status = "REGISTER";
obj1.MailNo = "ZT1701659322083";
obj1.LogisticsCode = "ZTO";
obj1.LogisticsName = "中通";
LogisticsWmsOpexceptionReportRequest.SenderInfoDTODomain obj2 = new LogisticsWmsOpexceptionReportRequest.SenderInfoDTODomain();
obj2.Name = "张三";
obj2.Phone = "14420231217";
obj2.Province = "浙江省";
obj2.City = "杭州市";
obj2.Area = "余杭区";
obj2.Town = "横加桥";
obj2.DetailAddress = "文一西路969号";
obj1.SenderInfoDto= obj2;
List<LogisticsWmsOpexceptionReportRequest.AbnormalLineDTODomain> list4 = new List<LogisticsWmsOpexceptionReportRequest.AbnormalLineDTODomain>();
LogisticsWmsOpexceptionReportRequest.AbnormalLineDTODomain obj5 = new LogisticsWmsOpexceptionReportRequest.AbnormalLineDTODomain();
list4.Add(obj5);
obj5.AbnormalLineId = "LI0010";
obj5.BarCode = "69888721";
obj5.ItemCode = "75266262";
obj5.ItemName = "眼霜";
obj5.Qty = 5L;
obj5.InventoryType = "ZP";
obj5.AttachmentUrls = "http://a.demo.com/a.jpg";
obj5.Remark = "商品销售包装瑕疵";
obj5.Sn = "sn编码";
obj1.AbnormalLineDtoList= list4;
obj1.ExtendProps = "{}";
obj1.OutBizCode = "123";
req.OpExceptionReport_ = obj1;
LogisticsWmsOpexceptionReportResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new LogisticsWmsOpexceptionReportRequest;
$op_exception_report = new OpExceptionReportDTO;
$op_exception_report->owner_code="AX766232";
$op_exception_report->warehouse_code="STA";
$op_exception_report->abnormal_order_id="EX8980023";
$op_exception_report->abnormal_type="1001";
$op_exception_report->scenario_type="EX8980023";
$op_exception_report->order_code="MFC500229888570";
$op_exception_report->operate_time="2023-12-16 10:05:00";
$op_exception_report->status="REGISTER";
$op_exception_report->mail_no="ZT1701659322083";
$op_exception_report->logistics_code="ZTO";
$op_exception_report->logistics_name="中通";
$sender_info_dto = new SenderInfoDTO;
$sender_info_dto->name="张三";
$sender_info_dto->phone="14420231217";
$sender_info_dto->province="浙江省";
$sender_info_dto->city="杭州市";
$sender_info_dto->area="余杭区";
$sender_info_dto->town="横加桥";
$sender_info_dto->detail_address="文一西路969号";
$op_exception_report->sender_info_dto = $sender_info_dto;
$abnormal_line_dto_list = new AbnormalLineDTO;
$abnormal_line_dto_list->abnormal_line_id="LI0010";
$abnormal_line_dto_list->bar_code="69888721";
$abnormal_line_dto_list->item_code="75266262";
$abnormal_line_dto_list->item_name="眼霜";
$abnormal_line_dto_list->qty="5";
$abnormal_line_dto_list->inventory_type="ZP";
$abnormal_line_dto_list->attachment_urls="http://a.demo.com/a.jpg";
$abnormal_line_dto_list->remark="商品销售包装瑕疵";
$abnormal_line_dto_list->sn="sn编码";
$op_exception_report->abnormal_line_dto_list = $abnormal_line_dto_list;
$op_exception_report->extend_props="{}";
$op_exception_report->out_biz_code="123";
$req->setOpExceptionReport(json_encode($op_exception_report));
$resp = $c->execute($req);
curl -X POST 'http://gw.api.taobao.com/router/rest' \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'app_key=12129701' \
-d 'format=json' \
-d 'method=taobao.logistics.wms.opexception.report' \
-d 'partner_id=apidoc' \
-d 'sign=EE5A77019CE32F4171A45AFBF8477B88' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-12-14+23%3A44%3A30' \
-d 'v=2.0' \
-d 'op_exception_report=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.LogisticsWmsOpexceptionReportRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.op_exception_report=""
try:
resp= req.getResponse()
print(resp)
except Exception,e:
print(e)
pTopRequest pRequest = alloc_top_request();
pTopResponse pResponse = NULL;
pTaobaoClient pClient = alloc_taobao_client(url, appkey, appsecret);
set_api_name(pRequest,"taobao.logistics.wms.opexception.report");
add_param(pRequest,"op_exception_report","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,NULL);
printf("ret code:%d\n",pResponse->code);
if(pResponse->code == 0){
pTopResponseIterator ite = init_response_iterator(pResponse);
pResultItem pResultItem = alloc_result_item();
while(parseNext(ite, pResultItem) == 0){
printf("%s:%s\n",pResultItem->key,pResultItem->value);
}
destroy_response_iterator(ite);
destroy_result_item(pResultItem);
}
destroy_top_request(pRequest);
destroy_top_response(pResponse);
destroy_taobao_client(pClient);
TopClient = require('./topClient').TopClient;
var client = new TopClient({
'appkey': 'appkey',
'appsecret': 'secret',
'REST_URL': 'http://gw.api.taobao.com/router/rest'
});
client.execute('taobao.logistics.wms.opexception.report', {
'op_exception_report':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})