文档中心 > API类目 > 智能设备

alibaba.ai.smarthome.familynames.get (获取家庭成员关系列表)

获取家庭成员关系列表

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
taobao_user_id String 可选 "123456" 淘宝id
appkey String 可选 "24976443" appkey

响应参数

名称 类型 示例值 描述
result Result result
  • └ message
  • String
  • message
  • └ status_code
  • Number
  • statusCode
  • contact_list
  • OutContactData []
  • result
  • └ owner_id
  • String
  • ownerId(家庭成员id)
  • └ relation_ship
  • String
  • relationShip(家庭成员)
  • └ gender
  • String
  • gender(性别)
  • └ contact_id
  • String
  • contactId(家庭成员关系id)
  • └ name
  • String
  • name(昵称)
  • └ biz_code
  • String
  • bizCode

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAiSmarthomeFamilynamesGetRequest req = new AlibabaAiSmarthomeFamilynamesGetRequest();
req.setTaobaoUserId("\"123456\"");
req.setAppkey("\"24976443\"");
AlibabaAiSmarthomeFamilynamesGetResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_ai_smarthome_familynames_get_response>
    <result>
        <message></message>
        <status_code></status_code>
        <contact_list>
            <out_contact_data>
                <owner_id></owner_id>
                <relation_ship></relation_ship>
                <gender></gender>
                <contact_id></contact_id>
                <name></name>
            </out_contact_data>
        </contact_list>
        <biz_code></biz_code>
    </result>
</alibaba_ai_smarthome_familynames_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

返回
顶部