TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AliexpressSolutionBatchProductInventoryUpdateRequest req = new AliexpressSolutionBatchProductInventoryUpdateRequest();
List<AliexpressSolutionBatchProductInventoryUpdateRequest.SynchronizeProductRequestDto> list2 = new ArrayList<AliexpressSolutionBatchProductInventoryUpdateRequest.SynchronizeProductRequestDto>();
AliexpressSolutionBatchProductInventoryUpdateRequest.SynchronizeProductRequestDto obj3 = new AliexpressSolutionBatchProductInventoryUpdateRequest.SynchronizeProductRequestDto();
list2.add(obj3);
obj3.setProductId(1000005237852L);
List<AliexpressSolutionBatchProductInventoryUpdateRequest.SynchronizeSkuRequestDto> list6 = new ArrayList<AliexpressSolutionBatchProductInventoryUpdateRequest.SynchronizeSkuRequestDto>();
AliexpressSolutionBatchProductInventoryUpdateRequest.SynchronizeSkuRequestDto obj7 = new AliexpressSolutionBatchProductInventoryUpdateRequest.SynchronizeSkuRequestDto();
list6.add(obj7);
obj7.setSkuCode("123abc");
obj7.setInventory(99L);
list4.setMultipleSkuUpdateList(list6);
req.setMutipleProductUpdateList(list2);
AliexpressSolutionBatchProductInventoryUpdateResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AliexpressSolutionBatchProductInventoryUpdateRequest req = new AliexpressSolutionBatchProductInventoryUpdateRequest();
List<AliexpressSolutionBatchProductInventoryUpdateRequest.SynchronizeProductRequestDtoDomain> list2 = new List<AliexpressSolutionBatchProductInventoryUpdateRequest.SynchronizeProductRequestDtoDomain>();
AliexpressSolutionBatchProductInventoryUpdateRequest.SynchronizeProductRequestDtoDomain obj3 = new AliexpressSolutionBatchProductInventoryUpdateRequest.SynchronizeProductRequestDtoDomain();
list2.Add(obj3);
obj3.ProductId = 1000005237852L;
List<AliexpressSolutionBatchProductInventoryUpdateRequest.SynchronizeSkuRequestDtoDomain> list5 = new List<AliexpressSolutionBatchProductInventoryUpdateRequest.SynchronizeSkuRequestDtoDomain>();
AliexpressSolutionBatchProductInventoryUpdateRequest.SynchronizeSkuRequestDtoDomain obj6 = new AliexpressSolutionBatchProductInventoryUpdateRequest.SynchronizeSkuRequestDtoDomain();
list5.Add(obj6);
obj6.SkuCode = "123abc";
obj6.Inventory = 99L;
obj3.MultipleSkuUpdateList= list5;
req.MutipleProductUpdateList_ = list2;
AliexpressSolutionBatchProductInventoryUpdateResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AliexpressSolutionBatchProductInventoryUpdateRequest;
$mutiple_product_update_list = new SynchronizeProductRequestDto;
$mutiple_product_update_list->product_id="1000005237852";
$multiple_sku_update_list = new SynchronizeSkuRequestDto;
$multiple_sku_update_list->sku_code="123abc";
$multiple_sku_update_list->inventory="99";
$mutiple_product_update_list->multiple_sku_update_list = $multiple_sku_update_list;
$req->setMutipleProductUpdateList(json_encode($mutiple_product_update_list));
$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=aliexpress.solution.batch.product.inventory.update' \
-d 'partner_id=apidoc' \
-d 'session=146634c2-d2b5-4935-84ce-23400e6dccd8' \
-d 'sign=6943F9355A4DE8F633FBA1573FC08821' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-30+01%3A20%3A45' \
-d 'v=2.0' \
-d 'mutiple_product_update_list=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AliexpressSolutionBatchProductInventoryUpdateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.mutiple_product_update_list=""
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,"aliexpress.solution.batch.product.inventory.update");
add_param(pRequest,"mutiple_product_update_list","数据结构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('aliexpress.solution.batch.product.inventory.update', {
'mutiple_product_update_list':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})