TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaJymItemExternalGoodsBatchOffsaleRequest req = new AlibabaJymItemExternalGoodsBatchOffsaleRequest();
AlibabaJymItemExternalGoodsBatchOffsaleRequest.GoodsOffSaleCommandDto obj1 = new AlibabaJymItemExternalGoodsBatchOffsaleRequest.GoodsOffSaleCommandDto();
List<AlibabaJymItemExternalGoodsBatchOffsaleRequest.ExternalGoodsIdDto> list3 = new ArrayList<AlibabaJymItemExternalGoodsBatchOffsaleRequest.ExternalGoodsIdDto>();
AlibabaJymItemExternalGoodsBatchOffsaleRequest.ExternalGoodsIdDto obj4 = new AlibabaJymItemExternalGoodsBatchOffsaleRequest.ExternalGoodsIdDto();
list3.add(obj4);
obj4.setExternalGoodsId("1629098275");
obj4.setGoodsId(1627967963131647L);
obj1.setExternalGoodsIdList(list3);
obj1.setExternalBatchId("1629098275");
req.setGoodsOffSaleCommand(obj1);
AlibabaJymItemExternalGoodsBatchOffsaleResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaJymItemExternalGoodsBatchOffsaleRequest req = new AlibabaJymItemExternalGoodsBatchOffsaleRequest();
AlibabaJymItemExternalGoodsBatchOffsaleRequest.GoodsOffSaleCommandDtoDomain obj1 = new AlibabaJymItemExternalGoodsBatchOffsaleRequest.GoodsOffSaleCommandDtoDomain();
List<AlibabaJymItemExternalGoodsBatchOffsaleRequest.ExternalGoodsIdDtoDomain> list3 = new List<AlibabaJymItemExternalGoodsBatchOffsaleRequest.ExternalGoodsIdDtoDomain>();
AlibabaJymItemExternalGoodsBatchOffsaleRequest.ExternalGoodsIdDtoDomain obj4 = new AlibabaJymItemExternalGoodsBatchOffsaleRequest.ExternalGoodsIdDtoDomain();
list3.Add(obj4);
obj4.ExternalGoodsId = "1629098275";
obj4.GoodsId = 1627967963131647L;
obj1.ExternalGoodsIdList= list3;
obj1.ExternalBatchId = "1629098275";
req.GoodsOffSaleCommand_ = obj1;
AlibabaJymItemExternalGoodsBatchOffsaleResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaJymItemExternalGoodsBatchOffsaleRequest;
$goods_off_sale_command = new GoodsOffSaleCommandDto;
$external_goods_id_list = new ExternalGoodsIdDto;
$external_goods_id_list->external_goods_id="1629098275";
$external_goods_id_list->goods_id="1627967963131647";
$goods_off_sale_command->external_goods_id_list = $external_goods_id_list;
$goods_off_sale_command->external_batch_id="1629098275";
$req->setGoodsOffSaleCommand(json_encode($goods_off_sale_command));
$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=alibaba.jym.item.external.goods.batch.offsale' \
-d 'partner_id=apidoc' \
-d 'sign=982A414E5DF5AA44BBEE62DE41E773FC' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-08-23+19%3A47%3A22' \
-d 'v=2.0' \
-d 'goods_off_sale_command=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaJymItemExternalGoodsBatchOffsaleRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.goods_off_sale_command=""
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,"alibaba.jym.item.external.goods.batch.offsale");
add_param(pRequest,"goods_off_sale_command","数据结构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('alibaba.jym.item.external.goods.batch.offsale', {
'goods_off_sale_command':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})