在文字识别ocr中,前端可以用js直接去调-增值税发票识别的接口吗?可以的话有没有代码示例?我现在只开通了免费的票据凭证识别的OCR服务,还没有那个appcode,然后在这上面调用是成功了的,但是这里的skd没有js的。
在文字识别ocr中,前端可以用js直接去调-增值税发票识别的接口吗?可以的话有没有代码示例?[阿里云OCR]
「点点赞赏,手留余香」
还没有人赞赏,快来当第一个赞赏的人吧!
在文字识别ocr中,前端可以用js直接去调-增值税发票识别的接口吗?可以的话有没有代码示例?我现在只开通了免费的票据凭证识别的OCR服务,还没有那个appcode,然后在这上面调用是成功了的,但是这里的skd没有js的。
可以的。
RecognizeInvoice – 增值税发票识别
https://help.aliyun.com/document_detail/442267.html?spm=a2c4g.465204.0.i4
本接口适用场景
阿里云增值税发票识别,是阿里云官方自研OCR文字识别产品,适用于识别增值税发票上所包含的价税合计、发票代码、发票号码等关键信息的场景。
阿里云OCR产品基于阿里巴巴达摩院强大的AI技术及海量数据,历经多年沉淀打磨,具有服务稳定、操作简易、实时性高、能力全面等几大优势。
本接口图片示例
示例
正常返回示例
JSON格式
{
“RequestId”: “43A29C77-405E-4CC0-BC55-EE694AD00655”,
“Data”: “{ “angle”: 0, “data”: { “invoiceCode”: “031001600211”, “invoiceNumber”: “67516978”, “printedInvoiceCode”: “”, “printedInvoiceNumber”: “”, “invoiceDate”: “2017年02月12日”, “machineCode”: “661619906841”, “checkCode”: “62850389773340912868”, “purchaserName”: “黄宏伟”, “purchaserTaxNumber”: “”, “purchaserContactInfo”: “”, “purchaserBankAccountInfo”: “”, “passwordArea”: “<87*>>53>5023>-446>/4+83/5 >5/81<75/1931>4>>73<0+2/0/ 4378-2*7*-9<1-0>27>167/9831 3588/+/81<75/1931>4>>7571<", "invoiceAmountPreTax": "75.21", "invoiceTax": "12.79", "totalAmountInWords": "捌拾捌圆整", "totalAmount": "88.00", "sellerName": "上海电子商务有限公司", "sellerTaxNumber": "91310106552993944D", "sellerContactInfo": "上海市静安区延安中路841号东方海外大厦2601室021-62898", "sellerBankAccountInfo": "中国银行股份有限公司上海市华山路支行4403592358", "recipient": "", "reviewer": "", "drawer": "天猫超市", "remarks": "", "title": "上海增值税电子普通发票", "formType": "", "invoiceType": "电子普通发票", "specialTag": "", "invoiceDetails": [{ "itemName": "【天猫超市】倍斯特移动电源20000M毫安充电宝手机通用大容量快充", "specification": "", "unit": "", "quantity": "1", "unitPrice": "75.21", "amount": "75.21", "taxRate": "17%", "tax": "12.79" }] }, "height": 523, "orgHeight": 523, "orgWidth": 808, "prism_keyValueInfo": [{ "key": "invoiceCode", "keyProb": 100, "value": "031001600211", "valuePos": [{ "x": 700, "y": 23 }, { "x": 700, "y": 35 }, { "x": 630, "y": 35 }, { "x": 630, "y": 22 }], "valueProb": 100 }, { "key": "invoiceNumber", "keyProb": 100, "value": "67516978", "valuePos": [{ "x": 678, "y": 47 }, { "x": 678, "y": 60 }, { "x": 630, "y": 60 }, { "x": 630, "y": 47 }], "valueProb": 100 }, { "key": "printedInvoiceCode", "keyProb": 100, "value": "", "valueProb": 100 }, { "key": "printedInvoiceNumber", "keyProb": 100, "value": "", "valueProb": 100 }, { "key": "invoiceDate", "keyProb": 100, "value": "2017年02月12日", "valuePos": [{ "x": 735, "y": 70 }, { "x": 735, "y": 85 }, { "x": 632, "y": 85 }, { "x": 632, "y": 70 }], "valueProb": 100 }, { "key": "machineCode", "keyProb": 100, "value": "661619906841", "valuePos": [{ "x": 153, "y": 95 }, { "x": 153, "y": 107 }, { "x": 83, "y": 107 }, { "x": 83, "y": 95 }], "valueProb": 100 }, { "key": "checkCode", "keyProb": 100, "value": "62850389773340912868", "valuePos": [{ "x": 762, "y": 95 }, { "x": 762, "y": 108 }, { "x": 630, "y": 108 }, { "x": 630, "y": 95 }], "valueProb": 100 }, { "key": "purchaserName", "keyProb": 100, "value": "黄宏伟", "valuePos": [{ "x": 169, "y": 121 }, { "x": 169, "y": 136 }, { "x": 130, "y": 136 }, { "x": 130, "y": 121 }], "valueProb": 100 }, { "key": "purchaserTaxNumber", "keyProb": 100, "value": "", "valueProb": 100 }, { "key": "purchaserContactInfo", "keyProb": 100, "value": "", "valueProb": 100 }, { "key": "purchaserBankAccountInfo", "keyProb": 100, "value": "", "valueProb": 100 }, { "key": "passwordArea", "keyProb": 100, "value": "<87>>53>5023>-446>/4+83/5 >5/81<75/1931>4>>73<0+2/0/ 4378-2*7*-9<1-0>27>167/9831 3*588/+/81<75/1931>4>>7571<", "valuePos": [{ "x": 768, "y": 126 }, { "x": 768, "y": 199 }, { "x": 505, "y": 199 }, { "x": 505, "y": 125 }], "valueProb": 100 }, { "key": "invoiceAmountPreTax", "keyProb": 100, "value": "75.21", "valuePos": [{ "x": 634, "y": 360 }, { "x": 634, "y": 374 }, { "x": 576, "y": 374 }, { "x": 576, "y": 360 }], "valueProb": 100 }, { "key": "invoiceTax", "keyProb": 100, "value": "12.79", "valuePos": [{ "x": 788, "y": 360 }, { "x": 788, "y": 374 }, { "x": 729, "y": 374 }, { "x": 729, "y": 360 }], "valueProb": 100 }, { "key": "totalAmountInWords", "keyProb": 100, "value": "捌拾捌圆整", "valuePos": [{ "x": 246, "y": 382 }, { "x": 311, "y": 381 }, { "x": 311, "y": 395 }, { "x": 247, "y": 397 }], "valueProb": 100 }, { "key": "totalAmount", "keyProb": 100, "value": "88.00", "valuePos": [{ "x": 628, "y": 395 }, { "x": 629, "y": 381 }, { "x": 689, "y": 382 }, { "x": 689, "y": 397 }], "valueProb": 100 }, { "key": "sellerName", "keyProb": 100, "value": "上海电子商务有限公司", "valuePos": [{ "x": 278, "y": 407 }, { "x": 278, "y": 422 }, { "x": 129, "y": 422 }, { "x": 129, "y": 407 }], "valueProb": 100 }, { "key": "sellerTaxNumber", "keyProb": 100, "value": "91310106552993944D", "valuePos": [{ "x": 129, "y": 427 }, { "x": 307, "y": 425 }, { "x": 307, "y": 440 }, { "x": 130, "y": 441 }], "valueProb": 100 }, { "key": "sellerContactInfo", "keyProb": 100, "value": "上海市静安区延安中路841号东方海外大厦2601室021-62898", "valuePos": [{ "x": 128, "y": 447 }, { "x": 410, "y": 447 }, { "x": 410, "y": 461 }, { "x": 128, "y": 461 }], "valueProb": 100 }, { "key": "sellerBankAccountInfo", "keyProb": 100, "value": "中国银行股份有限公司上海市华山路支行4403592358", "valuePos": [{ "x": 413, "y": 464 }, { "x": 413, "y": 478 }, { "x": 130, "y": 478 }, { "x": 130, "y": 464 }], "valueProb": 100 }, { "key": "recipient", "keyProb": 100, "value": "", "valueProb": 100 }, { "key": "reviewer", "keyProb": 100, "value": "", "valueProb": 100 }, { "key": "drawer", "keyProb": 100, "value": "天猫超市", "valuePos": [{ "x": 507, "y": 490 }, { "x": 507, "y": 506 }, { "x": 456, "y": 506 }, { "x": 456, "y": 490 }], "valueProb": 100 }, { "key": "remarks", "keyProb": 100, "value": "", "valueProb": 100 }, { "key": "title", "keyProb": 99, "value": "上海增值税电子普通发票", "valuePos": [{ "x": 553, "y": 37 }, { "x": 553, "y": 69 }, { "x": 252, "y": 68 }, { "x": 252, "y": 36 }], "valueProb": 99 }, { "key": "formType", "keyProb": 100, "value": "", "valueProb": 100 }, { "key": "invoiceType", "keyProb": 99, "value": "电子普通发票", "valuePos": [{ "x": 553, "y": 37 }, { "x": 553, "y": 69 }, { "x": 252, "y": 68 }, { "x": 252, "y": 36 }], "valueProb": 99 }, { "key": "specialTag", "keyProb": 100, "value": "", "valueProb": 100 }, { "key": "invoiceDetails", "keyProb": 100, "value": "[{"itemName":"【天猫超市】倍斯特移动电源20000M毫安充电宝手机通用大容量快充","specification":"","unit":"","quantity":"1","unitPrice":"75.21","amount":"75.21","taxRate":"17%","tax":"12.79"}]", "valueProb": 100 }], "width": 808 }",
“Code”: “如果识别成功,不会返回此字段”,
“Message”: “如果识别成功,不会返回此字段”
}