文档中心 > 综合交通-商家对接

qimen.alitrip.bus.product.queryroute (查询路线接口)

查询汽车票路线接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
fromCityName String 可选 北京 出发城市名称
fromCityCode String 可选 C001 出发城市code

响应参数

名称 类型 示例值 描述
retCode String 0 错误码
retDesc String 成功 错误描述
routeList BusRoute [] 路线列表(必填)
  • └ fromCityName
  • String
  • 香港
  • 出发城市名称(name定位时必传)
  • └ fromStationCode
  • String
  • 123456789
  • 出发港口code(code定位时必传)
  • └ fromStationName
  • String
  • 香港机场海天码头
  • 出发站(name定位时必传)
  • └ destinationName
  • String
  • 蛇口
  • 到达名称(是必填)
  • └ toCityName
  • String
  • 深圳
  • 到达城市名称(是必填)
  • └ toProvinceName
  • String
  • 深圳
  • 到达属省份
  • └ lineName
  • String
  • 香港-深圳
  • 线路名称(是必填)
  • └ lineDesc
  • String
  • xxx
  • 航线描述
  • └ toStationCode
  • String
  • 123456
  • 到达港口code(code定位时必填)
  • └ toStationAddress
  • String
  • 蛇口
  • 到达详细地址(是必填)
  • └ toStationLongitude
  • String
  • 105.469673
  • 到达经度(是必填)
  • └ toStationLatitude
  • String
  • 35.033114
  • 到达纬度(是必填)
  • └ attribute
  • String
  • {"param":"param"}
  • 扩展属性 json格式
success Boolean true 业务是否成功

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
QimenCloudClient client = new DefaultQimenCloudClient(url, appkey, secret);
AlitripBusProductQueryrouteRequest req = new AlitripBusProductQueryrouteRequest();
req.setFromCityName("北京");
req.setFromCityCode("C001");
AlitripBusProductQueryrouteResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<retCode>0</retCode>
<retDesc>成功</retDesc>
<routeList>
    <bus_route>
        <fromCityName>香港</fromCityName>
        <fromStationCode>123456789</fromStationCode>
        <fromStationName>香港机场海天码头</fromStationName>
        <destinationName>蛇口</destinationName>
        <toCityName>深圳</toCityName>
        <toProvinceName>深圳</toProvinceName>
        <lineName>香港-深圳</lineName>
        <lineDesc>xxx</lineDesc>
        <toStationCode>123456</toStationCode>
        <toStationAddress>蛇口</toStationAddress>
        <toStationLongitude>105.469673</toStationLongitude>
        <toStationLatitude>35.033114</toStationLatitude>
        <attribute>{&quot;param&quot;:&quot;param&quot;}</attribute>
    </bus_route>
</routeList>
<success>true</success>

异常示例

  • 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

返回
顶部