TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest req = new AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest();
AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopLimitedDiscProductInputDto obj1 = new AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopLimitedDiscProductInputDto();
obj1.setExistStoreFansDiscount("0");
List<AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopStorePromProduct> list3 = new ArrayList<AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopStorePromProduct>();
AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopStorePromProduct obj4 = new AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopStorePromProduct();
list3.add(obj4);
obj4.setBuyMaxNum(10L);
List<AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopProductDiscountInfo> list7 = new ArrayList<AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopProductDiscountInfo>();
AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopProductDiscountInfo obj8 = new AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopProductDiscountInfo();
list7.add(obj8);
obj8.setDiscount(90L);
obj8.setTerminal("MOBILE");
list5.setProductDiscountList(list7);
obj4.setProductId(1111111L);
List<AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopSkuInventoryInfo> list11 = new ArrayList<AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopSkuInventoryInfo>();
AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopSkuInventoryInfo obj12 = new AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopSkuInventoryInfo();
list11.add(obj12);
obj12.setQuantity(12L);
obj12.setSkuAttr("14:29");
list9.setSkuInventoryList(list11);
obj4.setUsedWarehouse(true);
obj1.setProductObjects(list3);
obj1.setPromotionId(1111111L);
obj1.setStoreClubDiscountRate("90");
req.setLimitedDiscProductInputDto(obj1);
AliexpressMarketingLimiteddiscountpromotionAddpromotionproductResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest req = new AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest();
AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopLimitedDiscProductInputDtoDomain obj1 = new AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopLimitedDiscProductInputDtoDomain();
obj1.ExistStoreFansDiscount = "0";
List<AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopStorePromProductDomain> list3 = new List<AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopStorePromProductDomain>();
AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopStorePromProductDomain obj4 = new AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopStorePromProductDomain();
list3.Add(obj4);
obj4.BuyMaxNum = 10L;
List<AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopProductDiscountInfoDomain> list6 = new List<AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopProductDiscountInfoDomain>();
AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopProductDiscountInfoDomain obj7 = new AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopProductDiscountInfoDomain();
list6.Add(obj7);
obj7.Discount = 90L;
obj7.Terminal = "MOBILE";
obj4.ProductDiscountList= list6;
obj4.ProductId = 1111111L;
List<AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopSkuInventoryInfoDomain> list9 = new List<AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopSkuInventoryInfoDomain>();
AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopSkuInventoryInfoDomain obj10 = new AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest.AeopSkuInventoryInfoDomain();
list9.Add(obj10);
obj10.Quantity = 12L;
obj10.SkuAttr = "14:29";
obj4.SkuInventoryList= list9;
obj4.UsedWarehouse = true;
obj1.ProductObjects= list3;
obj1.PromotionId = 1111111L;
obj1.StoreClubDiscountRate = "90";
req.LimitedDiscProductInputDto_ = obj1;
AliexpressMarketingLimiteddiscountpromotionAddpromotionproductResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest;
$limited_disc_product_input_dto = new AeopLimitedDiscProductInputDto;
$limited_disc_product_input_dto->exist_store_fans_discount="0";
$product_objects = new AeopStorePromProduct;
$product_objects->buy_max_num="10";
$product_discount_list = new AeopProductDiscountInfo;
$product_discount_list->discount="90";
$product_discount_list->terminal="MOBILE";
$product_objects->product_discount_list = $product_discount_list;
$product_objects->product_id="1111111";
$sku_inventory_list = new AeopSkuInventoryInfo;
$sku_inventory_list->quantity="12";
$sku_inventory_list->sku_attr="14:29";
$product_objects->sku_inventory_list = $sku_inventory_list;
$product_objects->used_warehouse="true";
$limited_disc_product_input_dto->product_objects = $product_objects;
$limited_disc_product_input_dto->promotion_id="1111111";
$limited_disc_product_input_dto->store_club_discount_rate="90";
$req->setLimitedDiscProductInputDto(json_encode($limited_disc_product_input_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=aliexpress.marketing.limiteddiscountpromotion.addpromotionproduct' \
-d 'partner_id=apidoc' \
-d 'session=3f33b150-1780-4e9a-8006-f95a8334c441' \
-d 'sign=FD0ED08BFFB5BCA1AAB6D8DDB2C1AAAD' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-21+21%3A13%3A24' \
-d 'v=2.0' \
-d 'limited_disc_product_input_dto=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AliexpressMarketingLimiteddiscountpromotionAddpromotionproductRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.limited_disc_product_input_dto=""
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,"aliexpress.marketing.limiteddiscountpromotion.addpromotionproduct");
add_param(pRequest,"limited_disc_product_input_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('aliexpress.marketing.limiteddiscountpromotion.addpromotionproduct', {
'limited_disc_product_input_dto':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})