TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripBtripFlightDistributionRefundPrecalRequest req = new AlitripBtripFlightDistributionRefundPrecalRequest();
AlitripBtripFlightDistributionRefundPrecalRequest.BtripFlightRefundPreCalRq obj1 = new AlitripBtripFlightDistributionRefundPrecalRequest.BtripFlightRefundPreCalRq();
obj1.setIsVoluntary(1L);
obj1.setDisOrderId("51724621");
List<AlitripBtripFlightDistributionRefundPrecalRequest.PassengerSegmentInfo> list3 = new ArrayList<AlitripBtripFlightDistributionRefundPrecalRequest.PassengerSegmentInfo>();
AlitripBtripFlightDistributionRefundPrecalRequest.PassengerSegmentInfo obj4 = new AlitripBtripFlightDistributionRefundPrecalRequest.PassengerSegmentInfo();
list3.add(obj4);
obj4.setFlightNo("MU8471");
obj4.setPassengerName("张三");
obj4.setUserId("351761");
obj1.setPassengerSegmentInfoList(list3);
obj1.setSubChannel("jianhang001");
obj1.setTicketNos("1111,2222");
req.setParamBtripFlightRefundPreCalRq(obj1);
AlitripBtripFlightDistributionRefundPrecalResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
                 
                
                    ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripBtripFlightDistributionRefundPrecalRequest req = new AlitripBtripFlightDistributionRefundPrecalRequest();
AlitripBtripFlightDistributionRefundPrecalRequest.BtripFlightRefundPreCalRqDomain obj1 = new AlitripBtripFlightDistributionRefundPrecalRequest.BtripFlightRefundPreCalRqDomain();
obj1.IsVoluntary = 1L;
obj1.DisOrderId = "51724621";
List<AlitripBtripFlightDistributionRefundPrecalRequest.PassengerSegmentInfoDomain> list3 = new List<AlitripBtripFlightDistributionRefundPrecalRequest.PassengerSegmentInfoDomain>();
AlitripBtripFlightDistributionRefundPrecalRequest.PassengerSegmentInfoDomain obj4 = new AlitripBtripFlightDistributionRefundPrecalRequest.PassengerSegmentInfoDomain();
list3.Add(obj4);
obj4.FlightNo = "MU8471";
obj4.PassengerName = "张三";
obj4.UserId = "351761";
obj1.PassengerSegmentInfoList= list3;
obj1.SubChannel = "jianhang001";
obj1.TicketNos = "1111,2222";
req.ParamBtripFlightRefundPreCalRq_ = obj1;
AlitripBtripFlightDistributionRefundPrecalResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
                 
                
                    $c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripBtripFlightDistributionRefundPrecalRequest;
$param_btrip_flight_refund_pre_cal_rq = new BtripFlightRefundPreCalRq;
$param_btrip_flight_refund_pre_cal_rq->is_voluntary="1";
$param_btrip_flight_refund_pre_cal_rq->dis_order_id="51724621";
$passenger_segment_info_list = new PassengerSegmentInfo;
$passenger_segment_info_list->flight_no="MU8471";
$passenger_segment_info_list->passenger_name="张三";
$passenger_segment_info_list->user_id="351761";
$param_btrip_flight_refund_pre_cal_rq->passenger_segment_info_list = $passenger_segment_info_list;
$param_btrip_flight_refund_pre_cal_rq->sub_channel="jianhang001";
$param_btrip_flight_refund_pre_cal_rq->ticket_nos="1111,2222";
$req->setParamBtripFlightRefundPreCalRq(json_encode($param_btrip_flight_refund_pre_cal_rq));
$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=alitrip.btrip.flight.distribution.refund.precal' \
-d 'partner_id=apidoc' \
-d 'session=562f9255-825c-4d96-9a54-2186a5bdb1b6' \
-d 'sign=423AA917B5BD451FBAF69F4EF6EC9AB3' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-10-31+16%3A14%3A52' \
-d 'v=2.0' \
-d 'param_btrip_flight_refund_pre_cal_rq=null'
                 
                
                    
                        # -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripBtripFlightDistributionRefundPrecalRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param_btrip_flight_refund_pre_cal_rq=""
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,"alitrip.btrip.flight.distribution.refund.precal");
add_param(pRequest,"param_btrip_flight_refund_pre_cal_rq","数据结构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('alitrip.btrip.flight.distribution.refund.precal', {
	'param_btrip_flight_refund_pre_cal_rq':'数据结构JSON示例'
}, function(error, response) {
	if (!error) console.log(response);
	else console.log(error);
})