文档中心 > API类目 > 旅行用车API

alitrip.rentcar.btb.city.query (租车分销城市基础信息接口)

租车分销城市基础信息接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
rent_car_b2b_city_info_req RentCarB2bCityInfoReq 可选 入参
  • └ trace_id
  • String
  • 可选
  • 2147b72e16691938918672871ef815
  • 搜索请求id 用于问题排查
  • └ exts
  • String
  • 可选
  • {"key":"value"}
  • 扩展字段
  • └ channel_id
  • String
  • 必须
  • 80001
  • 来源id

响应参数

名称 类型 示例值 描述
cities RentCarCityBasicInfo [] 出参
  • └ city_name
  • String
  • 漯河
  • 城市名称
  • └ city_code
  • String
  • 370200
  • 城市code
successful Boolean true 请求是否成功
ret_code String 1001 错误码
exts Json {"key":"value"} 扩展字段
ret_msg String 错误信息 错误信息

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripRentcarBtbCityQueryRequest req = new AlitripRentcarBtbCityQueryRequest();
AlitripRentcarBtbCityQueryRequest.RentCarB2bCityInfoReq obj1 = new AlitripRentcarBtbCityQueryRequest.RentCarB2bCityInfoReq();
obj1.setTraceId("2147b72e16691938918672871ef815");
obj1.setExts("{\"key\":\"value\"}");
obj1.setChannelId("80001");
req.setRentCarB2bCityInfoReq(obj1);
AlitripRentcarBtbCityQueryResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alitrip_rentcar_btb_city_query_response>
    <cities>
        <rent_car_city_basic_info>
            <city_name>漯河</city_name>
            <city_code>370200</city_code>
        </rent_car_city_basic_info>
    </cities>
    <successful>true</successful>
    <ret_code>1001</ret_code>
    <exts>{&quot;key&quot;:&quot;value&quot;}</exts>
    <ret_msg>错误信息</ret_msg>
</alitrip_rentcar_btb_city_query_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

返回
顶部