dingtalk.corp.extcontact.update (外部联系人更新)

更新企业外部联系人

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
contact OpenExtContact 必须 外部联系人信息
  • └ title
  • String
  • 可选
  • 开发工程师
  • 职位
  • └ label_ids
  • Number []
  • 必须
  • [1,2,3]
  • 标签列表
  • └ share_dept_ids
  • Number []
  • 可选
  • [1,2,3]
  • 共享给的部门ID
  • └ address
  • String
  • 可选
  • 地址内容
  • 地址
  • └ remark
  • String
  • 可选
  • 备注内容
  • 备注
  • └ follower_user_id
  • String
  • 必须
  • 023420013645
  • 负责人userId
  • └ name
  • String
  • 必须
  • 张三
  • 名称
  • └ user_id
  • String
  • 必须
  • 123420013632
  • 该外部联系人的userId
  • └ company_name
  • String
  • 可选
  • 钉钉
  • 企业名
  • └ share_user_ids
  • String []
  • 可选
  • ["023420013644"]
  • 共享给的员工userId列表

响应参数

名称 类型 示例值 描述
result DingOpenResult result
  • └ ding_open_errcode
  • Number
  • 0
  • dingOpenErrcode
  • └ error_msg
  • String
  • 成功
  • errorMsg
  • └ success
  • Boolean
  • true
  • success

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
DingTalkClient client = new DefaultDingTalkClient("https://eco.taobao.com/router/rest");
CorpExtcontactUpdateRequest req = new CorpExtcontactUpdateRequest();
OpenExtContact obj1 = new OpenExtContact();
obj1.setTitle("开发工程师");
obj1.setLabelIds(new Long[] { 1,2,3 };
);
obj1.setShareDeptIds(new Long[] { 1,2,3 };
);
obj1.setAddress("地址内容");
obj1.setRemark("备注内容");
obj1.setFollowerUserId("023420013645");
obj1.setName("张三");
obj1.setUserId("123420013632");
obj1.setCompanyName("钉钉");
obj1.setShareUserIds(""023420013644"");
req.setContact(obj1);
CorpExtcontactUpdateResponse rsp = client.execute(req, access_token);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<dingtalk_corp_extcontact_update_response>
    <result>
        <ding_open_errcode>0</ding_open_errcode>
        <error_msg>成功</error_msg>
        <success>true</success>
    </result>
</dingtalk_corp_extcontact_update_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

返回
顶部