TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaDutyfreeOrderLogisticsSyncRequest req = new AlibabaDutyfreeOrderLogisticsSyncRequest();
AlibabaDutyfreeOrderLogisticsSyncRequest.OrderLogisticSyncRequest obj1 = new AlibabaDutyfreeOrderLogisticsSyncRequest.OrderLogisticSyncRequest();
List<AlibabaDutyfreeOrderLogisticsSyncRequest.ConsignGoods> list3 = new ArrayList<AlibabaDutyfreeOrderLogisticsSyncRequest.ConsignGoods>();
AlibabaDutyfreeOrderLogisticsSyncRequest.ConsignGoods obj4 = new AlibabaDutyfreeOrderLogisticsSyncRequest.ConsignGoods();
list3.add(obj4);
obj4.setSubOrderNo(2222L);
obj4.setOuterSubOrderno("1111_f111");
obj1.setConsignGoods(list3);
obj1.setOuterMainOrderNo("外部主订单号");
List<AlibabaDutyfreeOrderLogisticsSyncRequest.LogisticsInfo> list6 = new ArrayList<AlibabaDutyfreeOrderLogisticsSyncRequest.LogisticsInfo>();
AlibabaDutyfreeOrderLogisticsSyncRequest.LogisticsInfo obj7 = new AlibabaDutyfreeOrderLogisticsSyncRequest.LogisticsInfo();
list6.add(obj7);
obj7.setCompanyCode("SF");
obj7.setLogisticsCode("SF1334444");
obj1.setLogisticsInfos(list6);
obj1.setSellerId(2223333L);
obj1.setOrderId(111L);
obj1.setConsignType(1L);
req.setOrderLogisticSyncRequest(obj1);
AlibabaDutyfreeOrderLogisticsSyncResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaDutyfreeOrderLogisticsSyncRequest req = new AlibabaDutyfreeOrderLogisticsSyncRequest();
AlibabaDutyfreeOrderLogisticsSyncRequest.OrderLogisticSyncRequestDomain obj1 = new AlibabaDutyfreeOrderLogisticsSyncRequest.OrderLogisticSyncRequestDomain();
List<AlibabaDutyfreeOrderLogisticsSyncRequest.ConsignGoodsDomain> list3 = new List<AlibabaDutyfreeOrderLogisticsSyncRequest.ConsignGoodsDomain>();
AlibabaDutyfreeOrderLogisticsSyncRequest.ConsignGoodsDomain obj4 = new AlibabaDutyfreeOrderLogisticsSyncRequest.ConsignGoodsDomain();
list3.Add(obj4);
obj4.SubOrderNo = 2222L;
obj4.OuterSubOrderno = "1111_f111";
obj1.ConsignGoods= list3;
obj1.OuterMainOrderNo = "外部主订单号";
List<AlibabaDutyfreeOrderLogisticsSyncRequest.LogisticsInfoDomain> list6 = new List<AlibabaDutyfreeOrderLogisticsSyncRequest.LogisticsInfoDomain>();
AlibabaDutyfreeOrderLogisticsSyncRequest.LogisticsInfoDomain obj7 = new AlibabaDutyfreeOrderLogisticsSyncRequest.LogisticsInfoDomain();
list6.Add(obj7);
obj7.CompanyCode = "SF";
obj7.LogisticsCode = "SF1334444";
obj1.LogisticsInfos= list6;
obj1.SellerId = 2223333L;
obj1.OrderId = 111L;
obj1.ConsignType = 1L;
req.OrderLogisticSyncRequest_ = obj1;
AlibabaDutyfreeOrderLogisticsSyncResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaDutyfreeOrderLogisticsSyncRequest;
$order_logistic_sync_request = new OrderLogisticSyncRequest;
$consign_goods = new ConsignGoods;
$consign_goods->sub_order_no="2222";
$consign_goods->outer_sub_orderno="1111_f111";
$order_logistic_sync_request->consign_goods = $consign_goods;
$order_logistic_sync_request->outer_main_order_no="外部主订单号";
$logistics_infos = new LogisticsInfo;
$logistics_infos->company_code="SF";
$logistics_infos->logistics_code="SF1334444";
$order_logistic_sync_request->logistics_infos = $logistics_infos;
$order_logistic_sync_request->seller_id="2223333";
$order_logistic_sync_request->order_id="111";
$order_logistic_sync_request->consign_type="1";
$req->setOrderLogisticSyncRequest(json_encode($order_logistic_sync_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=alibaba.dutyfree.order.logistics.sync' \
-d 'partner_id=apidoc' \
-d 'sign=A23FBB8EEFFA6DFD89E762C8DDA64D00' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-16+08%3A10%3A04' \
-d 'v=2.0' \
-d 'order_logistic_sync_request=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaDutyfreeOrderLogisticsSyncRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.order_logistic_sync_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,"alibaba.dutyfree.order.logistics.sync");
add_param(pRequest,"order_logistic_sync_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('alibaba.dutyfree.order.logistics.sync', {
'order_logistic_sync_request':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})