RecognizeUsedCarInvoice - 二手车统一销售发票识别

支持包括发票代码、发票号码、开票日期、发票金额、购买方名称、购买方身份证号等关键字段结构化识别输出。

调试

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

授权信息

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

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

请求参数

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

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

https://img.alicdn.com/imgextra/i4/O1CN01NiY6e220zrtvT6dFJ_!!6000000006921-0-tps-3468-4624.jpg
bodybyte

图片二进制字节流,最大 10MB

图片二进制

支持的图片格式

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

返回参数

名称类型描述示例值
object

Schema of Response

RequestIdstring

请求唯一 ID

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

返回数据

{"angle":270,"data":{"title":"二手车销售统一发票","formType":"发票联","invoiceDate":"2021-03-19","invoiceCode":"021002000117","invoiceNumber":"00713899","printedInvoiceCode":"021002000117","printedInvoiceNumber":"00713899","taxCode":"03300173880207579449","purchaserName":"李壮","purchaserCode":"210105198712104354","purchaserAddress":"沈阳市皇姑区泰山路69-50号3-1-3","purchaserPhoneNumber":"18947857689","sellerName":"张鹏","sellerCode":"210105197807263716","sellerAddress":"沈阳市皇姑区宁山东路甲2号3-5-2","sellerPhoneNumber":"17641587456","licensePlateNumber":"辽A6L136","certificateNumber":"210008639051","vehicleType":"小型轿车","vinCode":"WAUYGB4H3FN031973","brandMode":"奥迪WAUYGB4H","vehicleAdministrationName":"沈阳市车管所","totalAmountInWords":"壹万圆整","totalAmount":"10000.00","marketName":"沈阳车顶尚二手车交易市场有限公司","marketTaxNumber":"91210106MA0TURHE35","marketAddress":"沈阳市铁西区北二西路29甲4号(9门)","marketBankAccountInfo":"葫芦岛银行股份有限公司沈阳分行20008411159000000025","marketPhoneNumber":"15940287043","remarks":"","drawer":"张丽"},"ftype":0,"height":4624,"orgHeight":4624,"orgWidth":3468,"prism_keyValueInfo":[{"key":"title","keyProb":100,"value":"二手车销售统一发票","valuePos":[{"x":2715,"y":228},{"x":2715,"y":347},{"x":1283,"y":352},{"x":1282,"y":233}],"valueProb":100},{"key":"formType","keyProb":85,"value":"发票联","valuePos":[{"x":2289,"y":401},{"x":2290,"y":510},{"x":1701,"y":512},{"x":1701,"y":403}],"valueProb":85},{"key":"invoiceDate","keyProb":100,"value":"2021-03-19","valuePos":[{"x":728,"y":568},{"x":729,"y":504},{"x":1142,"y":509},{"x":1141,"y":573}],"valueProb":100},{"key":"invoiceCode","keyProb":100,"value":"021002000117","valuePos":[{"x":3090,"y":376},{"x":3676,"y":359},{"x":3678,"y":432},{"x":3093,"y":450}],"valueProb":100},{"key":"invoiceNumber","keyProb":100,"value":"00713899","valuePos":[{"x":3099,"y":457},{"x":3470,"y":449},{"x":3472,"y":523},{"x":3100,"y":530}],"valueProb":100},{"key":"printedInvoiceCode","keyProb":100,"value":"021002000117","valuePos":[{"x":1307,"y":621},{"x":1308,"y":683},{"x":812,"y":688},{"x":812,"y":626}],"valueProb":100},{"key":"printedInvoiceNumber","keyProb":100,"value":"00713899","valuePos":[{"x":811,"y":797},{"x":812,"y":731},{"x":1155,"y":738},{"x":1153,"y":803}],"valueProb":100},{"key":"taxCode","keyProb":100,"value":"03300173880207579449","valuePos":[{"x":3005,"y":755},{"x":3005,"y":818},{"x":2184,"y":825},{"x":2183,"y":761}],"valueProb":100},{"key":"purchaserName","keyProb":100,"value":"李壮","valuePos":[{"x":1139,"y":977},{"x":1260,"y":977},{"x":1260,"y":1044},{"x":1139,"y":1044}],"valueProb":100},{"key":"purchaserCode","keyProb":100,"value":"210105198712104354","valuePos":[{"x":3502,"y":992},{"x":3502,"y":1054},{"x":2802,"y":1054},{"x":2802,"y":992}],"valueProb":100},{"key":"purchaserAddress","keyProb":100,"value":"沈阳市皇姑区泰山路69-50号3-1-3","valuePos":[{"x":1138,"y":1105},{"x":1988,"y":1105},{"x":1988,"y":1176},{"x":1138,"y":1176}],"valueProb":100},{"key":"purchaserPhoneNumber","keyProb":100,"value":"18947857689","valuePos":[{"x":2996,"y":1115},{"x":3466,"y":1115},{"x":3466,"y":1181},{"x":2996,"y":1181}],"valueProb":100},{"key":"sellerName","keyProb":100,"value":"张鹏","valuePos":[{"x":1137,"y":1227},{"x":1259,"y":1227},{"x":1259,"y":1296},{"x":1137,"y":1296}],"valueProb":100},{"key":"sellerCode","keyProb":100,"value":"210105197807263716","valuePos":[{"x":3501,"y":1245},{"x":3501,"y":1305},{"x":2807,"y":1307},{"x":2806,"y":1247}],"valueProb":100},{"key":"sellerAddress","keyProb":100,"value":"沈阳市皇姑区宁山东路甲2号3-5-2","valuePos":[{"x":1991,"y":1353},{"x":1991,"y":1422},{"x":1137,"y":1426},{"x":1136,"y":1356}],"valueProb":100},{"key":"sellerPhoneNumber","keyProb":100,"value":"17641587456","valuePos":[{"x":3460,"y":1372},{"x":3461,"y":1433},{"x":2996,"y":1435},{"x":2996,"y":1373}],"valueProb":100},{"key":"licensePlateNumber","keyProb":100,"value":"辽A6L136","valuePos":[{"x":1470,"y":1471},{"x":1471,"y":1541},{"x":1140,"y":1544},{"x":1139,"y":1474}],"valueProb":100},{"key":"certificateNumber","keyProb":100,"value":"210008639051","valuePos":[{"x":2433,"y":1489},{"x":2433,"y":1549},{"x":1981,"y":1553},{"x":1981,"y":1493}],"valueProb":100},{"key":"vehicleType","keyProb":100,"value":"小型轿车","valuePos":[{"x":2994,"y":1498},{"x":3229,"y":1498},{"x":3229,"y":1562},{"x":2994,"y":1562}],"valueProb":100},{"key":"vinCode","keyProb":100,"value":"WAUYGB4H3FN031973","valuePos":[{"x":1601,"y":1587},{"x":1601,"y":1633},{"x":1138,"y":1638},{"x":1137,"y":1591}],"valueProb":100},{"key":"brandMode","keyProb":100,"value":"奥迪WAUYGB4H","valuePos":[{"x":2330,"y":1616},{"x":2330,"y":1677},{"x":1986,"y":1677},{"x":1986,"y":1616}],"valueProb":100},{"key":"vehicleAdministrationName","keyProb":100,"value":"沈阳市车管所","valuePos":[{"x":3347,"y":1621},{"x":3347,"y":1690},{"x":2989,"y":1693},{"x":2989,"y":1624}],"valueProb":100},{"key":"totalAmountInWords","keyProb":100,"value":"壹万圆整","valuePos":[{"x":1528,"y":1730},{"x":1529,"y":1799},{"x":1292,"y":1801},{"x":1291,"y":1732}],"valueProb":100},{"key":"totalAmount","keyProb":100,"value":"10000.00","valuePos":[{"x":3479,"y":1746},{"x":3479,"y":1816},{"x":3048,"y":1820},{"x":3047,"y":1749}],"valueProb":100},{"key":"marketName","keyProb":100,"value":"沈阳车顶尚二手车交易市场有限公司","valuePos":[{"x":2037,"y":2282},{"x":2037,"y":2354},{"x":1124,"y":2362},{"x":1124,"y":2290}],"valueProb":100},{"key":"marketTaxNumber","keyProb":96,"value":"91210106MA0TURHE35","valuePos":[{"x":3079,"y":2255},{"x":3079,"y":2314},{"x":2397,"y":2321},{"x":2396,"y":2261}],"valueProb":96},{"key":"marketAddress","keyProb":100,"value":"沈阳市铁西区北二西路29甲4号(9门)","valuePos":[{"x":3306,"y":2378},{"x":3307,"y":2445},{"x":2399,"y":2453},{"x":2399,"y":2387}],"valueProb":100},{"key":"marketBankAccountInfo","keyProb":100,"value":"葫芦岛银行股份有限公司沈阳分行20008411159000000025","valuePos":[{"x":2522,"y":2480},{"x":2523,"y":2554},{"x":1109,"y":2567},{"x":1109,"y":2494}],"valueProb":100},{"key":"marketPhoneNumber","keyProb":100,"value":"15940287043","valuePos":[{"x":3172,"y":2579},{"x":3173,"y":2518},{"x":3603,"y":2530},{"x":3601,"y":2590}],"valueProb":100},{"key":"remarks","keyProb":100,"value":"","valueProb":100},{"key":"drawer","keyProb":100,"value":"张丽","valuePos":[{"x":2787,"y":2819},{"x":2789,"y":2756},{"x":2914,"y":2761},{"x":2911,"y":2823}],"valueProb":100}],"sliceRect":{"x0":103,"y0":372,"x1":3174,"y1":428,"x2":3041,"y2":4364,"x3":161,"y3":4360},"width":3468}
Codestring

错误码

noPermission
Messagestring

错误提示

You are not authorized to perform this operation.

返回数据说明

title 标题
formType 联次
invoiceDate 开票日期
invoiceCode 发票代码
invoiceNumber 发票号码
printedInvoiceCode 机打代码
printedInvoiceNumber 机打号码
taxCode 税控码
purchaserName 买方单位/个人
purchaserCode 买方单位代码/身份证号码
purchaserAddress 买方单位/个人地址
purchaserPhoneNumber 买方电话
sellerName 卖方单位/个人
sellerCode 卖方单位代码/身份证号码
sellerAddress 卖方单位/个人住址
sellerPhoneNumber 卖方电话
licensePlateNumber 车牌照号
certificateNumber 登记证号
vehicleType 车辆类型
vinCode 车架号/车辆识别代码
brandMode 厂牌型号
vehicleAdministrationName  转入地车辆管理所名称
totalAmountInWords 车价合计(大写)
totalAmount 车价合计(小写)
marketName 二手车市场名称
marketTaxNumber 二手车市场纳税人识别号
marketAddress 二手车市场地址
marketBankAccountInfo 二手车市场开户银行及账户
marketPhoneNumber 二手车市场电话
remarks 备注
drawer 开票人

angle              角度:0-360,0 表示向上,90 表示向右,180 表示向下,270 度表示向左</br>
height            算法矫正图片后的高度
width             算法矫正图片后的宽度
orgHeight      原图的高度
orgWidth       原图的宽度
----------------------------------------prism_keyValueInfo 文字块数组内的字段说明---------------------------------------
valuePos 外矩形四个点的坐标按顺时针排列,左上、右上、右下、左下

示例

正常返回示例

JSON格式

{
  "RequestId": "43A29C77-405E-4CC0-BC55-EE694AD00655",
  "Data": "{\"angle\":270,\"data\":{\"title\":\"二手车销售统一发票\",\"formType\":\"发票联\",\"invoiceDate\":\"2021-03-19\",\"invoiceCode\":\"021002000117\",\"invoiceNumber\":\"00713899\",\"printedInvoiceCode\":\"021002000117\",\"printedInvoiceNumber\":\"00713899\",\"taxCode\":\"03300173880207579449\",\"purchaserName\":\"李壮\",\"purchaserCode\":\"210105198712104354\",\"purchaserAddress\":\"沈阳市皇姑区泰山路69-50号3-1-3\",\"purchaserPhoneNumber\":\"18947857689\",\"sellerName\":\"张鹏\",\"sellerCode\":\"210105197807263716\",\"sellerAddress\":\"沈阳市皇姑区宁山东路甲2号3-5-2\",\"sellerPhoneNumber\":\"17641587456\",\"licensePlateNumber\":\"辽A6L136\",\"certificateNumber\":\"210008639051\",\"vehicleType\":\"小型轿车\",\"vinCode\":\"WAUYGB4H3FN031973\",\"brandMode\":\"奥迪WAUYGB4H\",\"vehicleAdministrationName\":\"沈阳市车管所\",\"totalAmountInWords\":\"壹万圆整\",\"totalAmount\":\"10000.00\",\"marketName\":\"沈阳车顶尚二手车交易市场有限公司\",\"marketTaxNumber\":\"91210106MA0TURHE35\",\"marketAddress\":\"沈阳市铁西区北二西路29甲4号(9门)\",\"marketBankAccountInfo\":\"葫芦岛银行股份有限公司沈阳分行20008411159000000025\",\"marketPhoneNumber\":\"15940287043\",\"remarks\":\"\",\"drawer\":\"张丽\"},\"ftype\":0,\"height\":4624,\"orgHeight\":4624,\"orgWidth\":3468,\"prism_keyValueInfo\":[{\"key\":\"title\",\"keyProb\":100,\"value\":\"二手车销售统一发票\",\"valuePos\":[{\"x\":2715,\"y\":228},{\"x\":2715,\"y\":347},{\"x\":1283,\"y\":352},{\"x\":1282,\"y\":233}],\"valueProb\":100},{\"key\":\"formType\",\"keyProb\":85,\"value\":\"发票联\",\"valuePos\":[{\"x\":2289,\"y\":401},{\"x\":2290,\"y\":510},{\"x\":1701,\"y\":512},{\"x\":1701,\"y\":403}],\"valueProb\":85},{\"key\":\"invoiceDate\",\"keyProb\":100,\"value\":\"2021-03-19\",\"valuePos\":[{\"x\":728,\"y\":568},{\"x\":729,\"y\":504},{\"x\":1142,\"y\":509},{\"x\":1141,\"y\":573}],\"valueProb\":100},{\"key\":\"invoiceCode\",\"keyProb\":100,\"value\":\"021002000117\",\"valuePos\":[{\"x\":3090,\"y\":376},{\"x\":3676,\"y\":359},{\"x\":3678,\"y\":432},{\"x\":3093,\"y\":450}],\"valueProb\":100},{\"key\":\"invoiceNumber\",\"keyProb\":100,\"value\":\"00713899\",\"valuePos\":[{\"x\":3099,\"y\":457},{\"x\":3470,\"y\":449},{\"x\":3472,\"y\":523},{\"x\":3100,\"y\":530}],\"valueProb\":100},{\"key\":\"printedInvoiceCode\",\"keyProb\":100,\"value\":\"021002000117\",\"valuePos\":[{\"x\":1307,\"y\":621},{\"x\":1308,\"y\":683},{\"x\":812,\"y\":688},{\"x\":812,\"y\":626}],\"valueProb\":100},{\"key\":\"printedInvoiceNumber\",\"keyProb\":100,\"value\":\"00713899\",\"valuePos\":[{\"x\":811,\"y\":797},{\"x\":812,\"y\":731},{\"x\":1155,\"y\":738},{\"x\":1153,\"y\":803}],\"valueProb\":100},{\"key\":\"taxCode\",\"keyProb\":100,\"value\":\"03300173880207579449\",\"valuePos\":[{\"x\":3005,\"y\":755},{\"x\":3005,\"y\":818},{\"x\":2184,\"y\":825},{\"x\":2183,\"y\":761}],\"valueProb\":100},{\"key\":\"purchaserName\",\"keyProb\":100,\"value\":\"李壮\",\"valuePos\":[{\"x\":1139,\"y\":977},{\"x\":1260,\"y\":977},{\"x\":1260,\"y\":1044},{\"x\":1139,\"y\":1044}],\"valueProb\":100},{\"key\":\"purchaserCode\",\"keyProb\":100,\"value\":\"210105198712104354\",\"valuePos\":[{\"x\":3502,\"y\":992},{\"x\":3502,\"y\":1054},{\"x\":2802,\"y\":1054},{\"x\":2802,\"y\":992}],\"valueProb\":100},{\"key\":\"purchaserAddress\",\"keyProb\":100,\"value\":\"沈阳市皇姑区泰山路69-50号3-1-3\",\"valuePos\":[{\"x\":1138,\"y\":1105},{\"x\":1988,\"y\":1105},{\"x\":1988,\"y\":1176},{\"x\":1138,\"y\":1176}],\"valueProb\":100},{\"key\":\"purchaserPhoneNumber\",\"keyProb\":100,\"value\":\"18947857689\",\"valuePos\":[{\"x\":2996,\"y\":1115},{\"x\":3466,\"y\":1115},{\"x\":3466,\"y\":1181},{\"x\":2996,\"y\":1181}],\"valueProb\":100},{\"key\":\"sellerName\",\"keyProb\":100,\"value\":\"张鹏\",\"valuePos\":[{\"x\":1137,\"y\":1227},{\"x\":1259,\"y\":1227},{\"x\":1259,\"y\":1296},{\"x\":1137,\"y\":1296}],\"valueProb\":100},{\"key\":\"sellerCode\",\"keyProb\":100,\"value\":\"210105197807263716\",\"valuePos\":[{\"x\":3501,\"y\":1245},{\"x\":3501,\"y\":1305},{\"x\":2807,\"y\":1307},{\"x\":2806,\"y\":1247}],\"valueProb\":100},{\"key\":\"sellerAddress\",\"keyProb\":100,\"value\":\"沈阳市皇姑区宁山东路甲2号3-5-2\",\"valuePos\":[{\"x\":1991,\"y\":1353},{\"x\":1991,\"y\":1422},{\"x\":1137,\"y\":1426},{\"x\":1136,\"y\":1356}],\"valueProb\":100},{\"key\":\"sellerPhoneNumber\",\"keyProb\":100,\"value\":\"17641587456\",\"valuePos\":[{\"x\":3460,\"y\":1372},{\"x\":3461,\"y\":1433},{\"x\":2996,\"y\":1435},{\"x\":2996,\"y\":1373}],\"valueProb\":100},{\"key\":\"licensePlateNumber\",\"keyProb\":100,\"value\":\"辽A6L136\",\"valuePos\":[{\"x\":1470,\"y\":1471},{\"x\":1471,\"y\":1541},{\"x\":1140,\"y\":1544},{\"x\":1139,\"y\":1474}],\"valueProb\":100},{\"key\":\"certificateNumber\",\"keyProb\":100,\"value\":\"210008639051\",\"valuePos\":[{\"x\":2433,\"y\":1489},{\"x\":2433,\"y\":1549},{\"x\":1981,\"y\":1553},{\"x\":1981,\"y\":1493}],\"valueProb\":100},{\"key\":\"vehicleType\",\"keyProb\":100,\"value\":\"小型轿车\",\"valuePos\":[{\"x\":2994,\"y\":1498},{\"x\":3229,\"y\":1498},{\"x\":3229,\"y\":1562},{\"x\":2994,\"y\":1562}],\"valueProb\":100},{\"key\":\"vinCode\",\"keyProb\":100,\"value\":\"WAUYGB4H3FN031973\",\"valuePos\":[{\"x\":1601,\"y\":1587},{\"x\":1601,\"y\":1633},{\"x\":1138,\"y\":1638},{\"x\":1137,\"y\":1591}],\"valueProb\":100},{\"key\":\"brandMode\",\"keyProb\":100,\"value\":\"奥迪WAUYGB4H\",\"valuePos\":[{\"x\":2330,\"y\":1616},{\"x\":2330,\"y\":1677},{\"x\":1986,\"y\":1677},{\"x\":1986,\"y\":1616}],\"valueProb\":100},{\"key\":\"vehicleAdministrationName\",\"keyProb\":100,\"value\":\"沈阳市车管所\",\"valuePos\":[{\"x\":3347,\"y\":1621},{\"x\":3347,\"y\":1690},{\"x\":2989,\"y\":1693},{\"x\":2989,\"y\":1624}],\"valueProb\":100},{\"key\":\"totalAmountInWords\",\"keyProb\":100,\"value\":\"壹万圆整\",\"valuePos\":[{\"x\":1528,\"y\":1730},{\"x\":1529,\"y\":1799},{\"x\":1292,\"y\":1801},{\"x\":1291,\"y\":1732}],\"valueProb\":100},{\"key\":\"totalAmount\",\"keyProb\":100,\"value\":\"10000.00\",\"valuePos\":[{\"x\":3479,\"y\":1746},{\"x\":3479,\"y\":1816},{\"x\":3048,\"y\":1820},{\"x\":3047,\"y\":1749}],\"valueProb\":100},{\"key\":\"marketName\",\"keyProb\":100,\"value\":\"沈阳车顶尚二手车交易市场有限公司\",\"valuePos\":[{\"x\":2037,\"y\":2282},{\"x\":2037,\"y\":2354},{\"x\":1124,\"y\":2362},{\"x\":1124,\"y\":2290}],\"valueProb\":100},{\"key\":\"marketTaxNumber\",\"keyProb\":96,\"value\":\"91210106MA0TURHE35\",\"valuePos\":[{\"x\":3079,\"y\":2255},{\"x\":3079,\"y\":2314},{\"x\":2397,\"y\":2321},{\"x\":2396,\"y\":2261}],\"valueProb\":96},{\"key\":\"marketAddress\",\"keyProb\":100,\"value\":\"沈阳市铁西区北二西路29甲4号(9门)\",\"valuePos\":[{\"x\":3306,\"y\":2378},{\"x\":3307,\"y\":2445},{\"x\":2399,\"y\":2453},{\"x\":2399,\"y\":2387}],\"valueProb\":100},{\"key\":\"marketBankAccountInfo\",\"keyProb\":100,\"value\":\"葫芦岛银行股份有限公司沈阳分行20008411159000000025\",\"valuePos\":[{\"x\":2522,\"y\":2480},{\"x\":2523,\"y\":2554},{\"x\":1109,\"y\":2567},{\"x\":1109,\"y\":2494}],\"valueProb\":100},{\"key\":\"marketPhoneNumber\",\"keyProb\":100,\"value\":\"15940287043\",\"valuePos\":[{\"x\":3172,\"y\":2579},{\"x\":3173,\"y\":2518},{\"x\":3603,\"y\":2530},{\"x\":3601,\"y\":2590}],\"valueProb\":100},{\"key\":\"remarks\",\"keyProb\":100,\"value\":\"\",\"valueProb\":100},{\"key\":\"drawer\",\"keyProb\":100,\"value\":\"张丽\",\"valuePos\":[{\"x\":2787,\"y\":2819},{\"x\":2789,\"y\":2756},{\"x\":2914,\"y\":2761},{\"x\":2911,\"y\":2823}],\"valueProb\":100}],\"sliceRect\":{\"x0\":103,\"y0\":372,\"x1\":3174,\"y1\":428,\"x2\":3041,\"y2\":4364,\"x3\":161,\"y3\":4360},\"width\":3468}",
  "Code": "noPermission",
  "Message": "You are not authorized to perform this operation."
}

错误码

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

变更历史

变更时间变更内容概要操作
暂无变更历史