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

taobao.ailabs.hotelrobot.push (酒店机器人推送)

客户机器人到达客房门口时,服务端发送天猫精灵播报

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
room_no String 必须 101 房号
hotel_id String 必须 e6dd44fd16084db8a60d69fd625d9f0f 酒店ID
push_type String 必须 GET 推送类型:(PUT:放东西、GET:拿东西)

响应参数

名称 类型 示例值 描述
message String 成功 message
status_code Number 200 status_code
result Boolean true result

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AilabsHotelrobotPushRequest req = new AilabsHotelrobotPushRequest();
req.setRoomNo("101");
req.setHotelId("e6dd44fd16084db8a60d69fd625d9f0f");
req.setPushType("GET");
AilabsHotelrobotPushResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<ailabs_hotelrobot_push_response>
    <message>成功</message>
    <status_code>200</status_code>
    <result>true</result>
</ailabs_hotelrobot_push_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

返回
顶部