通过此接口可以查询单条政策的详情,可以根据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:已过期 |
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());
<alitrip_it_fare_get_response> <extend_attributes>{}</extend_attributes> <fare_id>1</fare_id> <fare_json>{"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"}</fare_json> <fare_type>1</fare_type> <status>0</status> </alitrip_it_fare_get_response>
<error_response> <code>50</code> <msg>Remote service error</msg> <sub_code>isv.invalid-parameter</sub_code> <sub_msg>非法参数</sub_msg> </error_response>
错误码 | 错误描述 | 解决方案 |
---|