通行费发票识别
更新时间:2020-12-26
接口描述
支持对全国范围不同版式过路、过桥费发票的发票代码、发票号码、入口、出口、日期、时间、金额、省、市9个字段进行结构化识别
申请邀测权限
该接口正在邀测中,在正式使用之前,请先提交合作咨询,或者提交工单,提供公司名称、appid、应用场景,工作人员协助开通权限后方可使用。
请求说明
请求示例
HTTP 方法: POST
请求URL: https://aip.baidubce.com/rest/2.0/ocr/v1/toll_invoice
URL参数:
参数 | 值 |
---|---|
access_token | 通过API Key和Secret Key获取的access_token,参考“Access Token获取” |
Header如下:
参数 | 值 |
---|---|
Content-Type | application/x-www-form-urlencoded |
Body中放置请求参数,参数详情如下:
请求参数
参数 | 类型 | 是否必须 | 说明 |
---|---|---|---|
image | string | 是 | 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 |
返回说明
返回参数
参数 | 类型 | 是否必须 | 说明 |
---|---|---|---|
log_id | uint64 | 是 | 请求标识码,随机数,唯一 |
words_result_num | int | 是 | 返回字段数,统计words_result中的key值数量 |
words_result | object | 是 | 识别结果 |
+InvoiceCode | string | 是 | 发票代码 |
+InvoiceNum | string | 是 | 发票号码 |
+Entrance | string | 是 | 入口 |
+Exit | string | 是 | 出口 |
+Date | string | 是 | 日期 |
+Time | string | 是 | 时间 |
+Fare | string | 是 | 金额 |
+Province | string | 是 | 省 |
+City | string | 是 | 市 |
返回示例
"words_result": {
"Entrance": "保定北",
"Time": "13:24",
"InvoiceCode": "237001473201",
"Date": "2020-02-18",
"Exit": "邯郸",
"Fare": "110.00",
"InvoiceNum": "95876669"
"City": "保定",
"Province": "河北"
},
"log_id": "1274932270494384128",
"words_result_num": 7
}