TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
LogisticsExpressCollectSyncRequest req = new LogisticsExpressCollectSyncRequest();
LogisticsExpressCollectSyncRequest.TmsCollectRequest obj1 = new LogisticsExpressCollectSyncRequest.TmsCollectRequest();
obj1.setServiceType("1");
obj1.setMailNo("SF23434");
obj1.setPicUrl("https://img.alicdn.com/134");
obj1.setBizCode("234234234");
obj1.setLength("12.34");
obj1.setWidth("10.52");
obj1.setServiceFlag("1");
obj1.setWeight("23.43");
obj1.setTmsCpCode("SF");
obj1.setEstimateFee("23344");
obj1.setChargedWeight("3434");
obj1.setHeight("23.34");
obj1.setSupplierId("2342342342");
obj1.setDeliveryCode("STO");
obj1.setThrowingWeight("23.34");
LogisticsExpressCollectSyncRequest.TmsCollectFeatureDTO obj2 = new LogisticsExpressCollectSyncRequest.TmsCollectFeatureDTO();
obj2.setSubMailNo("23423242");
obj1.setFeature(obj2);
List<LogisticsExpressCollectSyncRequest.TmsPhoneCallInfoDTO> list4 = new ArrayList<LogisticsExpressCollectSyncRequest.TmsPhoneCallInfoDTO>();
LogisticsExpressCollectSyncRequest.TmsPhoneCallInfoDTO obj5 = new LogisticsExpressCollectSyncRequest.TmsPhoneCallInfoDTO();
list4.add(obj5);
obj5.setPhoneCallOperatorName("张三");
obj5.setPhoneCallOperatorPhone("12345678911");
obj5.setPhoneCallConsumerPhone("12345678911");
obj5.setPhoneCallResultRemark("消费者电联需求描述");
obj5.setConnectionStatus("NOT _CONNECT");
obj5.setCallTime("2023-12-30 12:00:00");
obj5.setConnectTime("2023-12-30 12:00:00");
obj5.setHangUpTime("2023-12-30 12:00:00");
obj5.setConnectTimeLength(10L);
obj5.setPhoneCallType("NORMAL");
obj5.setHangUpType("CUSTOMER_HAND_UP");
obj5.setPhoneChatUrl("https://**.com");
obj1.setPhoneCallInfos(list4);
List<LogisticsExpressCollectSyncRequest.TmsExtendOperateInfosDTO> list7 = new ArrayList<LogisticsExpressCollectSyncRequest.TmsExtendOperateInfosDTO>();
LogisticsExpressCollectSyncRequest.TmsExtendOperateInfosDTO obj8 = new LogisticsExpressCollectSyncRequest.TmsExtendOperateInfosDTO();
list7.add(obj8);
obj8.setOperateType("UpdateAddress");
obj8.setOperateTime("2023-12-30 12:00:00");
obj8.setOperateDetail("内容");
obj1.setExtendOperateInfos(list7);
obj1.setWeightIsVerified("1");
req.setTmsCollectRequest(obj1);
LogisticsExpressCollectSyncResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
LogisticsExpressCollectSyncRequest req = new LogisticsExpressCollectSyncRequest();
LogisticsExpressCollectSyncRequest.TmsCollectRequestDomain obj1 = new LogisticsExpressCollectSyncRequest.TmsCollectRequestDomain();
obj1.ServiceType = "1";
obj1.MailNo = "SF23434";
obj1.PicUrl = "https://img.alicdn.com/134";
obj1.BizCode = "234234234";
obj1.Length = "12.34";
obj1.Width = "10.52";
obj1.ServiceFlag = "1";
obj1.Weight = "23.43";
obj1.TmsCpCode = "SF";
obj1.EstimateFee = "23344";
obj1.ChargedWeight = "3434";
obj1.Height = "23.34";
obj1.SupplierId = "2342342342";
obj1.DeliveryCode = "STO";
obj1.ThrowingWeight = "23.34";
LogisticsExpressCollectSyncRequest.TmsCollectFeatureDTODomain obj2 = new LogisticsExpressCollectSyncRequest.TmsCollectFeatureDTODomain();
obj2.SubMailNo = "23423242";
obj1.Feature= obj2;
List<LogisticsExpressCollectSyncRequest.TmsPhoneCallInfoDTODomain> list4 = new List<LogisticsExpressCollectSyncRequest.TmsPhoneCallInfoDTODomain>();
LogisticsExpressCollectSyncRequest.TmsPhoneCallInfoDTODomain obj5 = new LogisticsExpressCollectSyncRequest.TmsPhoneCallInfoDTODomain();
list4.Add(obj5);
obj5.PhoneCallOperatorName = "张三";
obj5.PhoneCallOperatorPhone = "12345678911";
obj5.PhoneCallConsumerPhone = "12345678911";
obj5.PhoneCallResultRemark = "消费者电联需求描述";
obj5.ConnectionStatus = "NOT _CONNECT";
obj5.CallTime = "2023-12-30 12:00:00";
obj5.ConnectTime = "2023-12-30 12:00:00";
obj5.HangUpTime = "2023-12-30 12:00:00";
obj5.ConnectTimeLength = 10L;
obj5.PhoneCallType = "NORMAL";
obj5.HangUpType = "CUSTOMER_HAND_UP";
obj5.PhoneChatUrl = "https://**.com";
obj1.PhoneCallInfos= list4;
List<LogisticsExpressCollectSyncRequest.TmsExtendOperateInfosDTODomain> list7 = new List<LogisticsExpressCollectSyncRequest.TmsExtendOperateInfosDTODomain>();
LogisticsExpressCollectSyncRequest.TmsExtendOperateInfosDTODomain obj8 = new LogisticsExpressCollectSyncRequest.TmsExtendOperateInfosDTODomain();
list7.Add(obj8);
obj8.OperateType = "UpdateAddress";
obj8.OperateTime = "2023-12-30 12:00:00";
obj8.OperateDetail = "内容";
obj1.ExtendOperateInfos= list7;
obj1.WeightIsVerified = "1";
req.TmsCollectRequest_ = obj1;
LogisticsExpressCollectSyncResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new LogisticsExpressCollectSyncRequest;
$tms_collect_request = new TmsCollectRequest;
$tms_collect_request->service_type="1";
$tms_collect_request->mail_no="SF23434";
$tms_collect_request->pic_url="https://img.alicdn.com/134";
$tms_collect_request->biz_code="234234234";
$tms_collect_request->length="12.34";
$tms_collect_request->width="10.52";
$tms_collect_request->service_flag="1";
$tms_collect_request->weight="23.43";
$tms_collect_request->tms_cp_code="SF";
$tms_collect_request->estimate_fee="23344";
$tms_collect_request->charged_weight="3434";
$tms_collect_request->height="23.34";
$tms_collect_request->supplier_id="2342342342";
$tms_collect_request->delivery_code="STO";
$tms_collect_request->throwing_weight="23.34";
$feature = new TmsCollectFeatureDTO;
$feature->sub_mail_no="23423242";
$tms_collect_request->feature = $feature;
$phone_call_infos = new TmsPhoneCallInfoDTO;
$phone_call_infos->phone_call_operator_name="张三";
$phone_call_infos->phone_call_operator_phone="12345678911";
$phone_call_infos->phone_call_consumer_phone="12345678911";
$phone_call_infos->phone_call_result_remark="消费者电联需求描述";
$phone_call_infos->connection_status="NOT _CONNECT";
$phone_call_infos->call_time="2023-12-30 12:00:00";
$phone_call_infos->connect_time="2023-12-30 12:00:00";
$phone_call_infos->hang_up_time="2023-12-30 12:00:00";
$phone_call_infos->connect_time_length="10";
$phone_call_infos->phone_call_type="NORMAL";
$phone_call_infos->hang_up_type="CUSTOMER_HAND_UP";
$phone_call_infos->phone_chat_url="https://**.com";
$tms_collect_request->phone_call_infos = $phone_call_infos;
$extend_operate_infos = new TmsExtendOperateInfosDTO;
$extend_operate_infos->operate_type="UpdateAddress";
$extend_operate_infos->operate_time="2023-12-30 12:00:00";
$extend_operate_infos->operate_detail="内容";
$tms_collect_request->extend_operate_infos = $extend_operate_infos;
$tms_collect_request->weight_is_verified="1";
$req->setTmsCollectRequest(json_encode($tms_collect_request));
$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.express.collect.sync' \
-d 'partner_id=apidoc' \
-d 'sign=63C138C5BE76105A03A597B438D5B9FB' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-21+16%3A20%3A22' \
-d 'v=2.0' \
-d 'tms_collect_request=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.LogisticsExpressCollectSyncRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.tms_collect_request="数据结构示例JSON格式"
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.express.collect.sync");
add_param(pRequest,"tms_collect_request","数据结构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.express.collect.sync', {
'tms_collect_request':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})