TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
RhinoIntegrationCraftsProductSyncRequest req = new RhinoIntegrationCraftsProductSyncRequest();
RhinoIntegrationCraftsProductSyncRequest.SyncProductReq obj1 = new RhinoIntegrationCraftsProductSyncRequest.SyncProductReq();
obj1.setBizIdCategory("3428438-rhino_turing");
obj1.setCraftId(1001L);
obj1.setProductName("产品1");
obj1.setMerchantName("测试");
obj1.setOuterBusinessNum("P10001");
obj1.setCreateBy("zhang");
obj1.setEnterpriseSourceId("10007");
obj1.setMerchantId(1L);
obj1.setProductPicture("data:image/png");
obj1.setContractNum("CN1001");
obj1.setSourceChannelKey("22HT23");
req.setSyncProductReq(obj1);
RhinoIntegrationCraftsProductSyncResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
RhinoIntegrationCraftsProductSyncRequest req = new RhinoIntegrationCraftsProductSyncRequest();
RhinoIntegrationCraftsProductSyncRequest.SyncProductReqDomain obj1 = new RhinoIntegrationCraftsProductSyncRequest.SyncProductReqDomain();
obj1.BizIdCategory = "3428438-rhino_turing";
obj1.CraftId = 1001L;
obj1.ProductName = "产品1";
obj1.MerchantName = "测试";
obj1.OuterBusinessNum = "P10001";
obj1.CreateBy = "zhang";
obj1.EnterpriseSourceId = "10007";
obj1.MerchantId = 1L;
obj1.ProductPicture = "data:image/png";
obj1.ContractNum = "CN1001";
obj1.SourceChannelKey = "22HT23";
req.SyncProductReq_ = obj1;
RhinoIntegrationCraftsProductSyncResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new RhinoIntegrationCraftsProductSyncRequest;
$sync_product_req = new SyncProductReq;
$sync_product_req->biz_id_category="3428438-rhino_turing";
$sync_product_req->craft_id="1001";
$sync_product_req->product_name="产品1";
$sync_product_req->merchant_name="测试";
$sync_product_req->outer_business_num="P10001";
$sync_product_req->create_by="zhang";
$sync_product_req->enterprise_source_id="10007";
$sync_product_req->merchant_id="1";
$sync_product_req->product_picture="data:image/png";
$sync_product_req->contract_num="CN1001";
$sync_product_req->source_channel_key="22HT23";
$req->setSyncProductReq(json_encode($sync_product_req));
$resp = $c->execute($req);
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=taobao.rhino.integration.crafts.product.sync' \
-d 'partner_id=apidoc' \
-d 'sign=B13E3824B3FA3D742DEFDF3446CB2115' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-28+15%3A29%3A40' \
-d 'v=2.0' \
-d 'sync_product_req=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.RhinoIntegrationCraftsProductSyncRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.sync_product_req="数据结构示例JSON格式"
try:
resp= req.getResponse()
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,"taobao.rhino.integration.crafts.product.sync");
add_param(pRequest,"sync_product_req","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,NULL);
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('taobao.rhino.integration.crafts.product.sync', {
'sync_product_req':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})