pTopRequest pRequest = alloc_top_request();
pTopResponse pResponse = NULL;
pTaobaoClient pClient = alloc_taobao_client(url, appkey, appsecret);
set_api_name(pRequest,"taobao.alitrip.it.fare.addow");
add_param(pRequest,"outFileCode","1231248898");
add_param(pRequest,"fileCode","CSX1979");
add_param(pRequest,"productType","见舱预订");
add_param(pRequest,"stockMode","见舱");
add_param(pRequest,"ticketingAirline","CA");
add_param(pRequest,"saleAirline","CA,HU");
add_param(pRequest,"addressOption","城市");
add_param(pRequest,"tripType","中转");
add_param(pRequest,"originLand","SHA,BJS");
add_param(pRequest,"destination","HKG,SHA");
add_param(pRequest,"transitLand","SHA,KMG");
add_param(pRequest,"cabin","N,M");
add_param(pRequest,"restrictFlightNo","CA001-999,CA3000-3999");
add_param(pRequest,"excludeFlightNo","CA001-999,CA3000-3999");
add_param(pRequest,"validDate4Dep","2015-05-30~2015-11-30");
add_param(pRequest,"excludeDateRange4Dep","2015-05-30~2015-11-30");
add_param(pRequest,"tripDatePoint4Dep","第一国际段");
add_param(pRequest,"tripExcludeDatePoint4Dep","第一国际段");
add_param(pRequest,"flightDateRestrict4Dep","12");
add_param(pRequest,"flightDatePoint4Dep","第一国际段");
add_param(pRequest,"saleDate","2015-05-30~2015-11-30");
add_param(pRequest,"adultPassengerIdentity","普通");
add_param(pRequest,"minTravelPerson","3");
add_param(pRequest,"maxTravelPerson","3");
add_param(pRequest,"gv2ChildRule","1个儿童记1个成人");
add_param(pRequest,"nationality","CN,US");
add_param(pRequest,"excludeNationality","CN,US");
add_param(pRequest,"passengerAge","21-25");
add_param(pRequest,"ticketPrice","2000");
add_param(pRequest,"adultTax","1");
add_param(pRequest,"childPrice","75%");
add_param(pRequest,"childTax","123");
add_param(pRequest,"returnPoint","10");
add_param(pRequest,"adjustMoney","-1");
add_param(pRequest,"earlyTicketingTimeLimit","12");
add_param(pRequest,"lateTicketingTimeLimit","12");
add_param(pRequest,"vipCode","KCP");
add_param(pRequest,"fareSource","都适用");
add_param(pRequest,"isCreatePnr","是");
add_param(pRequest,"bookingOffice","HKG032");
add_param(pRequest,"receipts","电子行程单");
add_param(pRequest,"isValidatPrice","是");
add_param(pRequest,"isCanRefund4Dep","是");
add_param(pRequest,"refundPrice4Dep","200-72-300-48-1000-0-*");
add_param(pRequest,"refundPartPrice4Dep","*");
add_param(pRequest,"isCanReissue4Dep","是");
add_param(pRequest,"reissuePrice4Dep","200-72-300-48-1000-0-*");
add_param(pRequest,"reissuePartPrice4Dep","*");
add_param(pRequest,"noShowTimeLimit4Dep","12");
add_param(pRequest,"isNoShowCanRefund4Dep","是");
add_param(pRequest,"isNoShowCanReissue4Dep","是");
add_param(pRequest,"noShowPenalty4Dep","4");
add_param(pRequest,"luggageRule4Dep","1-23,1-23");
add_param(pRequest,"remark","备注XXX");
add_param(pRequest,"workingHours","18:00FRI");
add_param(pRequest,"refundRule","收取80000元退票费");
add_param(pRequest,"reissueRule","收取20%改期费");
add_param(pRequest,"noshowRule","起飞前不得退票,不得改期");
add_param(pRequest,"luggageRule","逾重行李费用为每公斤100元");
add_param(pRequest,"applyChannel","listing");
add_param(pRequest,"commodityType","普通");
add_param(pRequest,"codeSharingType","不允许代码共享");
add_param(pRequest,"extendAttributes","{}");
add_param(pRequest,"buyTicketNotice","本产品仅限中国大陆国际的乘客预定; 成功预定和出票赠送机上WIFI券");
add_param(pRequest,"isCanAllRefund","是");
add_param(pRequest,"refundFeeAllUnused","200-72-10%-48-1000-0-*");
add_param(pRequest,"refundCurrencyAllUnused","CNY");
add_param(pRequest,"refundFeeTypeAllUnused","全程");
add_param(pRequest,"isCanPartRefund","是");
add_param(pRequest,"refundFeePartUnused","200-72-300-48-1000-0-*");
add_param(pRequest,"refundCurrencyPartUnused","CNY");
add_param(pRequest,"refundFeeTypePartUnused","全程");
add_param(pRequest,"canDepChange","是");
add_param(pRequest,"depChangeFee","200-72-300-48-1000-0-*");
add_param(pRequest,"depChangeCurrency","CNY");
add_param(pRequest,"depChangeFeeType","全程");
add_param(pRequest,"noshowRestrict","是");
add_param(pRequest,"noshowTimeRestrict","10");
add_param(pRequest,"noshowTimeRestrictUnit","小时");
add_param(pRequest,"noshowRuleType","不可退票,不可改期");
add_param(pRequest,"noshowFee","5000");
add_param(pRequest,"noshowCurrency","CNY");
add_param(pRequest,"farebasis","M6MHKKG");
add_param(pRequest,"fareTypeCode","XEX");
add_param(pRequest,"tariff","884");
add_param(pRequest,"ruleId","HK31");
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('taobao.alitrip.it.fare.addow', {
'outFileCode':'1231248898',
'fileCode':'CSX1979',
'productType':'见舱预订',
'stockMode':'见舱',
'ticketingAirline':'CA',
'saleAirline':'CA,HU',
'addressOption':'城市',
'tripType':'中转',
'originLand':'SHA,BJS',
'destination':'HKG,SHA',
'transitLand':'SHA,KMG',
'cabin':'N,M',
'restrictFlightNo':'CA001-999,CA3000-3999',
'excludeFlightNo':'CA001-999,CA3000-3999',
'validDate4Dep':'2015-05-30~2015-11-30',
'excludeDateRange4Dep':'2015-05-30~2015-11-30',
'tripDatePoint4Dep':'第一国际段',
'tripExcludeDatePoint4Dep':'第一国际段',
'flightDateRestrict4Dep':'12',
'flightDatePoint4Dep':'第一国际段',
'saleDate':'2015-05-30~2015-11-30',
'adultPassengerIdentity':'普通',
'minTravelPerson':'3',
'maxTravelPerson':'3',
'gv2ChildRule':'1个儿童记1个成人',
'nationality':'CN,US',
'excludeNationality':'CN,US',
'passengerAge':'21-25',
'ticketPrice':'2000',
'adultTax':'1',
'childPrice':'75%',
'childTax':'123',
'returnPoint':'10',
'adjustMoney':'-1',
'earlyTicketingTimeLimit':'12',
'lateTicketingTimeLimit':'12',
'vipCode':'KCP',
'fareSource':'都适用',
'isCreatePnr':'是',
'bookingOffice':'HKG032',
'receipts':'电子行程单',
'isValidatPrice':'是',
'isCanRefund4Dep':'是',
'refundPrice4Dep':'200-72-300-48-1000-0-*',
'refundPartPrice4Dep':'*',
'isCanReissue4Dep':'是',
'reissuePrice4Dep':'200-72-300-48-1000-0-*',
'reissuePartPrice4Dep':'*',
'noShowTimeLimit4Dep':'12',
'isNoShowCanRefund4Dep':'是',
'isNoShowCanReissue4Dep':'是',
'noShowPenalty4Dep':'4',
'luggageRule4Dep':'1-23,1-23',
'remark':'备注XXX',
'workingHours':'18:00FRI',
'refundRule':'收取80000元退票费',
'reissueRule':'收取20%改期费',
'noshowRule':'起飞前不得退票,不得改期',
'luggageRule':'逾重行李费用为每公斤100元',
'applyChannel':'listing',
'commodityType':'普通',
'codeSharingType':'不允许代码共享',
'extendAttributes':'{}',
'buyTicketNotice':'本产品仅限中国大陆国际的乘客预定; 成功预定和出票赠送机上WIFI券',
'isCanAllRefund':'是',
'refundFeeAllUnused':'200-72-10%-48-1000-0-*',
'refundCurrencyAllUnused':'CNY',
'refundFeeTypeAllUnused':'全程',
'isCanPartRefund':'是',
'refundFeePartUnused':'200-72-300-48-1000-0-*',
'refundCurrencyPartUnused':'CNY',
'refundFeeTypePartUnused':'全程',
'canDepChange':'是',
'depChangeFee':'200-72-300-48-1000-0-*',
'depChangeCurrency':'CNY',
'depChangeFeeType':'全程',
'noshowRestrict':'是',
'noshowTimeRestrict':'10',
'noshowTimeRestrictUnit':'小时',
'noshowRuleType':'不可退票,不可改期',
'noshowFee':'5000',
'noshowCurrency':'CNY',
'farebasis':'M6MHKKG',
'fareTypeCode':'XEX',
'tariff':'884',
'ruleId':'HK31'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})