文档中心 > API类目 > 国际机票政策API

taobao.alitrip.it.fare.get (【国际机票自有政策】单条查询)

通过此接口可以查询单条政策的详情,可以根据fareId或outId查询,用户outId查询时,如果outId不唯一,只返回最新添加的一条数据

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
extendAttributes String 可选 {} json格式的字符串,扩展属性,预留
fareId Number 可选 1 运价id,单条新增成功时返回运价id,fareId和outId必填一个,fareId优先
outId String 可选 1 外部id,为新增时请求参数中的外部政策id

响应参数

名称 类型 示例值 描述
extend_attributes String {} json格式的字符串,扩展属性,预留
fare_id Number 1 运价id
fare_json String {"ticketingAirline":"CA","saleAirline":"CA","addressOption":"城市","tripType":"直达","originLand":"SHA,BJS","destination":"HKG,SHA","cabin":"N","restrictFlightNo":"","excludeFlightNo":"","validDate4Dep":"2015-05-30~2015-11-30","flightDateRestrict4Dep":"12","saleDate":"2015-05-30~2015-11-30","adultPassengerIdentity":"普通","ticketPrice":2000,"childPrice":"1980","returnPoint":1.0,"adjustMoney":0,"refundRule":"费","reissueRule":"费","noshowRule":"改期","luggageRule":"100"} 自有政策json序列化后字符串,具体属性和addow或addrt接口的请求参数一致,如:{"ticketingAirline":"CA","saleAirline":"CA","addressOption":"城市","tripType":"直达","originLand":"SHA,BJS","destination":"HKG,SHA","cabin":"N","restrictFlightNo":"","excludeFlightNo":"","validDate4Dep":"2015-05-30~2015-11-30","flightDateRestrict4Dep":"12","saleDate":"2015-05-30~2015-11-30","adultPassengerIdentity":"普通","ticketPrice":2000,"childPrice":"1980","returnPoint":1.0,"adjustMoney":0,"refundRule":"收取80000元退票费","reissueRule":"收取20%改期费","noshowRule":"起飞前不得退票,不得改期","luggageRule":"逾重行李费用为每公斤100元"}
fare_type Number 1 运价类型,1单程 2往返
status Number 0 0:未发布 1:已发布 2:已过期

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripItFareGetRequest req = new AlitripItFareGetRequest();
req.setExtendAttributes("{}");
req.setFareId(1L);
req.setOutId("1");
AlitripItFareGetResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alitrip_it_fare_get_response>
    <extend_attributes>{}</extend_attributes>
    <fare_id>1</fare_id>
    <fare_json>{&quot;ticketingAirline&quot;:&quot;CA&quot;,&quot;saleAirline&quot;:&quot;CA&quot;,&quot;addressOption&quot;:&quot;城市&quot;,&quot;tripType&quot;:&quot;直达&quot;,&quot;originLand&quot;:&quot;SHA,BJS&quot;,&quot;destination&quot;:&quot;HKG,SHA&quot;,&quot;cabin&quot;:&quot;N&quot;,&quot;restrictFlightNo&quot;:&quot;&quot;,&quot;excludeFlightNo&quot;:&quot;&quot;,&quot;validDate4Dep&quot;:&quot;2015-05-30~2015-11-30&quot;,&quot;flightDateRestrict4Dep&quot;:&quot;12&quot;,&quot;saleDate&quot;:&quot;2015-05-30~2015-11-30&quot;,&quot;adultPassengerIdentity&quot;:&quot;普通&quot;,&quot;ticketPrice&quot;:2000,&quot;childPrice&quot;:&quot;1980&quot;,&quot;returnPoint&quot;:1.0,&quot;adjustMoney&quot;:0,&quot;refundRule&quot;:&quot;费&quot;,&quot;reissueRule&quot;:&quot;费&quot;,&quot;noshowRule&quot;:&quot;改期&quot;,&quot;luggageRule&quot;:&quot;100&quot;}</fare_json>
    <fare_type>1</fare_type>
    <status>0</status>
</alitrip_it_fare_get_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

返回
顶部