TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaSellerOrderShippingBatchModifyRequest req = new AlibabaSellerOrderShippingBatchModifyRequest();
AlibabaSellerOrderShippingBatchModifyRequest.OneBatchModifyRequest obj1 = new AlibabaSellerOrderShippingBatchModifyRequest.OneBatchModifyRequest();
obj1.setBatchId(1232L);
List<AlibabaSellerOrderShippingBatchModifyRequest.Goods> list3 = new ArrayList<AlibabaSellerOrderShippingBatchModifyRequest.Goods>();
AlibabaSellerOrderShippingBatchModifyRequest.Goods obj4 = new AlibabaSellerOrderShippingBatchModifyRequest.Goods();
list3.add(obj4);
obj4.setProductId("1223");
obj4.setQuantity("11");
obj1.setGoods(list3);
AlibabaSellerOrderShippingBatchModifyRequest.ShippingRequest obj5 = new AlibabaSellerOrderShippingBatchModifyRequest.ShippingRequest();
List<AlibabaSellerOrderShippingBatchModifyRequest.Attachment> list7 = new ArrayList<AlibabaSellerOrderShippingBatchModifyRequest.Attachment>();
AlibabaSellerOrderShippingBatchModifyRequest.Attachment obj8 = new AlibabaSellerOrderShippingBatchModifyRequest.Attachment();
list7.add(obj8);
obj8.setFileName("test.jpg");
obj8.setFilePath("xxxxxxxxxxx");
obj5.setAttachments(list7);
obj5.setLogisticsType("EXPRESS");
obj5.setServiceProvider("DHL");
obj5.setTrackingNumber("123432");
obj5.setTradeId("111");
obj1.setShippingRequest(obj5);
obj1.setTradeId("111");
req.setParamOneBatchModifyRequest(obj1);
AlibabaSellerOrderShippingBatchModifyResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaSellerOrderShippingBatchModifyRequest req = new AlibabaSellerOrderShippingBatchModifyRequest();
AlibabaSellerOrderShippingBatchModifyRequest.OneBatchModifyRequestDomain obj1 = new AlibabaSellerOrderShippingBatchModifyRequest.OneBatchModifyRequestDomain();
obj1.BatchId = 1232L;
List<AlibabaSellerOrderShippingBatchModifyRequest.GoodsDomain> list3 = new List<AlibabaSellerOrderShippingBatchModifyRequest.GoodsDomain>();
AlibabaSellerOrderShippingBatchModifyRequest.GoodsDomain obj4 = new AlibabaSellerOrderShippingBatchModifyRequest.GoodsDomain();
list3.Add(obj4);
obj4.ProductId = "1223";
obj4.Quantity = "11";
obj1.Goods= list3;
AlibabaSellerOrderShippingBatchModifyRequest.ShippingRequestDomain obj5 = new AlibabaSellerOrderShippingBatchModifyRequest.ShippingRequestDomain();
List<AlibabaSellerOrderShippingBatchModifyRequest.AttachmentDomain> list7 = new List<AlibabaSellerOrderShippingBatchModifyRequest.AttachmentDomain>();
AlibabaSellerOrderShippingBatchModifyRequest.AttachmentDomain obj8 = new AlibabaSellerOrderShippingBatchModifyRequest.AttachmentDomain();
list7.Add(obj8);
obj8.FileName = "test.jpg";
obj8.FilePath = "xxxxxxxxxxx";
obj5.Attachments= list7;
obj5.LogisticsType = "EXPRESS";
obj5.ServiceProvider = "DHL";
obj5.TrackingNumber = "123432";
obj5.TradeId = "111";
obj1.ShippingRequest= obj5;
obj1.TradeId = "111";
req.ParamOneBatchModifyRequest_ = obj1;
AlibabaSellerOrderShippingBatchModifyResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaSellerOrderShippingBatchModifyRequest;
$param_one_batch_modify_request = new OneBatchModifyRequest;
$param_one_batch_modify_request->batch_id="1232";
$goods = new Goods;
$goods->product_id="1223";
$goods->quantity="11";
$param_one_batch_modify_request->goods = $goods;
$shipping_request = new ShippingRequest;
$attachments = new Attachment;
$attachments->file_name="test.jpg";
$attachments->file_path="xxxxxxxxxxx";
$shipping_request->attachments = $attachments;
$shipping_request->logistics_type="EXPRESS";
$shipping_request->service_provider="DHL";
$shipping_request->tracking_number="123432";
$shipping_request->trade_id="111";
$param_one_batch_modify_request->shipping_request = $shipping_request;
$param_one_batch_modify_request->trade_id="111";
$req->setParamOneBatchModifyRequest(json_encode($param_one_batch_modify_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.batch.modify' \
-d 'partner_id=apidoc' \
-d 'session=1eb7547a-1062-4f93-81d7-013af69ce89c' \
-d 'sign=FA6A471C34141BC980640DEBD046FA21' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-22+05%3A07%3A17' \
-d 'v=2.0' \
-d 'param_one_batch_modify_request=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaSellerOrderShippingBatchModifyRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param_one_batch_modify_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.batch.modify");
add_param(pRequest,"param_one_batch_modify_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.batch.modify', {
'param_one_batch_modify_request':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})