TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TfxProductPriceSetRequest req = new TfxProductPriceSetRequest();
TfxProductPriceSetRequest.HwzgProdcutOptPriceReq obj1 = new TfxProductPriceSetRequest.HwzgProdcutOptPriceReq();
obj1.setSellerId(274736112L);
obj1.setChannelCode("taofxMarket");
obj1.setSubChannelCode("taofxMarket_taobao");
obj1.setProductId(677762926412L);
obj1.setCostPrice("9.99");
obj1.setPriceRatio("1.1");
List<TfxProductPriceSetRequest.HwzgProdcutSkuOptPrice> list3 = new ArrayList<TfxProductPriceSetRequest.HwzgProdcutSkuOptPrice>();
TfxProductPriceSetRequest.HwzgProdcutSkuOptPrice obj4 = new TfxProductPriceSetRequest.HwzgProdcutSkuOptPrice();
list3.add(obj4);
obj4.setSkuId(5222217587024L);
obj4.setOuterSkuId("D25-3680012");
obj4.setPriceRatio("1.1");
obj4.setCostPrice("9.99");
obj1.setSkuPriceInfo(list3);
req.setHwzgProdcutOptPriceReq(obj1);
TfxProductPriceSetResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TfxProductPriceSetRequest req = new TfxProductPriceSetRequest();
TfxProductPriceSetRequest.HwzgProdcutOptPriceReqDomain obj1 = new TfxProductPriceSetRequest.HwzgProdcutOptPriceReqDomain();
obj1.SellerId = 274736112L;
obj1.ChannelCode = "taofxMarket";
obj1.SubChannelCode = "taofxMarket_taobao";
obj1.ProductId = 677762926412L;
obj1.CostPrice = "9.99";
obj1.PriceRatio = "1.1";
List<TfxProductPriceSetRequest.HwzgProdcutSkuOptPriceDomain> list3 = new List<TfxProductPriceSetRequest.HwzgProdcutSkuOptPriceDomain>();
TfxProductPriceSetRequest.HwzgProdcutSkuOptPriceDomain obj4 = new TfxProductPriceSetRequest.HwzgProdcutSkuOptPriceDomain();
list3.Add(obj4);
obj4.SkuId = 5222217587024L;
obj4.OuterSkuId = "D25-3680012";
obj4.PriceRatio = "1.1";
obj4.CostPrice = "9.99";
obj1.SkuPriceInfo= list3;
req.HwzgProdcutOptPriceReq_ = obj1;
TfxProductPriceSetResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TfxProductPriceSetRequest;
$hwzg_prodcut_opt_price_req = new HwzgProdcutOptPriceReq;
$hwzg_prodcut_opt_price_req->seller_id="274736112";
$hwzg_prodcut_opt_price_req->channel_code="taofxMarket";
$hwzg_prodcut_opt_price_req->sub_channel_code="taofxMarket_taobao";
$hwzg_prodcut_opt_price_req->product_id="677762926412";
$hwzg_prodcut_opt_price_req->cost_price="9.99";
$hwzg_prodcut_opt_price_req->price_ratio="1.1";
$sku_price_info = new HwzgProdcutSkuOptPrice;
$sku_price_info->sku_id="5222217587024";
$sku_price_info->outer_sku_id="D25-3680012";
$sku_price_info->price_ratio="1.1";
$sku_price_info->cost_price="9.99";
$hwzg_prodcut_opt_price_req->sku_price_info = $sku_price_info;
$req->setHwzgProdcutOptPriceReq(json_encode($hwzg_prodcut_opt_price_req));
$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=taobao.tfx.product.price.set' \
-d 'partner_id=apidoc' \
-d 'session=9b29ad68-62c2-4b6a-b472-baf81675fb06' \
-d 'sign=B8839F54B6D157963AF8629DF70562A2' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-25+17%3A12%3A29' \
-d 'v=2.0' \
-d 'hwzg_prodcut_opt_price_req=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TfxProductPriceSetRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.hwzg_prodcut_opt_price_req="数据结构示例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,"taobao.tfx.product.price.set");
add_param(pRequest,"hwzg_prodcut_opt_price_req","数据结构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('taobao.tfx.product.price.set', {
'hwzg_prodcut_opt_price_req':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})