文档中心 > API类目 > 天猫精灵开放API

taobao.ailab.aicloud.top.earthquake.send (地震局发送地震消息)

地震局发送地震消息给天猫精灵,天猫精灵根据地震消息判断发送地震消息给危险区域用户

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
ext String 可选 {"hello":"hello"} 扩展占位字段
signature String 必须 c1b930c4ee1b2f4b192a4cc11e0bc5b790b24e95 签名
nonce_str String 必须 12345 随机值
timestamp_str String 必须 123545634534 时间戳
earthquake_info String 必须 {"ID":"12345"} 地震信息

响应参数

名称 类型 示例值 描述
is_success Boolean true 响应结果
extend_info String ext 扩展字段
msg_info String parameter invalid 响应错误信息
msg_code String 400 响应错误码

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AilabAicloudTopEarthquakeSendRequest req = new AilabAicloudTopEarthquakeSendRequest();
req.setExt("{\"hello\":\"hello\"}");
req.setSignature("c1b930c4ee1b2f4b192a4cc11e0bc5b790b24e95");
req.setNonceStr("12345");
req.setTimestampStr("123545634534");
req.setEarthquakeInfo("{\"ID\":\"12345\"}");
AilabAicloudTopEarthquakeSendResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<ailab_aicloud_top_earthquake_send_response>
    <is_success>true</is_success>
    <extend_info>ext</extend_info>
    <msg_info>parameter invalid</msg_info>
    <msg_code>400</msg_code>
</ailab_aicloud_top_earthquake_send_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

返回
顶部