识别文件中的健康证
健康证识别接口,支持JPG/JPEG/PNG/BMP四种文件类型的一次性的识别。文件大小需要小于10M。
Tip: 单租户限流:10QPS,同租户下的应用没有限流,共享本租户的 10QPS 限流
请求
| 项目 | 值 |
|---|---|
| HTTP URL | https://open.feishu.cn/open-apis/document_ai/v1/health_certificate/recognize |
| HTTP Method | POST |
| 接口频率限制 | 10 次/秒 |
| 支持的应用类型 | custom,isv |
| 权限要求 调用该 API 所需的权限。开启其中任意一项权限即可调用 | document_ai:health_certificate:recognize 识别健康证 |
请求头
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| Authorization | string | 是 | tenant_access_token 或 user_access_token 值格式:"Bearer access_token" 示例值:"Bearer u-7f1bcd13fc57d46bac21793a18e560" 了解更多:如何选择与获取 access token |
| Content-Type | string | 是 | 示例值:"multipart/form-data; boundary=---7MA4YWxkTrZu0gW" |
请求体
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
file | file | 是 | 识别的健康证源文件 示例值:file binary |
请求体示例
HTTP
---7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="file";
Content-Type: application/octet-stream
---7MA4YWxkTrZu0gW响应
响应体
| 名称 | 类型 | 描述 |
|---|---|---|
code | int | 错误码,非 0 表示失败 |
msg | string | 错误描述 |
data | \- | - |
└ health_certificate | health_certificate | 健康证信息 |
└ entities | health_certificate_entity\[\] | 识别出的实体类型 |
└ type | string | 识别的字段种类 可选值有: - name: 姓名 - issued_by: 发证机关 - date_of_handling: 办证日期 - date_of_issue: 发证日期 - date_of_medical_examination: 体检日期 - valid_date: 有效日期 - other_date: 其他日期 |
└ value | string | 识别出字段的文本信息 |
响应体示例
json
{
"code": 0,
"msg": "success",
"data": {
"health_certificate": {
"entities": [
{
"type": "id_number",
"value": "张三"
}
]
}
}
}错误码
| HTTP状态码 | 错误码 | 描述 | 排查建议 |
|---|---|---|---|
| 400 | 2110001 | Param is invalid | 输入文件错误,参考文档检查输入参数 |
| 400 | 2110002 | No valid entity | 未检测出健康证信息,参考文档检查输入文件是否有效 |
| 400 | 2110003 | You have reached the Intelligent document parsing limit. To continue using this function, please contact sales to purchase more. | 后端服务异常或网络异常,可重新请求 |
| 500 | 2110010 | Internal error, please try later. | 智能文档解析次数已达使用上限,如需继续使用,请联系销售购买 |
