taobao.alitrip.ie.agent.shopping.push (国际机票大卖家Shopping推送)

用于国际机票大卖家主动推送Shopping结果更新缓存报价。

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param0 ShoppingPushRq 可选 政策推送结构体
  • └ from_date
  • String
  • 必须
  • 20171224
  • 去程日期,格式为 YYYYMMDD ;如果为多程,20180729,20180804方式传输数据
  • └ channel_id
  • Number
  • 必须
  • 1074
  • 渠道id
  • └ ret_date
  • String
  • 可选
  • 20171230
  • 回程日期,格式为 YYYYMMDD(不传此参数或者留空表示单程/多程)
  • └ to_city
  • String
  • 可选
  • HKG
  • 目的地城市 、到达城市IATA 三字码代码 ;多程为空
  • └ trip_type
  • Number
  • 必须
  • 1
  • 行程类型,1:单程;2:往返;5: 多程
  • └ search_rs
  • String
  • 必须
  • {"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}]}
  • 政策详情,同大卖家API搜索结果返回的json字符串格式;
  • └ from_city
  • String
  • 必须
  • BJS
  • 出发地 IATA 三字码代码; 如果为多程,最多三程六段,按照 PEK/HKG,HKG/SHA 格式请求
  • └ cid
  • String
  • 必须
  • alitest
  • cid

响应参数

名称 类型 示例值 描述
result ShoppingPushRs result
  • └ err_routing_msg_list
  • String []
  • ["适用年龄格式错误:航班号CA123456","舱等只能为FCY"]
  • errRoutingMsg
  • └ err_msg
  • String
  • 请提供有效请求数据
  • errMsg
  • └ err_code
  • String
  • -1
  • errCode
  • └ success
  • Boolean
  • true
  • success

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
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());

响应示例

  • XML示例
  • JSON示例
<alitrip_ie_agent_shopping_push_response>
    <result>
        <err_routing_msg_list>
            <string>[&quot;适用年龄格式错误:航班号CA123456&quot;</string>
            <string>&quot;舱等只能为FCY&quot;]</string>
        </err_routing_msg_list>
        <err_msg>请提供有效请求数据</err_msg>
        <err_code>-1</err_code>
        <success>true</success>
    </result>
</alitrip_ie_agent_shopping_push_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部