TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAscpChannelDistributorProductSyncRequest req = new AlibabaAscpChannelDistributorProductSyncRequest();
AlibabaAscpChannelDistributorProductSyncRequest.ProductSyncDTO obj1 = new AlibabaAscpChannelDistributorProductSyncRequest.ProductSyncDTO();
obj1.setUscChannelCode("abc");
obj1.setUscSubChannelCode("abc");
obj1.setSupplierProductId(123L);
obj1.setDistributorItemId(1234L);
obj1.setSyncFieldInfoList(""title","barcode","sku","desc"");
req.setProductSyncDto(obj1);
AlibabaAscpChannelDistributorProductSyncResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaAscpChannelDistributorProductSyncRequest req = new AlibabaAscpChannelDistributorProductSyncRequest();
AlibabaAscpChannelDistributorProductSyncRequest.ProductSyncDTODomain obj1 = new AlibabaAscpChannelDistributorProductSyncRequest.ProductSyncDTODomain();
obj1.UscChannelCode = "abc";
obj1.UscSubChannelCode = "abc";
obj1.SupplierProductId = 123L;
obj1.DistributorItemId = 1234L;
obj1.SyncFieldInfoList = ""title","barcode","sku","desc"";
req.ProductSyncDto_ = obj1;
AlibabaAscpChannelDistributorProductSyncResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaAscpChannelDistributorProductSyncRequest;
$product_sync_dto = new ProductSyncDTO;
$product_sync_dto->usc_channel_code="abc";
$product_sync_dto->usc_sub_channel_code="abc";
$product_sync_dto->supplier_product_id="123";
$product_sync_dto->distributor_item_id="1234";
$product_sync_dto->sync_field_info_list="[\"title\",\"barcode\",\"sku\",\"desc\"]";
$req->setProductSyncDto(json_encode($product_sync_dto));
$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.ascp.channel.distributor.product.sync' \
-d 'partner_id=apidoc' \
-d 'session=93a21414-c042-48eb-8392-1d2818bbbc36' \
-d 'sign=270EA7F7F443121BE20D98E950A964CA' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-07-13+21%3A40%3A02' \
-d 'v=2.0' \
-d 'product_sync_dto=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaAscpChannelDistributorProductSyncRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.product_sync_dto="数据结构示例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.ascp.channel.distributor.product.sync");
add_param(pRequest,"product_sync_dto","数据结构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.ascp.channel.distributor.product.sync', {
'product_sync_dto':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})