文字识别 OCR-名片识别:响应参数

时间:2024-04-15 09:41:20

响应参数

根据识别的结果,可能有不同的HTTP响应状态码(status code)。例如,200表示API调用成功,400表示调用失败,详细的状态码和响应参数说明如下。

状态码: 200

表4 响应Body参数

参数

参数类型

描述

result

BusinessCardResult object

识别结果。

调用失败时不返回此字段。

表5 BusinessCardResult

参数

参数类型

描述

name

Array of strings

姓名列表。

title

Array of strings

职位头衔列表。

company

Array of strings

公司列表。

department

Array of strings

部门列表。

phone

Array of strings

联系方式列表。

address

Array of strings

地址列表。

email

Array of strings

邮箱列表。

fax

Array of strings

传真列表。

postcode

Array of strings

邮编列表。

website

Array of strings

公司网址列表。

extra_info_list

Array of ExtraInfoList objects

其余信息列表。

adjusted_image

String

返回矫正后的名片图像的BASE64编码。

表6 ExtraInfoList

参数

参数类型

描述

item

String

表示“key”值,例如:bank等。

value

String

表示“value”值,例如:bank等。

note

Array of strings

对应“item”关联的额外信息,为“bank”时第一个默认为户名,第二个为开户行。

状态码: 400

表7 响应Body参数

参数

参数类型

说明

error_code

String

调用失败时的错误码,具体请参见错误码

当出现错误码“ModelArts.4204”时,请参考为什么调用API时提示“ModelArts.4204”?章节。

调用成功时不返回此字段。

error_msg

String

调用失败时返回的错误信息。

调用成功时不返回此字段。

support.huaweicloud.com/api-ocr/ocr_03_0120.html