Customer Identity (CIAM)

Modify Partial User Attributes

# Request Description

PUT https://{your_domain}/api/v2/tenant/users/{user_id}

# Request Headers

Parameter Name Chinese Name Required Type Description
Authorization Authorization Yes String Format: Bearer {access_token}
Content-Type Content Type Yes String Fixed value: application/json; charset=utf-8

# Request Example

Example of modifying user's name
{
  	"name": "Zhang San"
}

Example of modifying username, name, mobile, email, extended attributes, etc.
{
  	"user_name":"zhangsan",
	"name":"Zhang San",
	"mobile":"15200000000",
	"email":"15200000000@qq.com",
    "head_img": "data:image/jpeg;base64,......."
}
1
2
3
4
5
6
7
8
9
10
11
12
13

Updates the user's identity information based on the provided user ID parameter, supporting the update of partial user attributes. For example, if the request parameters only contain the user's name, the system will only update the user's name, leaving other user attributes unchanged.

# Request Parameters

Parameter Name Chinese Name Required Type Description
user_name Username No String Username, the unique identifier of the user within the enterprise, can be specified in the request parameters. If not provided, the system will automatically generate one.
name Name No String
mobile Mobile Number No String
email Email No String
attr_gender Gender No String Optional values: "unknow": Confidential "male": Male "female": Female
attr_birthday Birthday No String Format: yyyy-mm-dd
attr_nick_name Nickname No String
mailing_address Mailing Address No String
zip_code Postal Code No String
first_name First Name No String
middle_name Middle Name No String
last_name Last Name No String
industry Industry No String
extension Extended Attributes No JSONObject Extended attributes, which need to be defined within the enterprise.
head_img User Avatar No String User avatar, supports base64 encoded image strings and URLs starting with http or https.

Note: Enterprises can modify the mandatory status and display name of system-built attributes (system attributes cannot be deleted) in "Enterprise Center - User Attribute Definition" based on actual needs. They can also extend user attributes according to enterprise requirements. 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
Content-Type: application/json
{
  "user_id": "20201028102749564-9082-DC8CD2722"
}


Error Example:
HTTP/1.1 400 Bad Request
{
  "error_msg": "User not found",
  "error_code": "IDAAS.TENANT.USER.0001"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14

# Response Parameters

Parameter Name Chinese Name Type Description
user_id User ID String

# Error Codes

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

I am ready to proceed. Please provide the Markdown content you would like me to translate into English.