JSON格式(客服和管理员角色调用)
| Name | Type | Comment |
|---|---|---|
| id | integer | 用户id,由系统自动分配 |
| url | string | 资源url |
| string | 用户邮箱 | |
| name | string | 用户昵称 |
| remark_name | string | 用户备注姓名 |
| agent_display_name | string | 客服处理工单时显示名称 |
| mark_star | integer | 是否是星标用户,可选值:1、0,默认为 0 |
| role | string | 用户角色,可选值:end_user、agent、admin |
| phone | string | 用户手机 |
| phone_bind | boolean | 手机是否绑定 |
| landline | landline | 座机号 |
| signature | string | 客服处理工单时显示签名 |
| details | string | 详细信息 |
| notes | string | 用户说明 |
| organization_id | integer | 用户所属组织id |
| language | string | 用户的偏好语言 |
| created_at | date | 创建时间 |
| updated_at | date | 最后更新时间 |
| last_login_at | date | 最近登录时间 |
| status | string | 用户状态,可选值:suspended暂停,active正常,unverified未审核 |
| groups_info | object | 当该用户为客服及以上角色时,为该用户所在的所有客服组id和name |
| photo | string | 用户头像图片的url地址 |
| moderator | boolean | 客服文档权限,true表示能编辑文档 |
| public_comments | boolean | 客服回复工单权限,false为只能私密回复 |
| manage_people | boolean | 客服管理用户权限,true表示可以管理用户 |
| ticket_restriction | string | 客服受理工单权限,all表示可以受理所有工单, groups表示只能受理客服组的工单, assigned表示只能受理分配的工单 |
| custom_role_id | integer | 客服所属的自定义角色id,高级服务模式才有此功能。 若值不为空,那么上面的客服权限字段不再起作用, 权限按照custom_role里的设置生效 |
| wechat_appid | string | 微信公众号的原始 id |
| wechat_openid | string | 微信用户的 openid |
| wechat_miniprogram_appid | string | 微信小程序的原始 id |
| wechat_miniprogram_openid | string | 微信小程序用户的 openid |
| tags | array | 用户标签 |
| user_fields | array | 用户自定义字段 |
JSON 示例(客服和管理员角色调用)
{
"id": 733,
"url": "https://support.kf5.com/apiv2/users/733.json",
"email": "support@kf5.com",
"name": "小叶",
"agent_display_name": "客服小叶",
"mark_star": 0,
"role": "admin",
"phone": "",
"phone_bind": false,
"signature": "客户==上帝?true:false",
"details": "金牌客服",
"notes": "一些简介",
"organization_id": 186,
"language": "zh_cn",
"created_at": "2012-05-08 11:26:29",
"updated_at": "2015-01-04 16:15:42",
"last_login_at": "2015-01-09 16:20:29",
"status": "active",
"photo": "https://support.kf5.com/upload/4/201306/1371800160_490.gif",
"moderator": false,
"public_comments": false,
"manage_people": false,
"ticket_restriction": "all",
"custom_role_id": null,
"wechat_appid": "gh_e5103c9f4f0d",
"wechat_openid": "olIHQ032sNbhlkBZDogwz06kQtxA",
"wechat_miniprogram_appid": "gh_6a89cad623fb",
"wechat_miniprogram_openid": "o22QC0WpvDp2Abj_MD7t3ne5MvNg",
"tags": [
"tag1",
"tag2"
],
"user_fields": [
{
"name": "field_7",
"value": "男"
},
{
"name": "field_11",
"value": "技术客服"
}
]}