TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAscpChannelMainRefundCreateRequest req = new AlibabaAscpChannelMainRefundCreateRequest();
AlibabaAscpChannelMainRefundCreateRequest.ExternalCreateRefundOrderRequest obj1 = new AlibabaAscpChannelMainRefundCreateRequest.ExternalCreateRefundOrderRequest();
obj1.setCurrencyType("CNY");
obj1.setSaleOrderNo("123453");
obj1.setOutRefundNo("qskrefund002");
obj1.setRemark("test");
obj1.setOutOrderNo("qsk335435r");
obj1.setRefundReason("不要了");
obj1.setProofPicUrls("url1,url2");
req.setRefundCreateRequest(obj1);
AlibabaAscpChannelMainRefundCreateResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaAscpChannelMainRefundCreateRequest req = new AlibabaAscpChannelMainRefundCreateRequest();
AlibabaAscpChannelMainRefundCreateRequest.ExternalCreateRefundOrderRequestDomain obj1 = new AlibabaAscpChannelMainRefundCreateRequest.ExternalCreateRefundOrderRequestDomain();
obj1.CurrencyType = "CNY";
obj1.SaleOrderNo = "123453";
obj1.OutRefundNo = "qskrefund002";
obj1.Remark = "test";
obj1.OutOrderNo = "qsk335435r";
obj1.RefundReason = "不要了";
obj1.ProofPicUrls = "url1,url2";
req.RefundCreateRequest_ = obj1;
AlibabaAscpChannelMainRefundCreateResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaAscpChannelMainRefundCreateRequest;
$refund_create_request = new ExternalCreateRefundOrderRequest;
$refund_create_request->currency_type="CNY";
$refund_create_request->sale_order_no="123453";
$refund_create_request->out_refund_no="qskrefund002";
$refund_create_request->remark="test";
$refund_create_request->out_order_no="qsk335435r";
$refund_create_request->refund_reason="不要了";
$refund_create_request->proof_pic_urls="url1,url2";
$req->setRefundCreateRequest(json_encode($refund_create_request));
$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.ascp.channel.main.refund.create' \
-d 'partner_id=apidoc' \
-d 'session=23408aa2-9ebb-4ee0-bcc3-d9e5448361dd' \
-d 'sign=DDCE5CD915E0A86D232BD68D77558F83' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-24+16%3A39%3A51' \
-d 'v=2.0' \
-d 'refund_create_request=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaAscpChannelMainRefundCreateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.refund_create_request=""
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.ascp.channel.main.refund.create");
add_param(pRequest,"refund_create_request","数据结构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.ascp.channel.main.refund.create', {
'refund_create_request':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})