TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripIeAgentShoppingPushRequest req = new AlitripIeAgentShoppingPushRequest();
AlitripIeAgentShoppingPushRequest.ShoppingPushRq obj1 = new AlitripIeAgentShoppingPushRequest.ShoppingPushRq();
obj1.setFromDate("20171224");
obj1.setChannelId(1074L);
obj1.setRetDate("20171230");
obj1.setToCity("HKG");
obj1.setTripType(1L);
obj1.setSearchRs("{\"status\":0,\"msg\":\"成功.\",\"routings\":[{\"data\":\"1234567890\",\"adultPrice\":1549,\"adultTax\":489,\"childPrice\":1648,\"childTax\":489,\"priceType\":0,\"applyType\":0,\"adultTaxType\":0,\"childTaxType\":0,\"nationalityType\":0,\"nationality\":\"\",\"rule\":{\"hasRefund\":0,\"refund\":\"\",\"hasEndorse\":0,\"endorse\":\"\",\"endorsement\":0,\"hasBaggage\":1,\"baggage\":\"第1,2航段:1件;第3,4航段:1件;\",\"hasNoShow\":1,\"noShowLimitTime\":0,\"specialNoShow\":3,\"other\":\"1.请填写正确乘机信息以及有效的证件信息,一经出票,不能更改证件信息.\"},\"fromSegments\":[{\"carrier\":\"MF\",\"flightNumber\":\"MF8118\",\"depAirport\":\"PEK\",\"depTime\":\"201712241055\",\"arrAirport\":\"XMN\",\"arrTime\":\"201712241400\",\"stopCities\":\"\",\"codeShare\":false,\"cabin\":\"S\",\"aircraftCode\":\"787\",\"cabinClass\":\"Y\",\"seatCount\":4},{\"carrier\":\"MF\",\"flightNumber\":\"MF8015\",\"depAirport\":\"XMN\",\"depTime\":\"201712241825\",\"arrAirport\":\"HKG\",\"arrTime\":\"201712241945\",\"stopCities\":\"\",\"codeShare\":false,\"cabin\":\"S\",\"aircraftCode\":\"738\",\"cabinClass\":\"Y\",\"seatCount\":7}],\"retSegments\":[],\"minPassengerCount\":2,\"maxPassengerCount\":9,\"gvChildRule\":1}]}");
obj1.setFromCity("BJS");
obj1.setCid("alitest");
req.setParam0(obj1);
AlitripIeAgentShoppingPushResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripIeAgentShoppingPushRequest req = new AlitripIeAgentShoppingPushRequest();
AlitripIeAgentShoppingPushRequest.ShoppingPushRqDomain obj1 = new AlitripIeAgentShoppingPushRequest.ShoppingPushRqDomain();
obj1.FromDate = "20171224";
obj1.ChannelId = 1074L;
obj1.RetDate = "20171230";
obj1.ToCity = "HKG";
obj1.TripType = 1L;
obj1.SearchRs = "{\"status\":0,\"msg\":\"成功.\",\"routings\":[{\"data\":\"1234567890\",\"adultPrice\":1549,\"adultTax\":489,\"childPrice\":1648,\"childTax\":489,\"priceType\":0,\"applyType\":0,\"adultTaxType\":0,\"childTaxType\":0,\"nationalityType\":0,\"nationality\":\"\",\"rule\":{\"hasRefund\":0,\"refund\":\"\",\"hasEndorse\":0,\"endorse\":\"\",\"endorsement\":0,\"hasBaggage\":1,\"baggage\":\"第1,2航段:1件;第3,4航段:1件;\",\"hasNoShow\":1,\"noShowLimitTime\":0,\"specialNoShow\":3,\"other\":\"1.请填写正确乘机信息以及有效的证件信息,一经出票,不能更改证件信息.\"},\"fromSegments\":[{\"carrier\":\"MF\",\"flightNumber\":\"MF8118\",\"depAirport\":\"PEK\",\"depTime\":\"201712241055\",\"arrAirport\":\"XMN\",\"arrTime\":\"201712241400\",\"stopCities\":\"\",\"codeShare\":false,\"cabin\":\"S\",\"aircraftCode\":\"787\",\"cabinClass\":\"Y\",\"seatCount\":4},{\"carrier\":\"MF\",\"flightNumber\":\"MF8015\",\"depAirport\":\"XMN\",\"depTime\":\"201712241825\",\"arrAirport\":\"HKG\",\"arrTime\":\"201712241945\",\"stopCities\":\"\",\"codeShare\":false,\"cabin\":\"S\",\"aircraftCode\":\"738\",\"cabinClass\":\"Y\",\"seatCount\":7}],\"retSegments\":[],\"minPassengerCount\":2,\"maxPassengerCount\":9,\"gvChildRule\":1}]}";
obj1.FromCity = "BJS";
obj1.Cid = "alitest";
req.Param0_ = obj1;
AlitripIeAgentShoppingPushResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripIeAgentShoppingPushRequest;
$param0 = new ShoppingPushRq;
$param0->from_date="20171224";
$param0->channel_id="1074";
$param0->ret_date="20171230";
$param0->to_city="HKG";
$param0->trip_type="1";
$param0->search_rs="{\"status\":0,\"msg\":\"成功.\",\"routings\":[{\"data\":\"1234567890\",\"adultPrice\":1549,\"adultTax\":489,\"childPrice\":1648,\"childTax\":489,\"priceType\":0,\"applyType\":0,\"adultTaxType\":0,\"childTaxType\":0,\"nationalityType\":0,\"nationality\":\"\",\"rule\":{\"hasRefund\":0,\"refund\":\"\",\"hasEndorse\":0,\"endorse\":\"\",\"endorsement\":0,\"hasBaggage\":1,\"baggage\":\"第1,2航段:1件;第3,4航段:1件;\",\"hasNoShow\":1,\"noShowLimitTime\":0,\"specialNoShow\":3,\"other\":\"1.请填写正确乘机信息以及有效的证件信息,一经出票,不能更改证件信息.\"},\"fromSegments\":[{\"carrier\":\"MF\",\"flightNumber\":\"MF8118\",\"depAirport\":\"PEK\",\"depTime\":\"201712241055\",\"arrAirport\":\"XMN\",\"arrTime\":\"201712241400\",\"stopCities\":\"\",\"codeShare\":false,\"cabin\":\"S\",\"aircraftCode\":\"787\",\"cabinClass\":\"Y\",\"seatCount\":4},{\"carrier\":\"MF\",\"flightNumber\":\"MF8015\",\"depAirport\":\"XMN\",\"depTime\":\"201712241825\",\"arrAirport\":\"HKG\",\"arrTime\":\"201712241945\",\"stopCities\":\"\",\"codeShare\":false,\"cabin\":\"S\",\"aircraftCode\":\"738\",\"cabinClass\":\"Y\",\"seatCount\":7}],\"retSegments\":[],\"minPassengerCount\":2,\"maxPassengerCount\":9,\"gvChildRule\":1}]}";
$param0->from_city="BJS";
$param0->cid="alitest";
$req->setParam0(json_encode($param0));
$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=taobao.alitrip.ie.agent.shopping.push' \
-d 'partner_id=apidoc' \
-d 'session=519fe1ed-6534-49d0-a242-1104d4191be8' \
-d 'sign=739367B3974CF219E49CAC2A039212AC' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-04+23%3A11%3A44' \
-d 'v=2.0' \
-d 'param0=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripIeAgentShoppingPushRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param0=""
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,"taobao.alitrip.ie.agent.shopping.push");
add_param(pRequest,"param0","数据结构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('taobao.alitrip.ie.agent.shopping.push', {
'param0':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})