TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaMosGoodsOpenSpuTmallrelationRequest req = new AlibabaMosGoodsOpenSpuTmallrelationRequest();
AlibabaMosGoodsOpenSpuTmallrelationRequest.SpuTmallRelationDto obj1 = new AlibabaMosGoodsOpenSpuTmallrelationRequest.SpuTmallRelationDto();
obj1.setIntimeBrandId(11328L);
obj1.setStyleNo("1111111111");
obj1.setTmallBrandId(2020202L);
obj1.setTmallItemId(65000404L);
obj1.setTmallSellerId(2040333L);
List<AlibabaMosGoodsOpenSpuTmallrelationRequest.CspuTmallRelationDto> list3 = new ArrayList<AlibabaMosGoodsOpenSpuTmallrelationRequest.CspuTmallRelationDto>();
AlibabaMosGoodsOpenSpuTmallrelationRequest.CspuTmallRelationDto obj4 = new AlibabaMosGoodsOpenSpuTmallrelationRequest.CspuTmallRelationDto();
list3.add(obj4);
obj4.setTmallSkuId(111111L);
obj4.setBarcode("1111111111");
obj1.setCspus(list3);
req.setParamSpuTmallRelationDto(obj1);
AlibabaMosGoodsOpenSpuTmallrelationResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaMosGoodsOpenSpuTmallrelationRequest req = new AlibabaMosGoodsOpenSpuTmallrelationRequest();
AlibabaMosGoodsOpenSpuTmallrelationRequest.SpuTmallRelationDtoDomain obj1 = new AlibabaMosGoodsOpenSpuTmallrelationRequest.SpuTmallRelationDtoDomain();
obj1.IntimeBrandId = 11328L;
obj1.StyleNo = "1111111111";
obj1.TmallBrandId = 2020202L;
obj1.TmallItemId = 65000404L;
obj1.TmallSellerId = 2040333L;
List<AlibabaMosGoodsOpenSpuTmallrelationRequest.CspuTmallRelationDtoDomain> list3 = new List<AlibabaMosGoodsOpenSpuTmallrelationRequest.CspuTmallRelationDtoDomain>();
AlibabaMosGoodsOpenSpuTmallrelationRequest.CspuTmallRelationDtoDomain obj4 = new AlibabaMosGoodsOpenSpuTmallrelationRequest.CspuTmallRelationDtoDomain();
list3.Add(obj4);
obj4.TmallSkuId = 111111L;
obj4.Barcode = "1111111111";
obj1.Cspus= list3;
req.ParamSpuTmallRelationDto_ = obj1;
AlibabaMosGoodsOpenSpuTmallrelationResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaMosGoodsOpenSpuTmallrelationRequest;
$param_spu_tmall_relation_dto = new SpuTmallRelationDto;
$param_spu_tmall_relation_dto->intime_brand_id="11328";
$param_spu_tmall_relation_dto->style_no="1111111111";
$param_spu_tmall_relation_dto->tmall_brand_id="2020202";
$param_spu_tmall_relation_dto->tmall_item_id="65000404";
$param_spu_tmall_relation_dto->tmall_seller_id="2040333";
$cspus = new CspuTmallRelationDto;
$cspus->tmall_sku_id="111111";
$cspus->barcode="1111111111";
$param_spu_tmall_relation_dto->cspus = $cspus;
$req->setParamSpuTmallRelationDto(json_encode($param_spu_tmall_relation_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=alibaba.mos.goods.open.spu.tmallrelation' \
-d 'partner_id=apidoc' \
-d 'session=6ec46254-1608-40cc-a8f1-b8ba8b37e35b' \
-d 'sign=CAEF37464C692226E7A915A22FED1DFC' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-30+15%3A16%3A55' \
-d 'v=2.0' \
-d 'param_spu_tmall_relation_dto=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaMosGoodsOpenSpuTmallrelationRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param_spu_tmall_relation_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,"alibaba.mos.goods.open.spu.tmallrelation");
add_param(pRequest,"param_spu_tmall_relation_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('alibaba.mos.goods.open.spu.tmallrelation', {
'param_spu_tmall_relation_dto':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})