1.1. 修改客户信息
该接口用于根据企业微信外部联系人ID修改客户部分信息
1.1.1. 请求方法
PUT /externalContact/:externalUserID
1.1.2. 请求参数
| 参数名 | 
必填 | 
类型 | 
说明 | 
| externalUserID | 
是 | 
String | 
企微客户ID | 
| mobile | 
否 | 
String | 
电话 | 
| majorFollowUser | 
否 | 
String | 
跟进人userId | 
| position | 
否 | 
String | 
职位 | 
| email | 
否 | 
String | 
邮箱 | 
| age | 
否 | 
int | 
年龄 | 
| gender | 
否 | 
int | 
外部联系人性别 0-未知 1-男性 2-女性 | 
| udeskCustomerId | 
否 | 
long | 
客服系统中的客户ID(用于关联客服工作台中辅助组件的客户详情) | 
| customFields | 
否 | 
对象数组 | 
自定义字段;自定义字段即使没有修改,也需要全量传回,不然会认为该字段被置空 | 
| -id | 
否 | 
String | 
字段id | 
| -fieldCode | 
否 | 
String | 
字段码值 | 
| -contentType | 
否 | 
String | 
字段类型 | 
| -content | 
否 | 
Object | 
字段内容 | 
1.1.3. 返回数据
| 属性名 | 
类型 | 
说明 | 
| code | 
整型 | 
执行结果码,200表示成功,其他表示错误 | 
| message | 
字符串 | 
执行结果说明 | 
| data | 
对象 | 
对象数组,每个元素详见上自定义data数据表 | 
data(客户基本信息,修改接口返回的用户信息相比查询接口不包含自定义字段实体对象和标签信息)
| 参数名 | 
类型 | 
说明 | 
| externalUserId | 
String | 
企微客户ID | 
| name | 
String | 
企微客户名称 | 
| avatar | 
String | 
头像 | 
| type | 
String | 
客户类型,1是微信用户,2是企业微信用户 | 
| gender | 
int | 
性别 0-未知 1-男性 2-女性 | 
| unionid | 
String | 
微信开放平台唯一标识 | 
| position | 
String | 
职位 | 
| email | 
String | 
邮箱 | 
| age | 
int | 
年龄 | 
| customField | 
String | 
自定义字段json格式 | 
1.1.4. 自定义字段入参校验规则
- date日期,格式支持"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"和yyyy-MM-dd,其他格式报错
 
- datetime日期时间,格式支持"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"和yyyy-MM-dd HH:mm:ss(毫秒自动补0),其他格式报错
 
- number整数,非整数报错
 
- numeric实数,支持整数和小数,非数字类型报错
 
- phone电话号码,格式不对报错
 
1.1.5. 请求示例
curl --location --request PUT 'https://[子域名].wefeng360.com/api/v1/externalContact/wm_3b_EAAAhcgXh5DPmcM555t9c_jXQQ?sign=fbdd2e45e3bd9d1f1e4915863cff62c2d6f901490070741b821ad55d7e231552×tamp=1619143576' --header 'Content-Type: application/json'
1.1.6. 入参示例
{
  "mobile": "13311111111",
  "corpFullName": "阿里巴巴",
  "majorFollowUser": "wangqingyu",
  "remarkName": "AAAAA",
  "position": "马云专用捶腿员",
  "address": "444",
  "birthday": "2021-08-03",
  "email": "149286928@qq.com",
  "gender": 1,
  "remarkDesc": "aaaaa",
  "age": 15,
  "wxNo": "a???",
  "wxUserFlag": "NO",
  "customFields": [{
    "id": 2485,
    "fieldCode": "CustomField_2485",
    "contentType": "droplist",
    "content": 2
  },
    {
      "id": 2768,
      "contentType": "droplist",
      "fieldCode": "CustomField_2768",
      "content": 2
    },
    {
      "id": 2769,
      "contentType": "chained_droplist",
      "fieldCode": "CustomField_2769",
      "content": [
        4,
        5
      ]
    },
    {
      "id": 2770,
      "contentType": "droplist",
      "fieldCode": "CustomField_2770",
      "content": 1
    },
    {
      "id": 5827,
      "contentType": "text",
      "fieldCode": "CustomField_5827",
      "content": "嘿嘿"
    }
  ]
}
1.1.7. 返回示例
{
    "succeed": true,
    "code": 200,
    "bizCode": "000000",
    "message": "OK",
    "visible": false,
    "data": {
        "externalUserId": "wm_3b_EAAAEQyVXM8nkvyRuxgJpO_6sQ",
        "name": "心乱如麻",
        "avatar": "http://wx.qlogo.cn/mmhead/Q3auHgzwzM4H7bf5vtt2lZngwk0AP7nK3LsgL9WyKNgqNVtTIA4LBA/0",
        "type": 1,
        "corpName": null,
        "corpFullName": "阿里巴巴",
        "gender": 1,
        "unionid": "obLjYs0NjMcFFTBF9ki3XEMdWluc",
        "position": "马云专用捶腿员",
        "email": "149286928@qq.com",
        "age": 15,
        "birthday": "2021-08-03",
        "majorFollowUser": "wangqingyu",
        "wxNo": "a???",
        "address": "444",
        "remarkName": "AAAAA",
        "remarkDesc": "aaaaa",
        "customField": "[{\"id\": 2485, \"content\": 2, \"fieldCode\": \"CustomField_2485\", \"fieldName\": null, \"contentType\": \"droplist\"}, {\"id\": 2768, \"content\": 2, \"fieldCode\": \"CustomField_2768\", \"fieldName\": null, \"contentType\": \"droplist\"}, {\"id\": 2769, \"content\": [4, 5], \"fieldCode\": \"CustomField_2769\", \"fieldName\": null, \"contentType\": \"chained_droplist\"}, {\"id\": 2770, \"content\": 1, \"fieldCode\": \"CustomField_2770\", \"fieldName\": null, \"contentType\": \"droplist\"}, {\"id\": 5827, \"content\": \"嘿嘿\", \"fieldCode\": \"CustomField_5827\", \"fieldName\": null, \"contentType\": \"text\"}]",
        "customFields": null,
        "externalTags": null
    }
}