Skip to content

识别文件中的健康证

健康证识别接口,支持JPG/JPEG/PNG/BMP四种文件类型的一次性的识别。文件大小需要小于10M。

Tip: 单租户限流:10QPS,同租户下的应用没有限流,共享本租户的 10QPS 限流

请求

项目
HTTP URLhttps://open.feishu.cn/open-apis/document_ai/v1/health_certificate/recognize
HTTP MethodPOST
接口频率限制10 次/秒
支持的应用类型custom,isv
权限要求 调用该 API 所需的权限。开启其中任意一项权限即可调用document_ai:health_certificate:recognize 识别健康证

请求头

名称类型必填描述
Authorizationstringtenant_access_tokenuser_access_token 值格式:"Bearer access_token" 示例值:"Bearer u-7f1bcd13fc57d46bac21793a18e560" 了解更多:如何选择与获取 access token
Content-Typestring示例值:"multipart/form-data; boundary=---7MA4YWxkTrZu0gW"

请求体

名称类型必填描述
filefile识别的健康证源文件
示例值:file binary

请求体示例

HTTP
---7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="file";
Content-Type: application/octet-stream


---7MA4YWxkTrZu0gW

响应

响应体

名称类型描述
codeint错误码,非 0 表示失败
msgstring错误描述
data\--
  └ health_certificatehealth_certificate健康证信息
    └ entitieshealth_certificate_entity\[\]识别出的实体类型
      └ typestring识别的字段种类
可选值有
- name: 姓名 - issued_by: 发证机关 - date_of_handling: 办证日期 - date_of_issue: 发证日期 - date_of_medical_examination: 体检日期 - valid_date: 有效日期 - other_date: 其他日期
      └ valuestring识别出字段的文本信息

响应体示例

json
{
    "code": 0,
    "msg": "success",
    "data": {
        "health_certificate": {
            "entities": [
                {
                    "type": "id_number",
                    "value": "张三"
                }
            ]
        }
    }
}

错误码

HTTP状态码错误码描述排查建议
4002110001Param is invalid输入文件错误,参考文档检查输入参数
4002110002No valid entity未检测出健康证信息,参考文档检查输入文件是否有效
4002110003You have reached the Intelligent document parsing limit. To continue using this function, please contact sales to purchase more.后端服务异常或网络异常,可重新请求
5002110010Internal error, please try later.智能文档解析次数已达使用上限,如需继续使用,请联系销售购买

内容来源:飞书开放平台 · 自动爬取整理