TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaSellerOrderShippingRequest req = new AlibabaSellerOrderShippingRequest();
AlibabaSellerOrderShippingRequest.ShippingRequest obj1 = new AlibabaSellerOrderShippingRequest.ShippingRequest();
obj1.setServiceProvider("xxx");
obj1.setTradeId("234532");
obj1.setLogisticsType("EXPRESS或者POST");
obj1.setTrackingNumber("213453");
List<AlibabaSellerOrderShippingRequest.Attachment> list3 = new ArrayList<AlibabaSellerOrderShippingRequest.Attachment>();
AlibabaSellerOrderShippingRequest.Attachment obj4 = new AlibabaSellerOrderShippingRequest.Attachment();
list3.add(obj4);
obj4.setFileName("test.jpg");
obj4.setFilePath("testcfsds");
obj1.setAttachments(list3);
req.setShippingRequest(obj1);
AlibabaSellerOrderShippingResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaSellerOrderShippingRequest req = new AlibabaSellerOrderShippingRequest();
AlibabaSellerOrderShippingRequest.ShippingRequestDomain obj1 = new AlibabaSellerOrderShippingRequest.ShippingRequestDomain();
obj1.ServiceProvider = "xxx";
obj1.TradeId = "234532";
obj1.LogisticsType = "EXPRESS或者POST";
obj1.TrackingNumber = "213453";
List<AlibabaSellerOrderShippingRequest.AttachmentDomain> list3 = new List<AlibabaSellerOrderShippingRequest.AttachmentDomain>();
AlibabaSellerOrderShippingRequest.AttachmentDomain obj4 = new AlibabaSellerOrderShippingRequest.AttachmentDomain();
list3.Add(obj4);
obj4.FileName = "test.jpg";
obj4.FilePath = "testcfsds";
obj1.Attachments= list3;
req.ShippingRequest_ = obj1;
AlibabaSellerOrderShippingResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaSellerOrderShippingRequest;
$shipping_request = new ShippingRequest;
$shipping_request->service_provider="xxx";
$shipping_request->trade_id="234532";
$shipping_request->logistics_type="EXPRESS或者POST";
$shipping_request->tracking_number="213453";
$attachments = new Attachment;
$attachments->file_name="test.jpg";
$attachments->file_path="testcfsds";
$shipping_request->attachments = $attachments;
$req->setShippingRequest(json_encode($shipping_request));
$resp = $c->execute($req, $sessionKey);
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.seller.order.shipping' \
-d 'partner_id=apidoc' \
-d 'session=591b53c9-d8f5-487d-912b-a5ccc22617b0' \
-d 'sign=7C0AB9E6F31923FC31F2B641E327D9C0' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-22+05%3A16%3A15' \
-d 'v=2.0' \
-d 'shipping_request=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaSellerOrderShippingRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.shipping_request=""
try:
resp= req.getResponse(sessionkey)
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.seller.order.shipping");
add_param(pRequest,"shipping_request","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,sessionKey);
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.seller.order.shipping', {
'shipping_request':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})