TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaNlifeB2cCodeConvertRequest req = new AlibabaNlifeB2cCodeConvertRequest();
req.setStoreId("100004");
req.setUrl("http://xiaozhi.schifferyu.xyz/clmj/item/item.html?itemId=543793246131&itemCode=01380000000000009047&outId=332312&props=-1:-1;20509:28316;1627207:28324;");
AlibabaNlifeB2cCodeConvertResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaNlifeB2cCodeConvertRequest req = new AlibabaNlifeB2cCodeConvertRequest();
req.StoreId = "100004";
req.Url = "http://xiaozhi.schifferyu.xyz/clmj/item/item.html?itemId=543793246131&itemCode=01380000000000009047&outId=332312&props=-1:-1;20509:28316;1627207:28324;";
AlibabaNlifeB2cCodeConvertResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaNlifeB2cCodeConvertRequest;
$req->setStoreId("100004");
$req->setUrl("http://xiaozhi.schifferyu.xyz/clmj/item/item.html?itemId=543793246131&itemCode=01380000000000009047&outId=332312&props=-1:-1;20509:28316;1627207:28324;");
$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.nlife.b2c.code.convert' \
-d 'partner_id=apidoc' \
-d 'sign=2E6452342339E88BB6621EBCA0A9FE84' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-04+16%3A14%3A06' \
-d 'v=2.0' \
-d 'store_id=100004' \
-d 'url=http%3A%2F%2Fxiaozhi.schifferyu.xyz%2Fclmj%2Fitem%2Fitem.html%3FitemId%3D543793246131%26itemCode%3D01380000000000009047%26outId%3D332312%26props%3D-1%3A-1%3B20509%3A28316%3B1627207%3A28324%3B'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaNlifeB2cCodeConvertRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.store_id="100004"
req.url="http://xiaozhi.schifferyu.xyz/clmj/item/item.html?itemId=543793246131&itemCode=01380000000000009047&outId=332312&props=-1:-1;20509:28316;1627207:28324;"
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.nlife.b2c.code.convert");
add_param(pRequest,"store_id","100004");
add_param(pRequest,"url","http://xiaozhi.schifferyu.xyz/clmj/item/item.html?itemId=543793246131&itemCode=01380000000000009047&outId=332312&props=-1:-1;20509:28316;1627207:28324;");
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.nlife.b2c.code.convert', {
'store_id':'100004',
'url':'http://xiaozhi.schifferyu.xyz/clmj/item/item.html?itemId=543793246131&itemCode=01380000000000009047&outId=332312&props=-1:-1;20509:28316;1627207:28324;'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})