识别文件中的机动车发票
机动车发票识别接口,支持JPG/JPEG/PNG/BMP四种文件类型的一次性的识别。文件大小需要小于10M。
Tip: 单租户限流:10QPS,同租户下的应用没有限流,共享本租户的 10QPS 限流
请求
| 项目 | 值 |
|---|---|
| HTTP URL | https://open.feishu.cn/open-apis/document_ai/v1/vehicle_invoice/recognize |
| HTTP Method | POST |
| 接口频率限制 | 10 次/秒 |
| 支持的应用类型 | custom,isv |
| 权限要求 调用该 API 所需的权限。开启其中任意一项权限即可调用 | document_ai:vehicle_invoice: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 | \- | - |
└ vehicle_invoice | vehicle_invoice | 机动车发票信息 |
└ entities | vehicle_invoice_entity\[\] | 识别出的实体类型 |
└ type | string | 识别的字段种类 可选值有: - invoice_code: 发票代码 - invoice_num: 发票号码 - date: 开票日期 - print_code: 机打代码 - print_num: 机打号码 - machine_num: 机器编码 - buyer_name: 购买方名称 - buyer_id: 购买方纳税人识别号 - vehicle_type: 车辆类型 - product_model: 厂牌型号 - certificate_num: 合格证号 - engine_num: 发动机号码 - vin: 车架号 - total_price: 价税合计 - total_price_little: 小写金额 - saler_name: 销货单位名称 - saler_id: 销售方纳税人识别号 - saler_addr: 地址 - tax_rate: 税率 - tax: 税额 - price: 不含税价格 |
└ value | string | 识别出字段的文本信息 |
响应体示例
json
{
"code": 0,
"msg": "success",
"data": {
"vehicle_invoice": {
"entities": [
{
"type": "SalerName",
"value": "xxxx公司"
}
]
}
}
}错误码
| 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. | 智能文档解析次数已达使用上限,如需继续使用,请联系销售购买 |
