TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
CainiaoCntecSupplierItemSaveitempriceRequest req = new CainiaoCntecSupplierItemSaveitempriceRequest();
CainiaoCntecSupplierItemSaveitempriceRequest.SubItemPriceSyncDto obj1 = new CainiaoCntecSupplierItemSaveitempriceRequest.SubItemPriceSyncDto();
obj1.setSupplierCode("DRF");
obj1.setOutStoreId("1001");
obj1.setSupplierPriceType(0L);
obj1.setSupplierPrice(1100L);
obj1.setPriceIndication("123132");
obj1.setValidTime(1618562701112L);
obj1.setInvalidTime(1618562701112L);
obj1.setFeature("{\"product_item\":\"商品名称\",\"product_quantity\":\"商品数量\"}");
obj1.setOutItemId("12312321");
req.setSubItemPriceSync(obj1);
CainiaoCntecSupplierItemSaveitempriceResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
CainiaoCntecSupplierItemSaveitempriceRequest req = new CainiaoCntecSupplierItemSaveitempriceRequest();
CainiaoCntecSupplierItemSaveitempriceRequest.SubItemPriceSyncDtoDomain obj1 = new CainiaoCntecSupplierItemSaveitempriceRequest.SubItemPriceSyncDtoDomain();
obj1.SupplierCode = "DRF";
obj1.OutStoreId = "1001";
obj1.SupplierPriceType = 0L;
obj1.SupplierPrice = 1100L;
obj1.PriceIndication = "123132";
obj1.ValidTime = 1618562701112L;
obj1.InvalidTime = 1618562701112L;
obj1.Feature = "{\"product_item\":\"商品名称\",\"product_quantity\":\"商品数量\"}";
obj1.OutItemId = "12312321";
req.SubItemPriceSync_ = obj1;
CainiaoCntecSupplierItemSaveitempriceResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new CainiaoCntecSupplierItemSaveitempriceRequest;
$sub_item_price_sync = new SubItemPriceSyncDto;
$sub_item_price_sync->supplier_code="DRF";
$sub_item_price_sync->out_store_id="1001";
$sub_item_price_sync->supplier_price_type="0";
$sub_item_price_sync->supplier_price="1100";
$sub_item_price_sync->price_indication="123132";
$sub_item_price_sync->valid_time="1618562701112";
$sub_item_price_sync->invalid_time="1618562701112";
$sub_item_price_sync->feature="{\"product_item\":\"商品名称\",\"product_quantity\":\"商品数量\"}";
$sub_item_price_sync->out_item_id="12312321";
$req->setSubItemPriceSync(json_encode($sub_item_price_sync));
$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.item.saveitemprice' \
-d 'partner_id=apidoc' \
-d 'sign=CFC5790F6AA6BA042B3A75ED41870DB9' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-28+17%3A44%3A13' \
-d 'v=2.0' \
-d 'sub_item_price_sync=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.CainiaoCntecSupplierItemSaveitempriceRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.sub_item_price_sync=""
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.item.saveitemprice");
add_param(pRequest,"sub_item_price_sync","数据结构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.item.saveitemprice', {
'sub_item_price_sync':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})