Skip to content

Update User Partial Attributes

Request Description

Request Headers

Parameter NameChinese NameRequiredTypeDescription
AuthorizationAuthorizationYesStringFormat: Bearer {access_token}
Content-TypeContent TypeYesStringFixed value: application/json; charset=utf-8

Request Example

Example of updating the user's name

json
{
  	"name": "张三"
}

Example of updating username, name, mobile, email, extended attributes, etc.

json
{
  	"user_name":"zhangsan",
	"name":"张三",
	"mobile":"15200000000",
	"email":"15200000000@qq.com",
    "head_img": "data:image/jpeg;base64,......."
}

Update the user's identity information based on the requested user ID parameter, supporting partial user attribute updates. For example, when the request parameter only contains the user's name, the system only updates the user's name, and other user attributes remain unchanged.

Request Parameters

Parameter NameChinese NameRequiredTypeDescription
user_nameUsernameNoStringUsername, the unique identifier of the user within the enterprise. Can be specified in the request parameters; if not passed, the system will generate it automatically
nameNameNoString
mobileMobile NumberNoString
emailEmailNoString
attr_genderGenderNoStringOptional values: "unknow": confidential "male": male "female": female
attr_birthdayBirthdayNoStringFormat: yyyy-mm-dd
attr_nick_nameNicknameNoString
mailing_addressMailing AddressNoString
zip_codeZip CodeNoString
first_nameFirst NameNoString
middle_nameMiddle NameNoString
last_nameLast NameNoString
industryIndustryNoString
extensionExtended AttributesNoJSONObjectExtended attributes; extended attributes need to be defined in the enterprise
head_imgUser AvatarNoStringUser avatar, supports base64-encoded image strings and URLs starting with http or https

Note: The enterprise can modify whether system-built-in attributes are required and their display names in "Enterprise Center - User Attribute Definition" (system attributes cannot be deleted), and can also extend user attributes according to business needs. Interface request parameters are processed based on the attributes defined in the "User Attribute Definition" module.

Response Example

Success Example

HTTP/1.1 200 OK

json
{
  "user_id": "20201028102749564-9082-DC8CD2722"
}

Error Example

HTTP/1.1 400 Bad Request

json
{
  "error_msg": "User not found",
  "error_code": "IDAAS.TENANT.USER.0001"
}

Response Parameters

Parameter NameChinese NameTypeDescription
user_idUser IDString

Error Codes

Status CodeError CodeChinese Error MessageEnglish Error MessageResolution
400IDAAS.TENANT.USER.0001用户未找到User not foundPlease check whether the user exists
400IDAAS.TENANT.USER.0002用户名不能为空Username cannot be emptyPlease check whether the username field in the request parameters is empty
400IDAAS.TENANT.USER.0003姓名不能为空Name cannot be emptyPlease check whether the name field in the request parameters is empty
400IDAAS.TENANT.USER.0004手机号不能为空Mobile number cannot be emptyPlease check whether the mobile number field in the request parameters is empty
400IDAAS.TENANT.USER.0005邮箱不能为空E-mail cannot be emptyPlease check whether the email field in the request parameters is empty
400IDAAS.TENANT.USER.0007性别不能为空Gender cannot be emptyPlease check whether the gender field in the request parameters is empty
400IDAAS.TENANT.USER.0008生日不能为空Birthday cannot be emptyPlease check whether the birthday field in the request parameters is empty
400IDAAS.TENANT.USER.0009昵称不能为空Nick name cannot be emptyPlease check whether the nickname field in the request parameters is empty
400IDAAS.TENANT.USER.0010邮寄地址不能为空Mailing address cannot be emptyPlease check whether the mailing address field in the request parameters is empty
400IDAAS.TENANT.USER.0011邮政编码不能为空Zip code cannot be emptyPlease check whether the zip code field in the request parameters is empty
400IDAAS.TENANT.USER.0012名字不能为空First name cannot be emptyPlease check whether the first name field in the request parameters is empty
400IDAAS.TENANT.USER.0013中间名不能为空Middle name cannot be emptyPlease check whether the middle name field in the request parameters is empty
400IDAAS.TENANT.USER.0014姓氏不能为空Last name cannot be emptyPlease check whether the last name field in the request parameters is empty
400IDAAS.TENANT.USER.0015所属行业不能为空Industry cannot be emptyPlease check whether the industry field in the request parameters is empty
400IDAAS.TENANT.USER.0017扩展属性{0}不能为空Extended property {0} cannot be emptyPlease check whether the external ID field in the request parameters is empty
400IDAAS.TENANT.USER.0018用户名不符合校验规则The username does not meet the verification rulesPlease check whether the username field in the request parameters meets the validation rules in "Enterprise Center - User - User Attribute Definition"
400IDAAS.TENANT.USER.0019姓名不符合校验规则The name does not meet the verification rulesPlease check whether the name field in the request parameters meets the validation rules in "Enterprise Center - User - User Attribute Definition"
400IDAAS.TENANT.USER.0020手机号不符合校验规则The mobile number does not meet the verification rulesPlease check whether the mobile number field in the request parameters meets the validation rules in "Enterprise Center - User - User Attribute Definition"
400IDAAS.TENANT.USER.0021邮箱不符合校验规则The e-mail does not meet the verification rulesPlease check whether the email field in the request parameters meets the validation rules in "Enterprise Center - User - User Attribute Definition"
400IDAAS.TENANT.USER.0023性别不符合校验规则The gender does not meet the verification rulesPlease check whether the gender field in the request parameters meets the validation rules in "Enterprise Center - User - User Attribute Definition"
400IDAAS.TENANT.USER.0024生日不符合校验规则The birthday does not meet the verification rulesPlease check whether the birthday field in the request parameters meets the validation rules in "Enterprise Center - User - User Attribute Definition"
400IDAAS.TENANT.USER.0025昵称不符合校验规则The nickname does not meet the verification rulesPlease check whether the nickname field in the request parameters meets the validation rules in "Enterprise Center - User - User Attribute Definition"
400IDAAS.TENANT.USER.0026邮寄地址不符合校验规则The mailing address does not meet the verification rulesPlease check whether the mailing address field in the request parameters meets the validation rules in "Enterprise Center - User - User Attribute Definition"
400IDAAS.TENANT.USER.0027邮政编码不符合校验规则The zip code does not meet the verification rulesPlease check whether the zip code field in the request parameters meets the validation rules in "Enterprise Center - User - User Attribute Definition"
400IDAAS.TENANT.USER.0028名字不符合校验规则The first name does not meet the verification rulesPlease check whether the first name field in the request parameters meets the validation rules in "Enterprise Center - User - User Attribute Definition"
400IDAAS.TENANT.USER.0029中间名不符合校验规则The middle name does not meet the verification rulesPlease check whether the middle name field in the request parameters meets the validation rules in "Enterprise Center - User - User Attribute Definition"
400IDAAS.TENANT.USER.0030姓氏不符合校验规则The last name does not meet the verification rulesPlease check whether the last name field in the request parameters meets the validation rules in "Enterprise Center - User - User Attribute Definition"
400IDAAS.TENANT.USER.0031所属行业不符合校验规则The industry does not meet the verification rulesPlease check whether the industry field in the request parameters meets the validation rules in "Enterprise Center - User - User Attribute Definition"
400IDAAS.TENANT.USER.0033扩展属性{0}不符合校验规则The extended attribute {0} does not meet the verification rulesPlease check whether the external ID field in the request parameters meets the validation rules in "Enterprise Center - User - User Attribute Definition"
400IDAAS.TENANT.MOBILE.0002未经认证的手机号An unauthenticated cell mobile numberPlease check whether the "Enterprise Center - Enterprise Configuration - International Dialing Code Configuration" meets the configuration rules
400IDAAS.TENANT.USER.0034用户名已存在Username already existsPlease check whether the user exists
400IDAAS.TENANT.USER.0035手机号已存在Mobile number already existsDelete the mobile number and re-add it, or replace it with a mobile number that has not been added
400IDAAS.TENANT.USER.0036邮箱已存在E-mail already existsDelete the email and re-add it, or replace it with an email that has not been added
400IDAAS.TENANT.USER.0037扩展属性{0}已存在Extended property {0} already existsDelete the extended property {0} and re-add it, or replace it with an extended property {0} that has not been added

BambooCloud IDaaS Open Platform