修改用户
POST /v1/api/user/update
通过此接口修改BW用户。
Name |
Required |
Type |
Description |
x-api-tenantId |
yes |
string |
租户编号 |
x-api-token |
yes |
string |
认证token |
x-language |
no |
string |
语言,zh-CN、en-US |
Request Body Parameters
Name |
Required |
Type |
Description |
id |
yes |
integer |
用户ID |
roleId |
no |
integer |
用户角色ID |
levelId |
no |
integer |
用户层级ID |
parentId |
no |
integer |
上级用户ID |
entityNo |
no |
number |
用户编码,没传则自动生成 |
name |
no |
number |
用户名 |
address |
no |
string |
详细地址 |
phone |
no |
object |
电话数据,见电话数据类型 |
country |
no |
string |
国家ID |
province |
no |
string |
省份ID |
city |
no |
string |
城市ID |
comment |
no |
string |
评论s |
serverId |
no |
integer |
Manager服务器ID |
login |
no |
integer |
账户ID |
points1 |
no |
string |
分值1 |
points2 |
no |
string |
分值2 |
points3 |
no |
string |
分值3 |
points4 |
no |
string |
分值4 |
points5 |
no |
string |
分值5 |
points6 |
no |
string |
分值6 |
points7 |
no |
string |
分值7 |
- 电话数据类型
Name |
Type |
Description |
phone |
string |
电话 |
countryCode |
string |
国家码 |
Response
Name |
Type |
Description |
result |
boolean |
成功标识,返回true,表示请求成功,false表示请求失败 |
mcode |
string |
错误码,成功时返回m00000,失败时返回对应的错误码,见文档默认错误码说明 |
errorMessage |
string |
错误提示信息,部分错误码时有值 |
Example
请求示例
POST /v1/api/user/info
{
"name":"zzz123",
"roleId":1,
"phone":{"countryCode":"+86", "phone":"1888888"},
"levelId":"10",
"parentId":"4",
"points2":"12"
}
返回示例:成功
{
"mcode": "m0000000",
"result": true
}
返回示例:失败
{
"mcode": "PUB_AUTH_0000007",
"result": false
}
2. Error 错误处理
错误码表(Error Code)
mcode |
MessageBW_API_ |
BW_API_0000001 |
token为空 |
BW_API_0000003 |
无效租户ID |
BW_API_0000004 |
未开通OPENAPI权限 |
PUB_AUTH_0000002 |
手机格式错误 |
PUB_AUTH_0000007 |
邮箱邮箱已被注册 |
BW_USER_NAME_NULL |
用户名字为空 |
BW_USER_ENTITYNO_REPEAT |
用户编码重复 |
-1 |
服务异常,请稍后再试 |
bw-user_1008 |
Email已存在 |
bw-user_1007 |
生成编码错误 |
bw-user_1009 |
角色不存在 |
bw-user_1010 |
层级不存在 |
bw-user_1013 |
名字已存在 |
bw-user_1014 |
循环检查不通过 |
bw-user_1016 |
权限Sid非法 |
bw-user_1018 |
该账户已被占用 |
bw-user_1019 |
编码已存在 |
bw-user_1020 |
返佣层级不能大于上级用户的层级 |