17. URL同步白名单

描述:

下发URL文件地址,批量同步白名单,设备无该名单会新增,有该名单会覆盖。
注意:文件格式需使用.txt文本格式,文件内容须符合规定的json格式,一行一个json

请求说明:

协议 方法 PATH
HTTPS POST /openApi/face/urlSyncWhites

Body参数:

参数 类型 必填 说明
appId String appId
expires String 过期时间
sign String 签名
deviceNo String 设备编号
cmd String 固定值:faceUrlSyncWhites
data String 白名单文件地址
- url String 白名单文件地址

返回参数:

参数 类型 必填 说明
code int 响应状态码
msg String 响应消息
appId String appId
expires String 过期时间
sign String 签名
deviceNo String 设备编号
cmd String 固定值:faceUrlSyncWhites
data String 空字符串,固定值:””

文件参数:

参数名 必选 类型 说明
userType int 名单类型,1:白名单,2:黑名单,3:访客
buildingNo String 幢号
roomNo String 房间号
smallOpenId String 小程序用户标识
phoneNumber String 手机号
callPriority int 呼叫优先级,0:高,1:中,2:低(呼叫房间内存在多个用户时按优先级排序后,逐个顺序呼叫)
name String 姓名
sex String 性别,例:男,女
nation String 民族
idNo String 人员编号(如果有证件号码需下发证件号码,没有平台可以自定义,不能重复)
peopleStartDate String 名单有效期开始时间,例:2025-12-27 19:32:06
peopleEndDate String 名单有效期结束时间,例:2030-03-27 19:32:06
idIssue String 身份证签发机关
idAddress String 身份证地址
icNo String IC或ID卡号
birthday String 生日,例:1997-04-03
timeGroupId String 普通时间组ID(可设置不同的通行时间段)时间段外提示“无权限进入,请在指定时间段内识别”
specialGroupId String 特殊时间ID
group String 一级部门分类,例:公司
groupSuffix String 二级部门分类,例:部门
passAlgo boolean false:必须要带图片,true:该名单录入可以不用带图片
picUrl String url下载图片的地址
featureBase64Str String 人脸特征值字段可以为空,当该字段不为空时,passAlgo字段必须为true

文件格式:

{"userType": 1,"buildingNo": "A1","roomNo": "101","smallOpenId": "","phoneNumber": "13800000000","callPriority": 0,"name": "张三","sex": "男","nation": "汉","idNo": "1001","peopleStartDate": "2026-08-31 00:00:00","peopleEndDate": "2027-08-31 00:00:00","idIssue": "","idAddress": "","icNo": "","birthday": "","timeGroupId": "","specialGroupId": "","group": "","groupSuffix": "","passAlgo": true,"picUrl": "","featureBase64Str": ""}
{"userType": 1,"buildingNo": "A2","roomNo": "102","smallOpenId": "","phoneNumber": "13900000000","callPriority": 0,"name": "李四","sex": "男","nation": "汉","idNo": "1001","peopleStartDate": "2026-08-31 00:00:00","peopleEndDate": "2027-08-31 00:00:00","idIssue": "","idAddress": "","icNo": "","birthday": "","timeGroupId": "","specialGroupId": "","group": "","groupSuffix": "","passAlgo": true,"picUrl": "","featureBase64Str": ""}

请求示例:

{
    "appId": "ym3b7f242fc0814489",
    "expires": "1739583239",
    "sign": "36f392b389e945b5c7ca8baa36fae53b",
    "deviceNo": "123456789-987654321",
    "cmd": "faceUrlSyncWhites",
    "data": "{\"url\":\"https://file.ymlot.cn/mercloud/productimg/kunshan.txt\"}"}

返回示例:

{
    "code": 0,
    "msg": "操作成功",
    "appId": "ymc03e8b5544714290",
    "expires": "1767858071",
    "sign": "1d8b5f21e27a73e1e19b1487045e64ab",
    "deviceNo": "123456789-987654321",
    "cmd": "faceUrlSyncWhites",
    "data": ""
}
作者:陈炳炎  创建时间:2026-08-31 09:41
最后编辑:陈炳炎  更新时间:2026-08-31 10:33