TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
CainiaoCntecSupplierPromotionGoodssynRequest req = new CainiaoCntecSupplierPromotionGoodssynRequest();
CainiaoCntecSupplierPromotionGoodssynRequest.CreatePromotionGoodsRequest obj1 = new CainiaoCntecSupplierPromotionGoodssynRequest.CreatePromotionGoodsRequest();
obj1.setGroupCount(1L);
obj1.setPromotionPrice(800L);
obj1.setLimitCount(10L);
obj1.setOuterStoreIds(""1001"");
obj1.setAttribute("");
obj1.setBarcode("12334");
obj1.setOuterPromotionId("11");
obj1.setPromotionSupplierPrice(600L);
req.setGoodsSynReq(obj1);
CainiaoCntecSupplierPromotionGoodssynResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
CainiaoCntecSupplierPromotionGoodssynRequest req = new CainiaoCntecSupplierPromotionGoodssynRequest();
CainiaoCntecSupplierPromotionGoodssynRequest.CreatePromotionGoodsRequestDomain obj1 = new CainiaoCntecSupplierPromotionGoodssynRequest.CreatePromotionGoodsRequestDomain();
obj1.GroupCount = 1L;
obj1.PromotionPrice = 800L;
obj1.LimitCount = 10L;
obj1.OuterStoreIds = ""1001"";
obj1.Attribute = "";
obj1.Barcode = "12334";
obj1.OuterPromotionId = "11";
obj1.PromotionSupplierPrice = 600L;
req.GoodsSynReq_ = obj1;
CainiaoCntecSupplierPromotionGoodssynResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new CainiaoCntecSupplierPromotionGoodssynRequest;
$goods_syn_req = new CreatePromotionGoodsRequest;
$goods_syn_req->group_count="1";
$goods_syn_req->promotion_price="800";
$goods_syn_req->limit_count="10";
$goods_syn_req->outer_store_ids="[\"1001\"]";
$goods_syn_req->attribute="";
$goods_syn_req->barcode="12334";
$goods_syn_req->outer_promotion_id="11";
$goods_syn_req->promotion_supplier_price="600";
$req->setGoodsSynReq(json_encode($goods_syn_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=cainiao.cntec.supplier.promotion.goodssyn' \
-d 'partner_id=apidoc' \
-d 'sign=E790F1C56AD52D64823B80776204D5AD' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-28+17%3A49%3A10' \
-d 'v=2.0' \
-d 'goods_syn_req=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.CainiaoCntecSupplierPromotionGoodssynRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.goods_syn_req=""
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,"cainiao.cntec.supplier.promotion.goodssyn");
add_param(pRequest,"goods_syn_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('cainiao.cntec.supplier.promotion.goodssyn', {
'goods_syn_req':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})