TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaDchainIsvInventoryAicBatchMerchantSyncRequest req = new AlibabaDchainIsvInventoryAicBatchMerchantSyncRequest();
AlibabaDchainIsvInventoryAicBatchMerchantSyncRequest.MerchantBatchInventorySyncRequest obj1 = new AlibabaDchainIsvInventoryAicBatchMerchantSyncRequest.MerchantBatchInventorySyncRequest();
obj1.setInventoryType(1L);
List<AlibabaDchainIsvInventoryAicBatchMerchantSyncRequest.ValidityPeriodBatchDTO> list3 = new ArrayList<AlibabaDchainIsvInventoryAicBatchMerchantSyncRequest.ValidityPeriodBatchDTO>();
AlibabaDchainIsvInventoryAicBatchMerchantSyncRequest.ValidityPeriodBatchDTO obj4 = new AlibabaDchainIsvInventoryAicBatchMerchantSyncRequest.ValidityPeriodBatchDTO();
list3.add(obj4);
obj4.setOverdueDate(StringUtils.parseDateTime("2025-05-20 00:00:00"));
obj4.setAvailableQuantity("10");
obj4.setProduceDate(StringUtils.parseDateTime("2025-05-10 00:00:00"));
obj4.setTotalQuantity("10");
obj4.setOriginPlace("杭州");
obj4.setBatchCode("LX023");
obj4.setInboundDate(StringUtils.parseDateTime("2025-05-10 00:00:00"));
obj4.setOriginCountry("中国");
obj4.setLockQuantity("0");
obj4.setProductionNo("20250523");
obj4.setVersion("0");
obj4.setShelfLifeDay(10L);
obj1.setValidityPeriodBatchList(list3);
obj1.setSupplierId(1000000303132766L);
obj1.setOperationCode("operation_code");
obj1.setSyncDate("2025-05-23");
obj1.setScItemId(863853383171L);
obj1.setOuterId("wanjian1734485682449");
obj1.setSyncType(1L);
obj1.setUserId(2247532213L);
obj1.setStoreCode("RMCWym0937");
req.setMerchantBatchInventorySyncRequest(obj1);
AlibabaDchainIsvInventoryAicBatchMerchantSyncResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaDchainIsvInventoryAicBatchMerchantSyncRequest req = new AlibabaDchainIsvInventoryAicBatchMerchantSyncRequest();
AlibabaDchainIsvInventoryAicBatchMerchantSyncRequest.MerchantBatchInventorySyncRequestDomain obj1 = new AlibabaDchainIsvInventoryAicBatchMerchantSyncRequest.MerchantBatchInventorySyncRequestDomain();
obj1.InventoryType = 1L;
List<AlibabaDchainIsvInventoryAicBatchMerchantSyncRequest.ValidityPeriodBatchDTODomain> list3 = new List<AlibabaDchainIsvInventoryAicBatchMerchantSyncRequest.ValidityPeriodBatchDTODomain>();
AlibabaDchainIsvInventoryAicBatchMerchantSyncRequest.ValidityPeriodBatchDTODomain obj4 = new AlibabaDchainIsvInventoryAicBatchMerchantSyncRequest.ValidityPeriodBatchDTODomain();
list3.Add(obj4);
obj4.OverdueDate = DateTime.Parse(2025-05-20 00:00:00");
obj4.AvailableQuantity = "10";
obj4.ProduceDate = DateTime.Parse(2025-05-10 00:00:00");
obj4.TotalQuantity = "10";
obj4.OriginPlace = "杭州";
obj4.BatchCode = "LX023";
obj4.InboundDate = DateTime.Parse(2025-05-10 00:00:00");
obj4.OriginCountry = "中国";
obj4.LockQuantity = "0";
obj4.ProductionNo = "20250523";
obj4.Version = "0";
obj4.ShelfLifeDay = 10L;
obj1.ValidityPeriodBatchList= list3;
obj1.SupplierId = 1000000303132766L;
obj1.OperationCode = "operation_code";
obj1.SyncDate = "2025-05-23";
obj1.ScItemId = 863853383171L;
obj1.OuterId = "wanjian1734485682449";
obj1.SyncType = 1L;
obj1.UserId = 2247532213L;
obj1.StoreCode = "RMCWym0937";
req.MerchantBatchInventorySyncRequest_ = obj1;
AlibabaDchainIsvInventoryAicBatchMerchantSyncResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaDchainIsvInventoryAicBatchMerchantSyncRequest;
$merchant_batch_inventory_sync_request = new MerchantBatchInventorySyncRequest;
$merchant_batch_inventory_sync_request->inventory_type="1";
$validity_period_batch_list = new ValidityPeriodBatchDTO;
$validity_period_batch_list->overdue_date="2025-05-20 00:00:00";
$validity_period_batch_list->available_quantity="10";
$validity_period_batch_list->produce_date="2025-05-10 00:00:00";
$validity_period_batch_list->total_quantity="10";
$validity_period_batch_list->origin_place="杭州";
$validity_period_batch_list->batch_code="LX023";
$validity_period_batch_list->inbound_date="2025-05-10 00:00:00";
$validity_period_batch_list->origin_country="中国";
$validity_period_batch_list->lock_quantity="0";
$validity_period_batch_list->production_no="20250523";
$validity_period_batch_list->version="0";
$validity_period_batch_list->shelf_life_day="10";
$merchant_batch_inventory_sync_request->validity_period_batch_list = $validity_period_batch_list;
$merchant_batch_inventory_sync_request->supplier_id="1000000303132766";
$merchant_batch_inventory_sync_request->operation_code="operation_code";
$merchant_batch_inventory_sync_request->sync_date="2025-05-23";
$merchant_batch_inventory_sync_request->sc_item_id="863853383171";
$merchant_batch_inventory_sync_request->outer_id="wanjian1734485682449";
$merchant_batch_inventory_sync_request->sync_type="1";
$merchant_batch_inventory_sync_request->user_id="2247532213";
$merchant_batch_inventory_sync_request->store_code="RMCWym0937";
$req->setMerchantBatchInventorySyncRequest(json_encode($merchant_batch_inventory_sync_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.dchain.isv.inventory.aic.batch.merchant.sync' \
-d 'partner_id=apidoc' \
-d 'session=04ba2e5c-79f4-456b-a3ba-4c7043e6edb6' \
-d 'sign=A95D25F7E9BE4B2649DE2D28DEA89EA9' \
-d 'sign_method=hmac' \
-d 'timestamp=2026-04-04+09%3A46%3A20' \
-d 'v=2.0' \
-d 'merchant_batch_inventory_sync_request=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaDchainIsvInventoryAicBatchMerchantSyncRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.merchant_batch_inventory_sync_request="数据结构示例JSON格式"
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.dchain.isv.inventory.aic.batch.merchant.sync");
add_param(pRequest,"merchant_batch_inventory_sync_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',
'url': 'http://gw.api.taobao.com/router/rest'
});
client.execute('alibaba.dchain.isv.inventory.aic.batch.merchant.sync', {
'merchant_batch_inventory_sync_request':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})