最近更新时间:2021-03-12
出租车发票识别用于识别您上传的出租车发票图片中的信息,并将识别的结果返回给您。支持全国各主要城市出租车发票的关键字段信息识别,包括发票号码、代码、日期、上车时间、下车时间、里程、金额。
调用地址:https://apim.unicloud.com/api/ocr/taxiinvoice/1.0.0/
请求方式:POST
返回类型:JSON
Header如下:
| 参数 | 值 | 说明 |
|---|---|---|
| Content-Type | application/json | -- |
| Authorization | Bearer | 参考Token获取 |
Body如下:
| 参数 | 是否必选 | 类型 | 可选值范围 | 说明 |
|---|---|---|---|---|
| taxi_pic | 与taxi_url二选一 | file | -- | 出租车发票图片(支持jpg、jpeg、png格式) |
| taxi_url | 与taxi_pic二选一 | string | -- | 出租车发票图片URL路径 |
注:Body使用form-data形式
curl -k -H "Authorization:Bearer 2b8296e1-86a5-3a68-bd61-9b88f9dce5c0" \ -F "taxi_pic=@imgpath.jpg" \ https://apim.unicloud.com/api/ocr/taxiinvoice/1.0.0/
curl -k -H "Authorization:Bearer 2b8296e1-86a5-3a68-bd61-9b88f9dce5c0" \ -F "taxi_pic=@imgpath.jpg" \ https://apim.unicloud.com/api/ocr/taxiinvoice/1.0.0/
| 字段 | 类型 | 说明 |
|---|---|---|
| Data | object | 检测到的数据 |
| +invoice_number | string | 发票号码 |
| +invoice_code | string | 发票代码 |
| +mileage | string | 里程 |
| +date | string | 日期 |
| +total | string | 金额 |
| +time_geton | string | 上车时间 |
| +time_getoff | string | 下车时间 |
| code | string | 是否正常返回(“succeed”,”failed”) |
出租车发票信息:
{
"Data": {
"invoice_number": "30952958",
"invoice_code": "132071881210",
"mileage": "2.90km",
"date": "2019年07月16日",
"total": "¥8.00",
"time_geton": "15:33",
"time_getoff": "15:39"
}
"code": "succeed"
}{
"Data": {
"invoice_number": "30952958",
"invoice_code": "132071881210",
"mileage": "2.90km",
"date": "2019年07月16日",
"total": "¥8.00",
"time_geton": "15:33",
"time_getoff": "15:39"
}
"code": "succeed"
}