TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaSellerOrderMultiShippingRequest req = new AlibabaSellerOrderMultiShippingRequest();
AlibabaSellerOrderMultiShippingRequest.MultiShippingCreateRequest obj1 = new AlibabaSellerOrderMultiShippingRequest.MultiShippingCreateRequest();
List<AlibabaSellerOrderMultiShippingRequest.OneBatchCreateRequest> list3 = new ArrayList<AlibabaSellerOrderMultiShippingRequest.OneBatchCreateRequest>();
AlibabaSellerOrderMultiShippingRequest.OneBatchCreateRequest obj4 = new AlibabaSellerOrderMultiShippingRequest.OneBatchCreateRequest();
list3.add(obj4);
List<AlibabaSellerOrderMultiShippingRequest.Goods> list7 = new ArrayList<AlibabaSellerOrderMultiShippingRequest.Goods>();
AlibabaSellerOrderMultiShippingRequest.Goods obj8 = new AlibabaSellerOrderMultiShippingRequest.Goods();
list7.add(obj8);
obj8.setProductId("123454");
obj8.setQuantity("10");
list5.setGoods(list7);
AlibabaSellerOrderMultiShippingRequest.ShippingRequest obj10 = new AlibabaSellerOrderMultiShippingRequest.ShippingRequest();
List<AlibabaSellerOrderMultiShippingRequest.Attachment> list12 = new ArrayList<AlibabaSellerOrderMultiShippingRequest.Attachment>();
AlibabaSellerOrderMultiShippingRequest.Attachment obj13 = new AlibabaSellerOrderMultiShippingRequest.Attachment();
list12.add(obj13);
obj13.setFileName("test.jpg");
obj13.setFilePath("gfhfgdsadfghfd");
obj10.setAttachments(list12);
obj10.setLogisticsType("EXPRESS或者POST");
obj10.setServiceProvider("DHL");
obj10.setTrackingNumber("23454234");
obj10.setTradeId("123441");
list9.setShippingRequest(obj10);
obj1.setRequests(list3);
obj1.setTradeId("123441");
req.setParamMultiShippingCreateRequest(obj1);
AlibabaSellerOrderMultiShippingResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaSellerOrderMultiShippingRequest req = new AlibabaSellerOrderMultiShippingRequest();
AlibabaSellerOrderMultiShippingRequest.MultiShippingCreateRequestDomain obj1 = new AlibabaSellerOrderMultiShippingRequest.MultiShippingCreateRequestDomain();
List<AlibabaSellerOrderMultiShippingRequest.OneBatchCreateRequestDomain> list3 = new List<AlibabaSellerOrderMultiShippingRequest.OneBatchCreateRequestDomain>();
AlibabaSellerOrderMultiShippingRequest.OneBatchCreateRequestDomain obj4 = new AlibabaSellerOrderMultiShippingRequest.OneBatchCreateRequestDomain();
list3.Add(obj4);
List<AlibabaSellerOrderMultiShippingRequest.GoodsDomain> list6 = new List<AlibabaSellerOrderMultiShippingRequest.GoodsDomain>();
AlibabaSellerOrderMultiShippingRequest.GoodsDomain obj7 = new AlibabaSellerOrderMultiShippingRequest.GoodsDomain();
list6.Add(obj7);
obj7.ProductId = "123454";
obj7.Quantity = "10";
obj4.Goods= list6;
AlibabaSellerOrderMultiShippingRequest.ShippingRequestDomain obj8 = new AlibabaSellerOrderMultiShippingRequest.ShippingRequestDomain();
List<AlibabaSellerOrderMultiShippingRequest.AttachmentDomain> list10 = new List<AlibabaSellerOrderMultiShippingRequest.AttachmentDomain>();
AlibabaSellerOrderMultiShippingRequest.AttachmentDomain obj11 = new AlibabaSellerOrderMultiShippingRequest.AttachmentDomain();
list10.Add(obj11);
obj11.FileName = "test.jpg";
obj11.FilePath = "gfhfgdsadfghfd";
obj8.Attachments= list10;
obj8.LogisticsType = "EXPRESS或者POST";
obj8.ServiceProvider = "DHL";
obj8.TrackingNumber = "23454234";
obj8.TradeId = "123441";
obj4.ShippingRequest= obj8;
obj1.Requests= list3;
obj1.TradeId = "123441";
req.ParamMultiShippingCreateRequest_ = obj1;
AlibabaSellerOrderMultiShippingResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaSellerOrderMultiShippingRequest;
$param_multi_shipping_create_request = new MultiShippingCreateRequest;
$requests = new OneBatchCreateRequest;
$goods = new Goods;
$goods->product_id="123454";
$goods->quantity="10";
$requests->goods = $goods;
$shipping_request = new ShippingRequest;
$attachments = new Attachment;
$attachments->file_name="test.jpg";
$attachments->file_path="gfhfgdsadfghfd";
$shipping_request->attachments = $attachments;
$shipping_request->logistics_type="EXPRESS或者POST";
$shipping_request->service_provider="DHL";
$shipping_request->tracking_number="23454234";
$shipping_request->trade_id="123441";
$requests->shipping_request = $shipping_request;
$param_multi_shipping_create_request->requests = $requests;
$param_multi_shipping_create_request->trade_id="123441";
$req->setParamMultiShippingCreateRequest(json_encode($param_multi_shipping_create_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.multi.shipping' \
-d 'partner_id=apidoc' \
-d 'session=ebdc7211-a702-49ef-aa2f-393137016166' \
-d 'sign=DAAF0CD3952203A7CC586E5F25B3E8EA' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-22+04%3A43%3A59' \
-d 'v=2.0' \
-d 'param_multi_shipping_create_request=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaSellerOrderMultiShippingRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param_multi_shipping_create_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.multi.shipping");
add_param(pRequest,"param_multi_shipping_create_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.multi.shipping', {
'param_multi_shipping_create_request':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})