文档

RecognizeQuotaInvoice - 定额发票识别

更新时间:

定额发票识别。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用背景高亮的方式表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
ocr:RecognizeQuotaInvoiceWrite
  • 全部资源
    *

请求参数

名称类型必填描述示例值
Urlstring

图片链接(长度不超 2048,不支持 base64)

https://img.alicdn.com/tfs/TB1SwAeXHr1gK0jSZR0XXbP8XXa-870-604.jpg
bodybyte

图片二进制文件,最大 10MB,与 URL 二选一。 使用 HTTP 方式调用,把图片二进制文件放到 HTTP body 中上传即可。 使用 SDK 的方式调用,把图片放到 SDK 的 body 中即可

图片二进制文件

支持的图片格式

  • PNG、JPG、JPEG、BMP、GIF、TIFF、WebP、PDF、OFD

返回参数

名称类型描述示例值
object

Schema of Response

RequestIdstring

请求唯一 ID

43A29C77-405E-4CC0-BC55-EE694AD00655
Datastring

返回数据

{ "data": { "invoiceCode": "153001864058", "invoiceNumber": "03555555", "AmountInWords": "拾元整", "Amount": "10.00", "title": "云南通用定额发票", "formType": "发票联" }, "ftype": 0, "height": 604, "orgHeight": 604, "orgWidth": 870, "prism_keyValueInfo": [{ "key": "invoiceCode", "keyProb": 100, "value": "153001864058", "valuePos": [{ "x": 364, "y": 259 }, { "x": 364, "y": 226 }, { "x": 641, "y": 232 }, { "x": 641, "y": 265 }], "valueProb": 100 }, { "key": "invoiceNumber", "keyProb": 100, "value": "03555555", "valuePos": [{ "x": 366, "y": 315 }, { "x": 366, "y": 282 }, { "x": 560, "y": 286 }, { "x": 560, "y": 319 }], "valueProb": 100 }, { "key": "AmountInWords", "keyProb": 100, "value": "拾元整", "valuePos": [{ "x": 317, "y": 448 }, { "x": 319, "y": 394 }, { "x": 556, "y": 401 }, { "x": 554, "y": 455 }], "valueProb": 100 }, { "key": "Amount", "keyProb": 100, "value": "10.00", "valuePos": [{ "x": 317, "y": 448 }, { "x": 319, "y": 394 }, { "x": 556, "y": 401 }, { "x": 554, "y": 455 }], "valueProb": 100 }, { "key": "title", "keyProb": 100, "value": "云南通用定额发票", "valuePos": [{ "x": 154, "y": 113 }, { "x": 155, "y": 58 }, { "x": 748, "y": 73 }, { "x": 746, "y": 129 }], "valueProb": 100 }, { "key": "formType", "keyProb": 100, "value": "发票联", "valuePos": [{ "x": 349, "y": 191 }, { "x": 351, "y": 144 }, { "x": 540, "y": 148 }, { "x": 539, "y": 196 }], "valueProb": 100 }], "sliceRect": { "x0": 0, "y0": 1, "x1": 870, "y1": 20, "x2": 867, "y2": 604, "x3": 0, "y3": 596 }, "width": 870 }
Codestring

状态码

200
Messagestring

详细信息

message

中英文字段映射

invoiceCode    发票代码
invoiceNumber    发票号码
AmountInWords    大写金额
Amount    小写金额
title    发票标题
formType    联次

示例

正常返回示例

JSON格式

{
  "RequestId": "43A29C77-405E-4CC0-BC55-EE694AD00655",
  "Data": "{ \t\"data\": { \t\t\"invoiceCode\": \"153001864058\", \t\t\"invoiceNumber\": \"03555555\", \t\t\"AmountInWords\": \"拾元整\", \t\t\"Amount\": \"10.00\", \t\t\"title\": \"云南通用定额发票\", \t\t\"formType\": \"发票联\" \t}, \t\"ftype\": 0, \t\"height\": 604, \t\"orgHeight\": 604, \t\"orgWidth\": 870, \t\"prism_keyValueInfo\": [{ \t\t\"key\": \"invoiceCode\", \t\t\"keyProb\": 100, \t\t\"value\": \"153001864058\", \t\t\"valuePos\": [{ \t\t\t\"x\": 364, \t\t\t\"y\": 259 \t\t}, { \t\t\t\"x\": 364, \t\t\t\"y\": 226 \t\t}, { \t\t\t\"x\": 641, \t\t\t\"y\": 232 \t\t}, { \t\t\t\"x\": 641, \t\t\t\"y\": 265 \t\t}], \t\t\"valueProb\": 100 \t}, { \t\t\"key\": \"invoiceNumber\", \t\t\"keyProb\": 100, \t\t\"value\": \"03555555\", \t\t\"valuePos\": [{ \t\t\t\"x\": 366, \t\t\t\"y\": 315 \t\t}, { \t\t\t\"x\": 366, \t\t\t\"y\": 282 \t\t}, { \t\t\t\"x\": 560, \t\t\t\"y\": 286 \t\t}, { \t\t\t\"x\": 560, \t\t\t\"y\": 319 \t\t}], \t\t\"valueProb\": 100 \t}, { \t\t\"key\": \"AmountInWords\", \t\t\"keyProb\": 100, \t\t\"value\": \"拾元整\", \t\t\"valuePos\": [{ \t\t\t\"x\": 317, \t\t\t\"y\": 448 \t\t}, { \t\t\t\"x\": 319, \t\t\t\"y\": 394 \t\t}, { \t\t\t\"x\": 556, \t\t\t\"y\": 401 \t\t}, { \t\t\t\"x\": 554, \t\t\t\"y\": 455 \t\t}], \t\t\"valueProb\": 100 \t}, { \t\t\"key\": \"Amount\", \t\t\"keyProb\": 100, \t\t\"value\": \"10.00\", \t\t\"valuePos\": [{ \t\t\t\"x\": 317, \t\t\t\"y\": 448 \t\t}, { \t\t\t\"x\": 319, \t\t\t\"y\": 394 \t\t}, { \t\t\t\"x\": 556, \t\t\t\"y\": 401 \t\t}, { \t\t\t\"x\": 554, \t\t\t\"y\": 455 \t\t}], \t\t\"valueProb\": 100 \t}, { \t\t\"key\": \"title\", \t\t\"keyProb\": 100, \t\t\"value\": \"云南通用定额发票\", \t\t\"valuePos\": [{ \t\t\t\"x\": 154, \t\t\t\"y\": 113 \t\t}, { \t\t\t\"x\": 155, \t\t\t\"y\": 58 \t\t}, { \t\t\t\"x\": 748, \t\t\t\"y\": 73 \t\t}, { \t\t\t\"x\": 746, \t\t\t\"y\": 129 \t\t}], \t\t\"valueProb\": 100 \t}, { \t\t\"key\": \"formType\", \t\t\"keyProb\": 100, \t\t\"value\": \"发票联\", \t\t\"valuePos\": [{ \t\t\t\"x\": 349, \t\t\t\"y\": 191 \t\t}, { \t\t\t\"x\": 351, \t\t\t\"y\": 144 \t\t}, { \t\t\t\"x\": 540, \t\t\t\"y\": 148 \t\t}, { \t\t\t\"x\": 539, \t\t\t\"y\": 196 \t\t}], \t\t\"valueProb\": 100 \t}], \t\"sliceRect\": { \t\t\"x0\": 0, \t\t\"y0\": 1, \t\t\"x1\": 870, \t\t\"y1\": 20, \t\t\"x2\": 867, \t\t\"y2\": 604, \t\t\"x3\": 0, \t\t\"y3\": 596 \t}, \t\"width\": 870 }",
  "Code": "200",
  "Message": "message"
}

错误码

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2021-08-17OpenAPI 入参发生变更看变更集
变更项变更内容
入参OpenAPI 入参发生变更
    新增入参:body
  • 本页导读 (0)
文档反馈