文档中心 > API类目 > 阿里高德打车API

alibaba.amap.channel.car.component.get (获取高德打车通用组件URL)

获取高德打车通用组件URL 1.amapOrderId 一键报警 和 行程分享必选 2.组件枚举 ALARM("alarm","一键报警"), EMERGENCY_CONTACT("emergency_contact_add","紧急联系人"), TRIP_SHARE("tripShare","行程分享")

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
amap_order_id String 必须 1541894302897424029 高德订单号,一键报警,紧急联系人必选
trace_id String 可选 6d684a10-873a-5c84-878c-161f15923200 请求唯一ID
client_source String 必须 amap-car 渠道来源,高德分配
user_id String 必须 5675123 用户ID
mobile String 必须 15811531425 用户手机号
longitude String 可选 116.31222 乘车人经度
latitude String 可选 39.980286 乘车人纬度
idfa String 可选 1921fcae-1dc3-ddc8-c804-73d69da38852 ios设备唯一标示
platform String 可选 ios 手机平台 ios/android
diu String 可选 1921fcae-1dc3-ddc8-c804-73d69da38852 设备号
imei String 可选 1921fcae-1dc3-ddc8-c804-73d69da38852 android设备唯一标示
need_component_list String [] 必须 tripShare
  • 最大列表长度:999
  • alarm,emergency_contact_add,tripShare

    响应参数

    名称 类型 示例值 描述
    trace_id String 6d684a10-873a-5c84-878c-161f15923200 请求唯一ID
    result_code String 0 结果码
    result_msg String success 结果码描述
    component_list ComponentInfo [] 组件信息
    • └ desc
    • String
    • 行程分享
    • 组件描述
    • └ url
    • String
    • http://download.tbcache.com/L0/tfs/TB1NlV9QVXXXXcOaXXXXXXXXXXX
    • url
    • └ code
    • String
    • tripShare
    • 组件编码
    • └ error_msg
    • String
    • 订单号不能为null
    • 获取组件错误信息

    请求示例

    • JAVA
    • .NET
    • PHP
    • CURL
    • Python
    • C/C++
    • NodeJS
    TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
    AlibabaAmapChannelCarComponentGetRequest req = new AlibabaAmapChannelCarComponentGetRequest();
    req.setAmapOrderId("1541894302897424029");
    req.setTraceId("6d684a10-873a-5c84-878c-161f15923200");
    req.setClientSource("amap-car");
    req.setUserId("5675123");
    req.setMobile("15811531425");
    req.setLongitude("116.31222");
    req.setLatitude("39.980286");
    req.setIdfa("1921fcae-1dc3-ddc8-c804-73d69da38852");
    req.setPlatform("ios");
    req.setDiu("1921fcae-1dc3-ddc8-c804-73d69da38852");
    req.setImei("1921fcae-1dc3-ddc8-c804-73d69da38852");
    req.setNeedComponentList("tripShare");
    AlibabaAmapChannelCarComponentGetResponse rsp = client.execute(req);
    System.out.println(rsp.getBody());

    响应示例

    • XML示例
    • JSON示例
    <alibaba_amap_channel_car_component_get_response>
        <trace_id>6d684a10-873a-5c84-878c-161f15923200</trace_id>
        <result_code>0</result_code>
        <result_msg>success</result_msg>
        <component_list>
            <component_info>
                <desc>行程分享</desc>
                <url>http://download.tbcache.com/L0/tfs/TB1NlV9QVXXXXcOaXXXXXXXXXXX</url>
                <code>tripShare</code>
                <error_msg>订单号不能为null</error_msg>
            </component_info>
        </component_list>
    </alibaba_amap_channel_car_component_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

    返回
    顶部