文档中心 > API类目 > 汽车票API

taobao.bus.city.get (城市接口)

汽车票出发城市获取接口,获取所有出发城市

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述

响应参数

名称 类型 示例值 描述
city_infos TopCityInfo [] 查询参数
  • └ city_name
  • String
  • 北京市
  • 城市名称
  • └ city_code
  • Number
  • 100100
  • 城市code
result_code String SYS_ERROR 错误码
result_msg String 系统异常 错误信息
is_success Boolean true 是否成功

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
BusCityGetRequest req = new BusCityGetRequest();
BusCityGetResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<bus_city_get_response>
    <city_infos>
        <top_city_info>
            <city_name>北京市</city_name>
            <city_code>100100</city_code>
        </top_city_info>
    </city_infos>
    <result_code>SYS_ERROR</result_code>
    <result_msg>系统异常</result_msg>
    <is_success>true</is_success>
</bus_city_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

返回
顶部