summaryrefslogtreecommitdiff
path: root/data/en_us/ocr
diff options
context:
space:
mode:
Diffstat (limited to 'data/en_us/ocr')
-rw-r--r--data/en_us/ocr/2019-12-30/api-docs.php5276
1 files changed, 2777 insertions, 2499 deletions
diff --git a/data/en_us/ocr/2019-12-30/api-docs.php b/data/en_us/ocr/2019-12-30/api-docs.php
index bc47eb3..0dbdf08 100644
--- a/data/en_us/ocr/2019-12-30/api-docs.php
+++ b/data/en_us/ocr/2019-12-30/api-docs.php
@@ -1,49 +1,21 @@
<?php return [
'version' => '1.0',
- 'info' => [
- 'style' => 'RPC',
- 'product' => 'ocr',
- 'version' => '2019-12-30',
- ],
+ 'info' => ['style' => 'RPC', 'product' => 'ocr', 'version' => '2019-12-30'],
'directories' => [
[
- 'id' => 66262,
- 'title' => null,
+ 'children' => ['GetAsyncJobResult'],
'type' => 'directory',
- 'children' => [
- 'GetAsyncJobResult',
- ],
+ 'title' => 'Asynchronous Result',
],
[
- 'id' => 66264,
- 'title' => null,
+ 'children' => ['RecognizeBankCard', 'RecognizeBusinessLicense', 'RecognizeCharacter', 'RecognizeDriverLicense', 'RecognizeDrivingLicense', 'RecognizeIdentityCard', 'RecognizeLicensePlate', 'RecognizeQrCode', 'RecognizeTable', 'RecognizeTaxiInvoice', 'RecognizeTrainTicket', 'RecognizeVATInvoice', 'RecognizeVINCode'],
'type' => 'directory',
- 'children' => [
- 'RecognizeBankCard',
- 'RecognizeBusinessLicense',
- 'RecognizeCharacter',
- 'RecognizeDriverLicense',
- 'RecognizeDrivingLicense',
- 'RecognizeIdentityCard',
- 'RecognizeLicensePlate',
- 'RecognizeQrCode',
- 'RecognizeTable',
- 'RecognizeTaxiInvoice',
- 'RecognizeTrainTicket',
- 'RecognizeVATInvoice',
- 'RecognizeVINCode',
- ],
+ 'title' => 'Detect',
],
[
- 'id' => 0,
- 'title' => '其它',
+ 'children' => ['RecognizePdf', 'RecognizeQuotaInvoice', 'RecognizeTicketInvoice'],
+ 'title' => 'Others',
'type' => 'directory',
- 'children' => [
- 'RecognizePdf',
- 'RecognizeTicketInvoice',
- 'RecognizeQuotaInvoice',
- 'RecognizeVideoCharacter',
- ],
],
],
'components' => [
@@ -51,13 +23,8 @@
],
'apis' => [
'GetAsyncJobResult' => [
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -65,19 +32,12 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- ],
+ 'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
'name' => 'JobId',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'E75FE679-0303-4DD1-8252-1143B4FA8A27',
- ],
+ 'schema' => ['description' => 'The RequestId returned by the asynchronous operation. You can use this ID to query the actual result of the asynchronous operation.', 'type' => 'string', 'required' => true, 'example' => 'E75FE679-0303-4DD1-8252-1143B4FA8A27', 'title' => ''],
],
],
'responses' => [
@@ -86,83 +46,104 @@
'description' => '1',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'A1F44EC4-118D-4A03-B213-F908F36F7DAA',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'A1F44EC4-118D-4A03-B213-F908F36F7DAA', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
'type' => 'object',
'properties' => [
- 'Status' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'PROCESS_SUCCESS',
- ],
- 'ErrorMessage' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'paramsIllegal',
- ],
- 'Result' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '',
- ],
- 'ErrorCode' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'InvalidParameter',
- ],
- 'JobId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '49E2CC28-ED1D-4CC5-854D-7D0AE2B20976',
- ],
+ 'Status' => ['description' => 'The status of the asynchronous task. Valid values:'."\n"
+ ."\n"
+ .'- QUEUING: The task is queuing.'."\n"
+ ."\n"
+ .'- PROCESSING: The task is being processed.'."\n"
+ ."\n"
+ .'- PROCESS_SUCCESS: The task is processed.'."\n"
+ ."\n"
+ .'- PROCESS_FAILED: The task failed to be processed.'."\n"
+ ."\n"
+ .'- TIMEOUT_FAILED: The task timed out.'."\n"
+ ."\n"
+ .'- LIMIT_RETRY_FAILED: The maximum number of retries is exceeded.', 'type' => 'string', 'example' => 'PROCESS_SUCCESS', 'title' => ''],
+ 'ErrorMessage' => ['description' => 'The error message of the asynchronous task.', 'type' => 'string', 'example' => 'paramsIllegal', 'title' => ''],
+ 'Result' => ['description' => 'The actual result of the asynchronous task.', 'type' => 'string', 'example' => '{\\"Content\\":\\"<div > <h2 > 2017 年 3 月 40 多家陶企上榜失信被执行人名单 </h2><div > 1 月 7 日,陶卫网记者根据最高人民法院及各地法院发布的失信被执行人信息统计,2019 年 12 月全国各地有 112 家陶瓷企业被列入“失信被执行人”名单,名单涉及 21 个省(市)。此次名单中,广东省的失信陶企多达 28 家。 </div><div > 据统计,这些“失信被执行人”的上榜原因主要为债务纠纷,欠款不还,大部分为拖欠供应商货款、工资、员工赔偿、银行贷款以及融资租赁租金等,也有涉及运输、燃气等费用,小部分企业涉及承担债务连带清偿责任。 </div><table border=1> <tr><td > 公司名称 </td><td > 最新失信发布时间 </td><td > 累计失信次数 </td> </tr> <tr><td > 潮州市澳士通陶瓷实业有限公司 </td><td > 3 月 15 日 </td><td > 1 次 </td> </tr> <tr><td > 肇庆市德圣陶瓷有限公司 </td><td > 3 月 14 日 </td><td > 6 次 </td> </tr> <tr><td > 清远市港龙陶瓷有限公司 </td><td > 3 月 10 日 </td><td > 28 次 </td> </tr> <tr><td > 广西金沙江陶瓷有限公司 </td><td > 3 月 14 日 </td><td > 3 次 </td> </tr> <tr><td > 宜丰县凯扬陶瓷发展有限公司 </td><td > 3 月 29 日 </td><td > 11 次 </td> </tr> <tr><td > 江西领先精工陶瓷发展有限公司 </td><td > 3 月 29 日 </td><td > 23 次 </td> </tr> <tr><td > 高安弘建陶瓷有限公司 </td><td > 3 月 28 日 </td><td > 5 次 </td> </tr></table>\\"}', 'title' => ''],
+ 'ErrorCode' => ['description' => 'The error code of the asynchronous task.', 'type' => 'string', 'example' => 'InvalidParameter', 'title' => ''],
+ 'JobId' => ['description' => 'The asynchronous task ID.', 'type' => 'string', 'example' => '49E2CC28-ED1D-4CC5-854D-7D0AE2B20976', 'title' => ''],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"A1F44EC4-118D-4A03-B213-F908F36F7DAA\\",\\n \\"Data\\": {\\n \\"Status\\": \\"PROCESS_SUCCESS\\",\\n \\"ErrorMessage\\": \\"paramsIllegal\\",\\n \\"Result\\": \\"{\\\\\\\\\\\\\\"Content\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"<div > <h2 > 2017 年 3 月 40 多家陶企上榜失信被执行人名单 </h2><div > 1 月 7 日,陶卫网记者根据最高人民法院及各地法院发布的失信被执行人信息统计,2019 年 12 月全国各地有 112 家陶瓷企业被列入“失信被执行人”名单,名单涉及 21 个省(市)。此次名单中,广东省的失信陶企多达 28 家。 </div><div > 据统计,这些“失信被执行人”的上榜原因主要为债务纠纷,欠款不还,大部分为拖欠供应商货款、工资、员工赔偿、银行贷款以及融资租赁租金等,也有涉及运输、燃气等费用,小部分企业涉及承担债务连带清偿责任。 </div><table border=1> <tr><td > 公司名称 </td><td > 最新失信发布时间 </td><td > 累计失信次数 </td> </tr> <tr><td > 潮州市澳士通陶瓷实业有限公司 </td><td > 3 月 15 日 </td><td > 1 次 </td> </tr> <tr><td > 肇庆市德圣陶瓷有限公司 </td><td > 3 月 14 日 </td><td > 6 次 </td> </tr> <tr><td > 清远市港龙陶瓷有限公司 </td><td > 3 月 10 日 </td><td > 28 次 </td> </tr> <tr><td > 广西金沙江陶瓷有限公司 </td><td > 3 月 14 日 </td><td > 3 次 </td> </tr> <tr><td > 宜丰县凯扬陶瓷发展有限公司 </td><td > 3 月 29 日 </td><td > 11 次 </td> </tr> <tr><td > 江西领先精工陶瓷发展有限公司 </td><td > 3 月 29 日 </td><td > 23 次 </td> </tr> <tr><td > 高安弘建陶瓷有限公司 </td><td > 3 月 28 日 </td><td > 5 次 </td> </tr></table>\\\\\\\\\\\\\\"}\\",\\n \\"ErrorCode\\": \\"InvalidParameter\\",\\n \\"JobId\\": \\"49E2CC28-ED1D-4CC5-854D-7D0AE2B20976\\"\\n }\\n}","type":"json"}]',
+ 'title' => 'Query asynchronous task results',
+ 'summary' => 'This topic describes the syntax and examples of the GetAsyncJobResult operation for querying asynchronous task results.',
+ 'description' => '## Feature description'."\n"
+ .'After you invoke an asynchronous API operation, the response does not contain the actual result. Save the RequestId from the response, and then invoke GetAsyncJobResult to obtain the actual result.'."\n"
+ ."\n"
+ .'> - Files generated by asynchronous tasks expire after 30 minutes. To retain the files for a longer period, download them to a local service or store them in Object Storage Service (OSS) promptly. For more information about OSS operations, see [Upload objects](~~31886~~).'."\n"
+ .'> - To request access to Alibaba Cloud Vision Intelligence Open Platform visual AI capabilities, learn about API usage, or consult on related issues, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n\n"
+ .'Currently, RecognizeVideoCharacter in the OCR category is an asynchronous operation. You must invoke GetAsyncJobResult to obtain the actual result.',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'We recommend that you use SDKs to call Alibaba Cloud Vision AI operations. SDKs support multiple programming languages and allow you to use local files or URLs as file parameters. For more information, see [SDK overview](~~145033~~).',
+ 'extraInfo' => '## Deserialization of Result'."\n"
+ .'The deserialized Result is shown as follows.'."\n"
+ .'```'."\n"
+ .'{'."\n"
+ .' "Content": "<div > <h2 > 2017 年 3 月 40 多家陶企上榜失信被执行人名单 </h2><div > 1 月 7 日,陶卫网记者根据最高人民法院及各地法院发布的失信被执行人信息统计,2019 年 12 月全国各地有 112 家陶瓷企业被列入"失信被执行人"名单,名单涉及 21 个省(市)。此次名单中,广东省的失信陶企多达 28 家。 </div><div > 据统计,这些"失信被执行人"的上榜原因主要为债务纠纷,欠款不还,大部分为拖欠供应商货款、工资、员工赔偿、银行贷款以及融资租赁租金等,也有涉及运输、燃气等费用,小部分企业涉及承担债务连带清偿责任。 </div><table border=1> <tr><td > 公司名称 </td><td > 最新失信发布时间 </td><td > 累计失信次数 </td> </tr> <tr><td > 潮州市澳士通陶瓷实业有限公司 </td><td > 3 月 15 日 </td><td > 1 次 </td> </tr> <tr><td > 肇庆市德圣陶瓷有限公司 </td><td > 3 月 14 日 </td><td > 6 次 </td> </tr> <tr><td > 清远市港龙陶瓷有限公司 </td><td > 3 月 10 日 </td><td > 28 次 </td> </tr> <tr><td > 广西金沙江陶瓷有限公司 </td><td > 3 月 14 日 </td><td > 3 次 </td> </tr> <tr><td > 宜丰县凯扬陶瓷发展有限公司 </td><td > 3 月 29 日 </td><td > 11 次 </td> </tr> <tr><td > 江西领先精工陶瓷发展有限公司 </td><td > 3 月 29 日 </td><td > 23 次 </td> </tr> <tr><td > 高安弘建陶瓷有限公司 </td><td > 3 月 28 日 </td><td > 5 次 </td> </tr></table>"'."\n"
+ .'}'."\n"
+ .'```.'."\n"
+ ."\n"
+ .'## Error codes'."\n"
+ .'For error codes related to querying asynchronous task results, see [Common error codes](~~146772~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging console are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [
+ ['createdAt' => '2022-04-24T08:10:35.000Z', 'description' => 'Error codes changed'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetAsyncJobResult'],
+ ],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:GetAsyncJobResult',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"A1F44EC4-118D-4A03-B213-F908F36F7DAA\\",\\n \\"Data\\": {\\n \\"Status\\": \\"PROCESS_SUCCESS\\",\\n \\"ErrorMessage\\": \\"paramsIllegal\\",\\n \\"Result\\": \\"{\\\\\\\\\\\\\\"Content\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"<div > <h2 > 2017 年 3 月 40 多家陶企上榜失信被执行人名单 </h2><div > 1 月 7 日,陶卫网记者根据最高人民法院及各地法院发布的失信被执行人信息统计,2019 年 12 月全国各地有 112 家陶瓷企业被列入“失信被执行人”名单,名单涉及 21 个省(市)。此次名单中,广东省的失信陶企多达 28 家。 </div><div > 据统计,这些“失信被执行人”的上榜原因主要为债务纠纷,欠款不还,大部分为拖欠供应商货款、工资、员工赔偿、银行贷款以及融资租赁租金等,也有涉及运输、燃气等费用,小部分企业涉及承担债务连带清偿责任。 </div><table border=1> <tr><td > 公司名称 </td><td > 最新失信发布时间 </td><td > 累计失信次数 </td> </tr> <tr><td > 潮州市澳士通陶瓷实业有限公司 </td><td > 3 月 15 日 </td><td > 1 次 </td> </tr> <tr><td > 肇庆市德圣陶瓷有限公司 </td><td > 3 月 14 日 </td><td > 6 次 </td> </tr> <tr><td > 清远市港龙陶瓷有限公司 </td><td > 3 月 10 日 </td><td > 28 次 </td> </tr> <tr><td > 广西金沙江陶瓷有限公司 </td><td > 3 月 14 日 </td><td > 3 次 </td> </tr> <tr><td > 宜丰县凯扬陶瓷发展有限公司 </td><td > 3 月 29 日 </td><td > 11 次 </td> </tr> <tr><td > 江西领先精工陶瓷发展有限公司 </td><td > 3 月 29 日 </td><td > 23 次 </td> </tr> <tr><td > 高安弘建陶瓷有限公司 </td><td > 3 月 28 日 </td><td > 5 次 </td> </tr></table>\\\\\\\\\\\\\\"}\\",\\n \\"ErrorCode\\": \\"InvalidParameter\\",\\n \\"JobId\\": \\"49E2CC28-ED1D-4CC5-854D-7D0AE2B20976\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<RequestId>A1F44EC4-118D-4A03-B213-F908F36F7DAA</RequestId>\\n<Data>\\n <Status>PROCESS_SUCCESS</Status>\\n <ErrorMessage>paramsIllegal</ErrorMessage>\\n <Result>{\\\\\\"Content\\\\\\":\\\\\\"&lt;div &gt; &lt;h2 &gt; 2017 年 3 月 40 多家陶企上榜失信被执行人名单 &lt;/h2&gt;&lt;div &gt; 1 月 7 日,陶卫网记者根据最高人民法院及各地法院发布的失信被执行人信息统计,2019 年 12 月全国各地有 112 家陶瓷企业被列入“失信被执行人”名单,名单涉及 21 个省(市)。此次名单中,广东省的失信陶企多达 28 家。 &lt;/div&gt;&lt;div &gt; 据统计,这些“失信被执行人”的上榜原因主要为债务纠纷,欠款不还,大部分为拖欠供应商货款、工资、员工赔偿、银行贷款以及融资租赁租金等,也有涉及运输、燃气等费用,小部分企业涉及承担债务连带清偿责任。 &lt;/div&gt;&lt;table border=1&gt; &lt;tr&gt;&lt;td &gt; 公司名称 &lt;/td&gt;&lt;td &gt; 最新失信发布时间 &lt;/td&gt;&lt;td &gt; 累计失信次数 &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;&lt;td &gt; 潮州市澳士通陶瓷实业有限公司 &lt;/td&gt;&lt;td &gt; 3 月 15 日 &lt;/td&gt;&lt;td &gt; 1 次 &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;&lt;td &gt; 肇庆市德圣陶瓷有限公司 &lt;/td&gt;&lt;td &gt; 3 月 14 日 &lt;/td&gt;&lt;td &gt; 6 次 &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;&lt;td &gt; 清远市港龙陶瓷有限公司 &lt;/td&gt;&lt;td &gt; 3 月 10 日 &lt;/td&gt;&lt;td &gt; 28 次 &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;&lt;td &gt; 广西金沙江陶瓷有限公司 &lt;/td&gt;&lt;td &gt; 3 月 14 日 &lt;/td&gt;&lt;td &gt; 3 次 &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;&lt;td &gt; 宜丰县凯扬陶瓷发展有限公司 &lt;/td&gt;&lt;td &gt; 3 月 29 日 &lt;/td&gt;&lt;td &gt; 11 次 &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;&lt;td &gt; 江西领先精工陶瓷发展有限公司 &lt;/td&gt;&lt;td &gt; 3 月 29 日 &lt;/td&gt;&lt;td &gt; 23 次 &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;&lt;td &gt; 高安弘建陶瓷有限公司 &lt;/td&gt;&lt;td &gt; 3 月 28 日 &lt;/td&gt;&lt;td &gt; 5 次 &lt;/td&gt; &lt;/tr&gt;&lt;/table&gt;\\\\\\"}</Result>\\n <ErrorCode>InvalidParameter</ErrorCode>\\n <JobId>49E2CC28-ED1D-4CC5-854D-7D0AE2B20976</JobId>\\n</Data>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
'RecognizeBankCard' => [
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -175,92 +156,123 @@
[
'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeBankCard/yhk3.jpg',
- 'isFileTransferUrl' => true,
- 'required' => true,
- 'type' => 'string',
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) link in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeBankCard/yhk3.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'description' => '1',
+ 'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'example' => 'D9C7521-0367-42EE-9646-FD066CCADB26',
- 'type' => 'string',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'D9C7521-0367-42EE-9646-FD066CCADB26', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
+ 'type' => 'object',
'properties' => [
- 'CardNumber' => [
- 'description' => '',
- 'example' => '6212262315007683105',
- 'type' => 'string',
- ],
- 'ValidDate' => [
- 'description' => '',
- 'example' => '07/26',
- 'type' => 'string',
- ],
- 'BankName' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'CardType' => [
- 'type' => 'string',
- ],
+ 'CardNumber' => ['description' => 'The bank card number.', 'type' => 'string', 'example' => '6212262315007683105', 'title' => ''],
+ 'ValidDate' => ['description' => 'The expiration date. An empty string is returned if recognition fails. If multiple dates exist, they are separated by commas, for example, `03/17,04/05`.', 'type' => 'string', 'example' => '07/26', 'title' => ''],
+ 'BankName' => ['description' => 'The bank name. An empty string is returned if recognition fails.', 'type' => 'string', 'example' => '中国工商银行', 'title' => ''],
+ 'CardType' => ['description' => 'The bank card type. Valid values:'."\n"
+ .'- CC: credit card'."\n"
+ .'- SCC: semi-credit card'."\n"
+ .'- DCC: debit-credit card'."\n"
+ .'- DC: debit card'."\n"
+ .'- PC: prepaid card.', 'type' => 'string', 'example' => 'CC', 'title' => ''],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"D9C7521-0367-42EE-9646-FD066CCADB26\\",\\n \\"Data\\": {\\n \\"CardNumber\\": \\"6212262315007683105\\",\\n \\"ValidDate\\": \\"07/26\\",\\n \\"BankName\\": \\"中国工商银行\\",\\n \\"CardType\\": \\"CC\\"\\n }\\n}","type":"json"}]',
+ 'title' => 'Bank card recognition',
+ 'summary' => 'This topic describes the syntax and examples of the RecognizeBankCard operation for bank card recognition.',
+ 'description' => '## Feature description'."\n"
+ .'The bank card recognition feature detects mainstream bank card images and returns three pieces of information: the issuing bank, bank card number, and expiration date.'."\n"
+ ."\n"
+ .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeBankCard) to experience this feature or purchase it online.'."\n"
+ .'- For questions about API integration and usage of Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Integration guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete the registration.'."\n"
+ .'2. Activate the service: Make sure you have activated the [OCR service](https://vision.aliyun.com/ocr). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_ocr_public_cn#/open).'."\n"
+ .'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/ocr/2019-12-30/RecognizeBankCard?lang=JAVA&sdkStyle=dara&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Focr%2FRecognizeBankCard%2Fyhk1.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the OCR (ocr) category in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Direct client calls: Common client call methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Image format: JPEG, JPG, PNG, BMP, or GIF.'."\n"
+ .'- Image size: up to 3 MB.'."\n"
+ .'- Image resolution: No resolution limit is imposed. However, excessively high resolutions may cause the API to time out. The timeout period is 5 seconds.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of bank card recognition, see [Billing overview](~~202631~~).'."\n"
+ ."\n"
+ .'> The debugging operation below is a paid operation. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeBankCard).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'For the bank card recognition feature under the Alibaba Cloud Vision AI OCR category, we recommend that you use the SDK. The SDK supports multiple programming languages. When calling this operation, select the SDK package for the OCR (ocr) category. File parameters can be passed as local files or arbitrary URLs through the SDK. For more information, see [SDK overview](~~145033~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of bank card recognition, see [Common error codes](~~146772~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [
+ ['createdAt' => '2023-12-19T09:06:31.000Z', 'description' => 'Response parameters changed'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeBankCard'],
+ ],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeBankCard',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"D9C7521-0367-42EE-9646-FD066CCADB26\\",\\n \\"Data\\": {\\n \\"CardNumber\\": \\"6212262315007683105\\",\\n \\"ValidDate\\": \\"07/26\\",\\n \\"BankName\\": \\"中国工商银行\\",\\n \\"CardType\\": \\"CC\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<RecognizeBankCardResponse>\\n <RequestId>D9C7521-0367-42EE-9646-FD066CCADB26</RequestId>\\n <Data>\\n <CardNumber>6212262315007683105</CardNumber>\\n <ValidDate>07/26</ValidDate>\\n <BankName>中国工商银行</BankName>\\n <CardType>CC</CardType>\\n </Data>\\n</RecognizeBankCardResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
- 'responseParamsDescription' => ' ',
],
'RecognizeBusinessLicense' => [
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -273,245 +285,178 @@
[
'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeBusinessLicense/RecognizeBusinessLicense1.jpg',
- 'isFileTransferUrl' => true,
- 'required' => true,
- 'type' => 'string',
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) link in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeBusinessLicense/RecognizeBusinessLicense1.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
+ 'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'example' => 'F34D031B-02BD-4A59-BA35-EE068DD6F6E6',
- 'type' => 'string',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'F34D031B-02BD-4A59-BA35-EE068DD6F6E6', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned result data.',
+ 'type' => 'object',
'properties' => [
- 'Type' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
+ 'Type' => ['description' => 'The company type. `FailInRecognition` is returned if recognition fails.', 'type' => 'string', 'example' => '有限责任公司', 'title' => ''],
'Stamp' => [
- 'description' => '',
+ 'description' => 'The stamp position. `FailInDetection` is returned if detection fails.',
+ 'type' => 'object',
'properties' => [
- 'Top' => [
- 'description' => '',
- 'example' => '1030',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
- 'Width' => [
- 'description' => '',
- 'example' => '154',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
- 'Height' => [
- 'description' => '',
- 'example' => '154',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
- 'Left' => [
- 'description' => '',
- 'example' => '650',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
+ 'Top' => ['description' => 'The y-coordinate of the upper-left corner of the region.', 'type' => 'integer', 'format' => 'int32', 'example' => '1030', 'title' => ''],
+ 'Width' => ['description' => 'The width of the region.', 'type' => 'integer', 'format' => 'int32', 'example' => '154', 'title' => ''],
+ 'Height' => ['description' => 'The height of the region.', 'type' => 'integer', 'format' => 'int32', 'example' => '154', 'title' => ''],
+ 'Left' => ['description' => 'The x-coordinate of the upper-left corner of the region.', 'type' => 'integer', 'format' => 'int32', 'example' => '650', 'title' => ''],
],
- 'type' => 'object',
- ],
- 'EstablishDate' => [
- 'description' => '',
- 'example' => '20150504',
- 'type' => 'string',
- ],
- 'ValidPeriod' => [
- 'description' => '',
- 'example' => '29991231',
- 'type' => 'string',
- ],
- 'Business' => [
- 'description' => '',
+ 'title' => '',
'example' => '',
- 'type' => 'string',
- ],
- 'Angle' => [
- 'description' => '',
- 'example' => '0',
- 'format' => 'float',
- 'type' => 'number',
- ],
- 'RegisterNumber' => [
- 'description' => '',
- 'example' => '91500108320423****',
- 'type' => 'string',
- ],
- 'Address' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'Capital' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
],
+ 'EstablishDate' => ['description' => 'The company registration date. For example, if the certificate shows "2014年04月16日", the API returns "20140416".', 'type' => 'string', 'example' => '20150504', 'title' => ''],
+ 'ValidPeriod' => ['description' => 'The end date of the business license validity period. For example, if the certificate shows "2014年04月16日至2034年04月15日", the API returns "20340415".'."\n"
+ ."\n"
+ .'> The current algorithm outputs dates in the "YYYYMMDD" format (for example, "20391130") and uses "29991231" to represent "long-term".', 'type' => 'string', 'example' => '29991231', 'title' => ''],
+ 'Business' => ['description' => 'The business scope. `FailInRecognition` is returned if recognition fails.', 'type' => 'string', 'example' => '网络技术服务;网站建设;销售:I类医疗器械、保健用品(不含保健食品)等', 'title' => ''],
+ 'Angle' => ['description' => 'The angle of the input image (clockwise rotation). Valid values: 0, 90, 180, and 270.', 'type' => 'number', 'format' => 'float', 'example' => '0', 'title' => ''],
+ 'RegisterNumber' => ['description' => 'The unified social credit code. `FailInRecognition` is returned if recognition fails.', 'type' => 'string', 'example' => '91500108320423****', 'title' => ''],
+ 'Address' => ['description' => 'The company address. `FailInRecognition` is returned if recognition fails.', 'type' => 'string', 'example' => '浙江省杭州市西湖区转塘科技经济区块888号888幢', 'title' => ''],
+ 'Capital' => ['description' => 'The registered capital. `FailInRecognition` is returned if recognition fails.', 'type' => 'string', 'example' => '壹百万元整', 'title' => ''],
'Title' => [
- 'description' => '',
+ 'description' => 'The title position. `FailInDetection` is returned if detection fails.',
+ 'type' => 'object',
'properties' => [
- 'Top' => [
- 'description' => '',
- 'example' => '10',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
- 'Width' => [
- 'description' => '',
- 'example' => '10',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
- 'Height' => [
- 'description' => '',
- 'example' => '10',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
- 'Left' => [
- 'description' => '',
- 'example' => '10',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
+ 'Top' => ['description' => 'The y-coordinate of the upper-left corner of the region.', 'type' => 'integer', 'format' => 'int32', 'example' => '10', 'title' => ''],
+ 'Width' => ['description' => 'The width of the region.', 'type' => 'integer', 'format' => 'int32', 'example' => '10', 'title' => ''],
+ 'Height' => ['description' => 'The height of the region.', 'type' => 'integer', 'format' => 'int32', 'example' => '10', 'title' => ''],
+ 'Left' => ['description' => 'The x-coordinate of the upper-left corner of the region.', 'type' => 'integer', 'format' => 'int32', 'example' => '10', 'title' => ''],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
'Emblem' => [
- 'description' => '',
+ 'description' => 'The national emblem position. `FailInDetection` is returned if detection fails.',
+ 'type' => 'object',
'properties' => [
- 'Top' => [
- 'description' => '',
- 'example' => '8',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
- 'Width' => [
- 'description' => '',
- 'example' => '162',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
- 'Height' => [
- 'description' => '',
- 'example' => '163',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
- 'Left' => [
- 'description' => '',
- 'example' => '366',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
+ 'Top' => ['description' => 'The y-coordinate of the upper-left corner of the region.', 'type' => 'integer', 'format' => 'int32', 'example' => '8', 'title' => ''],
+ 'Width' => ['description' => 'The width of the region.', 'type' => 'integer', 'format' => 'int32', 'example' => '162', 'title' => ''],
+ 'Height' => ['description' => 'The height of the region.', 'type' => 'integer', 'format' => 'int32', 'example' => '163', 'title' => ''],
+ 'Left' => ['description' => 'The x-coordinate of the upper-left corner of the region.', 'type' => 'integer', 'format' => 'int32', 'example' => '366', 'title' => ''],
],
- 'type' => 'object',
- ],
- 'Name' => [
- 'description' => '',
+ 'title' => '',
'example' => '',
- 'type' => 'string',
],
+ 'Name' => ['description' => 'The company name. `FailInRecognition` is returned if recognition fails.', 'type' => 'string', 'example' => '某某电子商务有限公司', 'title' => ''],
'QRCode' => [
- 'description' => '',
+ 'description' => 'The QR code position. `FailInDetection` is returned if detection fails.',
+ 'type' => 'object',
'properties' => [
- 'Top' => [
- 'description' => '',
- 'example' => '914',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
- 'Width' => [
- 'description' => '',
- 'example' => '126',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
- 'Height' => [
- 'description' => '',
- 'example' => '132',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
- 'Left' => [
- 'description' => '',
- 'example' => '156',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
+ 'Top' => ['description' => 'The y-coordinate of the upper-left corner of the region.', 'type' => 'integer', 'format' => 'int32', 'example' => '914', 'title' => ''],
+ 'Width' => ['description' => 'The width of the region.', 'type' => 'integer', 'format' => 'int32', 'example' => '126', 'title' => ''],
+ 'Height' => ['description' => 'The height of the region.', 'type' => 'integer', 'format' => 'int32', 'example' => '132', 'title' => ''],
+ 'Left' => ['description' => 'The x-coordinate of the upper-left corner of the region.', 'type' => 'integer', 'format' => 'int32', 'example' => '156', 'title' => ''],
],
- 'type' => 'object',
- ],
- 'LegalPerson' => [
- 'description' => '',
+ 'title' => '',
'example' => '',
- 'type' => 'string',
],
+ 'LegalPerson' => ['description' => 'The legal representative. `FailInRecognition` is returned if recognition fails.', 'type' => 'string', 'example' => '李四', 'title' => ''],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"F34D031B-02BD-4A59-BA35-EE068DD6F6E6\\",\\n \\"Data\\": {\\n \\"Type\\": \\"有限责任公司\\",\\n \\"Stamp\\": {\\n \\"Top\\": 1030,\\n \\"Width\\": 154,\\n \\"Height\\": 154,\\n \\"Left\\": 650\\n },\\n \\"EstablishDate\\": \\"20150504\\",\\n \\"ValidPeriod\\": \\"29991231\\",\\n \\"Business\\": \\"网络技术服务;网站建设;销售:I类医疗器械、保健用品(不含保健食品)等\\",\\n \\"Angle\\": 0,\\n \\"RegisterNumber\\": \\"91500108320423****\\",\\n \\"Address\\": \\"浙江省杭州市西湖区转塘科技经济区块888号888幢\\",\\n \\"Capital\\": \\"壹百万元整\\",\\n \\"Title\\": {\\n \\"Top\\": 10,\\n \\"Width\\": 10,\\n \\"Height\\": 10,\\n \\"Left\\": 10\\n },\\n \\"Emblem\\": {\\n \\"Top\\": 8,\\n \\"Width\\": 162,\\n \\"Height\\": 163,\\n \\"Left\\": 366\\n },\\n \\"Name\\": \\"某某电子商务有限公司\\",\\n \\"QRCode\\": {\\n \\"Top\\": 914,\\n \\"Width\\": 126,\\n \\"Height\\": 132,\\n \\"Left\\": 156\\n },\\n \\"LegalPerson\\": \\"李四\\"\\n }\\n}","type":"json"}]',
+ 'title' => 'Business license recognition',
+ 'summary' => 'This topic describes the syntax and examples of the business license recognition feature (RecognizeBusinessLicense).',
+ 'description' => '## Feature description'."\n"
+ .'The business license recognition feature identifies key fields on a business license, including: company address, business scope, registered capital, registration date, legal representative, company name, unified social credit code, company type, and business license validity period. It can also detect the positions of QR codes and stamps on the business license.'."\n"
+ ."\n"
+ .'> - You can go to [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- You can try this feature for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeBusinessLicense) to experience the feature or purchase it online.'."\n"
+ .'- For questions about API integration, usage, or consultation regarding the Alibaba Cloud Visual Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Integration guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete registration.'."\n"
+ .'2. Activate the service: Make sure you have activated the [OCR service](https://vision.aliyun.com/ocr). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_ocr_public_cn#/open).'."\n"
+ .'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/ocr/2019-12-30/RecognizeBusinessLicense?lang=JAVA&sdkStyle=dara&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Focr%2FRecognizeBusinessLicense%2FRecognizeBusinessLicense1.jpg%22%7D&tab=DEMO) to debug the feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the OCR (ocr) category in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the references as needed and invoke the API.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in commonly used languages, see [Business license recognition sample code](~~600232~~).'."\n"
+ ."\n"
+ .'7. Direct client calls: Common client call methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Image format: JPEG, JPG, PNG, BMP, or GIF.'."\n"
+ .'- Image size: up to 3 MB.'."\n"
+ .'- Image resolution: No resolution limit. However, excessively high resolution may cause the API to time out. The timeout period is 5 seconds.'."\n"
+ .'- Request format: JPEG, JPG, PNG, BMP, or GIF.'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of business license recognition, see [Billing overview](~~202631~~).'."\n"
+ ."\n"
+ .'> The API debugging interface below is a paid interface. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeBusinessLicense).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'For the business license recognition feature under the Alibaba Cloud Visual AI OCR category, we recommend that you use the SDK. The SDK supports multiple programming languages. When calling the SDK, select the SDK package for the OCR (ocr) category. File parameters support local files and arbitrary URLs through SDK calls. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in commonly used languages, see [Business license recognition sample code](~~600232~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of business license recognition, see [Common error codes](~~146772~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging interface are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeBusinessLicense'],
+ ],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeBusinessLicense',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"F34D031B-02BD-4A59-BA35-EE068DD6F6E6\\",\\n \\"Data\\": {\\n \\"Type\\": \\"有限责任公司\\",\\n \\"Stamp\\": {\\n \\"Top\\": 1030,\\n \\"Width\\": 154,\\n \\"Height\\": 154,\\n \\"Left\\": 650\\n },\\n \\"EstablishDate\\": \\"20150504\\",\\n \\"ValidPeriod\\": \\"29991231\\",\\n \\"Business\\": \\"网络技术服务;网站建设;销售:I类医疗器械、保健用品(不含保健食品)等\\",\\n \\"Angle\\": 0,\\n \\"RegisterNumber\\": \\"91500108320423****\\",\\n \\"Address\\": \\"浙江省杭州市西湖区转塘科技经济区块888号888幢\\",\\n \\"Capital\\": \\"壹百万元整\\",\\n \\"Title\\": {\\n \\"Top\\": 10,\\n \\"Width\\": 10,\\n \\"Height\\": 10,\\n \\"Left\\": 10\\n },\\n \\"Emblem\\": {\\n \\"Top\\": 8,\\n \\"Width\\": 162,\\n \\"Height\\": 163,\\n \\"Left\\": 366\\n },\\n \\"Name\\": \\"某某电子商务有限公司\\",\\n \\"QRCode\\": {\\n \\"Top\\": 914,\\n \\"Width\\": 126,\\n \\"Height\\": 132,\\n \\"Left\\": 156\\n },\\n \\"LegalPerson\\": \\"李四\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<RequestId>F34D031B-02BD-4A59-BA35-EE068DD6F6E6</RequestId>\\n<Data>\\n <ValidPeriod>29991231</ValidPeriod>\\n <Address>浙江省杭州市西湖区转塘科技经济区块888号888幢</Address>\\n <Stamp>\\n <Left>971</Left>\\n <Top>572</Top>\\n <Height>197</Height>\\n <Width>191</Width>\\n </Stamp>\\n <Title>\\n <Left>447</Left>\\n <Top>177</Top>\\n <Height>80</Height>\\n <Width>354</Width>\\n </Title>\\n <Capital>叁佰万元整</Capital>\\n <LegalPerson>李四</LegalPerson>\\n <EstablishDate>20150504</EstablishDate>\\n <Name>某某电子商务有限公司</Name>\\n <RegisterNumber>91500108320423****</RegisterNumber>\\n <Type>有限责任公司</Type>\\n <QRCode>\\n <Left>848</Left>\\n <Top>199</Top>\\n <Height>88</Height>\\n <Width>91</Width>\\n </QRCode>\\n <Angle>0</Angle>\\n <Emblem>\\n <Left>550</Left>\\n <Top>6</Top>\\n <Height>150</Height>\\n <Width>137</Width>\\n </Emblem>\\n <Business>网络技术服务;网站建设;销售:I类医疗器械、保健用品(不含保健食品);医药技术咨询(不含诊疗活动及药品销售)、健康知识及其信息咨询(不含诊疗活动)、健康管理咨询(不含诊疗活动)、医院管理咨询(不含诊疗活动及药品销售):健康保健项目策划、设计;化妆品、饰、工艺礼品(不含象牙及其制品)、家具护理用品、劳防用品的批发;货物进出口(法律、法规禁止的项目除外;法律、法规限制的项目取得许可后方可经营);品牌推广;旅游信息咨询;翻译服务;票务代理;设计、制作、代理、发布广告;会议及展览展示服务。(依法须经批准的项目,经相关部门批准后方可开展经营活动)</Business>\\n</Data>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
- 'responseParamsDescription' => ' ',
],
'RecognizeCharacter' => [
- 'summary' => '通用文字识别',
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'summary' => 'This topic describes the syntax and examples of the RecognizeCharacter operation for general text recognition.',
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -519,177 +464,185 @@
],
'operationType' => 'write',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'none',
- 'riskType' => 'none',
- 'chargeType' => 'paid',
- ],
+ 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'paid'],
'parameters' => [
[
'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeCharacter/RecognizeCharacter5.jpg',
- 'isFileTransferUrl' => true,
- 'required' => true,
- 'type' => 'string',
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) link in the Shanghai region. If the file is stored locally or the OSS link is not in the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeCharacter/RecognizeCharacter5.jpg', 'title' => ''],
],
[
'name' => 'MinHeight',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => '10',
- 'format' => 'int32',
- 'minimum' => '5',
- 'required' => true,
- 'type' => 'integer',
- ],
+ 'schema' => ['description' => 'The minimum height of text in the image, in pixels.', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'minimum' => '5', 'example' => '10', 'title' => ''],
],
[
'name' => 'OutputProbability',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'true',
- 'required' => true,
- 'type' => 'boolean',
- ],
+ 'schema' => ['description' => 'Specifies whether to output the probability of text boxes. Valid values:'."\n"
+ ."\n"
+ .'- true: Output the probability of text boxes.'."\n"
+ .'- false: Do not output the probability of text boxes.', 'type' => 'boolean', 'required' => true, 'example' => 'true', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'description' => '1',
+ 'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'example' => '7A9BC7FE-2D42-57AF-93BC-09A229DD2F1D',
- 'type' => 'string',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '7A9BC7FE-2D42-57AF-93BC-09A229DD2F1D', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
+ 'type' => 'object',
'properties' => [
'Results' => [
- 'description' => '',
+ 'description' => 'The recognition results.',
+ 'type' => 'array',
'items' => [
'description' => '1',
+ 'type' => 'object',
'properties' => [
'TextRectangles' => [
- 'description' => '',
+ 'description' => 'The position of the text box region.',
+ 'type' => 'object',
'properties' => [
- 'Top' => [
- 'description' => '',
- 'example' => '150',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
- 'Width' => [
- 'description' => '',
- 'example' => '77',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
- 'Height' => [
- 'description' => '',
- 'example' => '409',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
- 'Angle' => [
- 'description' => '',
- 'example' => '-65',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
- 'Left' => [
- 'description' => '',
- 'example' => '511',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
+ 'Top' => ['description' => 'The y-coordinate of the upper-left corner of the text region.'."\n"
+ .'> Do not use this field to calculate the text region. For text region coordinate information, refer to the Pos field.', 'type' => 'integer', 'format' => 'int32', 'example' => '150', 'title' => ''],
+ 'Width' => ['description' => 'The width of the text region.', 'type' => 'integer', 'format' => 'int32', 'example' => '77', 'title' => ''],
+ 'Height' => ['description' => 'The height of the text region.', 'type' => 'integer', 'format' => 'int32', 'example' => '409', 'title' => ''],
+ 'Angle' => ['description' => 'The angle of the text region. The angle range is `[-180, 180]`.'."\n"
+ ."\n"
+ .'> The center of the text region is used as the rotation point. Clockwise rotation is positive, and counterclockwise rotation is negative.', 'type' => 'integer', 'format' => 'int32', 'example' => '-65', 'title' => ''],
+ 'Left' => ['description' => 'The x-coordinate of the upper-left corner of the text region.'."\n"
+ .'> Do not use this field to calculate the text region. For text region coordinate information, refer to the Pos field.', 'type' => 'integer', 'format' => 'int32', 'example' => '511', 'title' => ''],
'Pos' => [
+ 'description' => 'The coordinates of the four vertices of the bounding rectangle of the text region, arranged clockwise (upper-left, upper-right, lower-right, lower-left).',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
- 'x' => [
- 'type' => 'integer',
- 'format' => 'int32',
- ],
- 'y' => [
- 'type' => 'integer',
- 'format' => 'int32',
- ],
+ 'x' => ['description' => 'The x-coordinate of the text region.', 'type' => 'integer', 'format' => 'int32', 'example' => '434', 'title' => ''],
+ 'y' => ['description' => 'The y-coordinate of the text region.', 'type' => 'integer', 'format' => 'int32', 'example' => '70', 'title' => ''],
],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
- ],
- 'Text' => [
- 'description' => '',
+ 'title' => '',
'example' => '',
- 'type' => 'string',
- ],
- 'Probability' => [
- 'description' => '',
- 'example' => '0.99',
- 'format' => 'float',
- 'type' => 'number',
],
+ 'Text' => ['description' => 'The text content.', 'type' => 'string', 'example' => '祝你生日快乐', 'title' => ''],
+ 'Probability' => ['description' => 'The probability of the text content. Valid values: 0 to 1.', 'type' => 'number', 'format' => 'float', 'example' => '0.99', 'title' => ''],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
- 'type' => 'array',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"7A9BC7FE-2D42-57AF-93BC-09A229DD2F1D\\",\\n \\"Data\\": {\\n \\"Results\\": [\\n {\\n \\"TextRectangles\\": {\\n \\"Top\\": 150,\\n \\"Width\\": 77,\\n \\"Height\\": 409,\\n \\"Angle\\": -65,\\n \\"Left\\": 511,\\n \\"Pos\\": [\\n {\\n \\"x\\": 434,\\n \\"y\\": 70\\n }\\n ]\\n },\\n \\"Text\\": \\"祝你生日快乐\\",\\n \\"Probability\\": 0.99\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'General text recognition',
+ 'description' => '## Feature description'."\n"
+ .'The general text recognition feature recognizes text content and text region coordinates in images. This feature is applicable to text recognition in various scenarios.'."\n"
+ ."\n"
+ .'> - You can go to [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeCharacter) to try this feature or purchase it online.'."\n"
+ .'- To learn more about how to use visual AI APIs on the Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Integration guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Sign Up** in the upper-right corner, and follow the instructions to complete the registration.'."\n"
+ .'2. Activate the service: Make sure that you have activated the [OCR service](https://vision.aliyun.com/ocr). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_ocr_public_cn#/open).'."\n"
+ .'3. Create an AccessKey pair: Make sure that you have [created an AccessKey pair](~~175144~~). If you are using an AccessKey pair of a RAM user, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/ocr/2019-12-30/RecognizeCharacter?lang=JAVA&sdkStyle=dara&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Focr%2FRecognizeCharacter%2FRecognizeCharacter1.jpg%22%2C%22MinHeight%22%3A10%2C%22OutputProbability%22%3Atrue%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language that you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the OCR (ocr) category in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in commonly used languages, see [General text recognition sample code](~~480535~~).'."\n"
+ ."\n"
+ .'7. Direct client calls: The following common client call methods are supported.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Image format: JPEG, JPG, PNG, BMP, or GIF.'."\n"
+ .'- Image size: up to 3 MB.'."\n"
+ .'- Image resolution: greater than 15 × 15 pixels and less than 4096 × 4096 pixels.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of general text recognition, see [Billing overview](~~202631~~).'."\n"
+ ."\n"
+ .'> The debugging operation below is a paid operation. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeCharacter).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'For the general text recognition feature under the Alibaba Cloud Vision AI OCR category, we recommend that you use the SDK. The SDK supports multiple programming languages. When calling the SDK, select the SDK package for the OCR (ocr) category. File parameters support local files and arbitrary URLs through the SDK. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in commonly used languages, see [General text recognition sample code](~~480535~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of general text recognition, see [Common error codes](~~146772~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [
+ ['createdAt' => '2025-12-22T05:58:48.000Z', 'description' => 'Response parameters changed'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '200', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeCharacter'],
+ ],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'none',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeCharacter',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"7A9BC7FE-2D42-57AF-93BC-09A229DD2F1D\\",\\n \\"Data\\": {\\n \\"Results\\": [\\n {\\n \\"TextRectangles\\": {\\n \\"Top\\": 150,\\n \\"Width\\": 77,\\n \\"Height\\": 409,\\n \\"Angle\\": -65,\\n \\"Left\\": 511,\\n \\"Pos\\": [\\n {\\n \\"x\\": 434,\\n \\"y\\": 70\\n }\\n ]\\n },\\n \\"Text\\": \\"祝你生日快乐\\",\\n \\"Probability\\": 0.99\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<RecognizeCharacterResponse>\\n <RequestId>3A7E38E9-E8B2-5135-8461-F6DA393385AA</RequestId>\\n <Data>\\n <Results>\\n <TextRectangles>\\n <Left>569</Left>\\n <Top>184</Top>\\n <Angle>-68</Angle>\\n <Pos>\\n <x>569</x>\\n <y>184</y>\\n </Pos>\\n <Pos>\\n <x>665</x>\\n <y>223</y>\\n </Pos>\\n <Pos>\\n <x>657</x>\\n <y>244</y>\\n </Pos>\\n <Pos>\\n <x>560</x>\\n <y>205</y>\\n </Pos>\\n <Height>103</Height>\\n <Width>22</Width>\\n </TextRectangles>\\n <Probability>0.99</Probability>\\n <Text>HAPPY</Text>\\n </Results>\\n <Results>\\n <TextRectangles>\\n <Left>515</Left>\\n <Top>190</Top>\\n <Angle>-63</Angle>\\n <Pos>\\n <x>515</x>\\n <y>190</y>\\n </Pos>\\n <Pos>\\n <x>690</x>\\n <y>277</y>\\n </Pos>\\n <Pos>\\n <x>673</x>\\n <y>311</y>\\n </Pos>\\n <Pos>\\n <x>498</x>\\n <y>225</y>\\n </Pos>\\n <Height>195</Height>\\n <Width>38</Width>\\n </TextRectangles>\\n <Probability>0.99</Probability>\\n <Text>birthday</Text>\\n </Results>\\n <Results>\\n <TextRectangles>\\n <Left>389</Left>\\n <Top>242</Top>\\n <Angle>-65</Angle>\\n <Pos>\\n <x>389</x>\\n <y>242</y>\\n </Pos>\\n <Pos>\\n <x>755</x>\\n <y>406</y>\\n </Pos>\\n <Pos>\\n <x>726</x>\\n <y>471</y>\\n </Pos>\\n <Pos>\\n <x>360</x>\\n <y>307</y>\\n </Pos>\\n <Height>400</Height>\\n <Width>70</Width>\\n </TextRectangles>\\n <Probability>0.98</Probability>\\n <Text>祝你生日快乐</Text>\\n </Results>\\n </Data>\\n</RecognizeCharacterResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
'RecognizeDriverLicense' => [
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -702,26 +655,22 @@
[
'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeDriverLicense/jsz2.jpg',
- 'isFileTransferUrl' => true,
- 'required' => true,
- 'type' => 'string',
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) link in the Shanghai region. If the file is stored locally or the OSS link is not in the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeDriverLicense/jsz2.jpg', 'title' => ''],
],
[
'name' => 'Side',
'in' => 'formData',
'schema' => [
- 'description' => '',
- 'example' => 'face',
- 'required' => false,
+ 'description' => 'Specifies whether the uploaded photo is the main page or the supplementary page of the driver\'s license.'."\n"
+ ."\n"
+ .'- face: main page'."\n"
+ ."\n"
+ .'- back: supplementary page.',
'type' => 'string',
- 'enum' => [
- 'face',
- 'back',
- ],
+ 'required' => false,
+ 'enum' => ['face', 'back'],
+ 'example' => 'face',
+ 'title' => '',
],
],
],
@@ -729,144 +678,145 @@
200 => [
'schema' => [
'description' => '1',
+ 'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'example' => '374D8C7E-9ECC-4750-A87F-50571702F175',
- 'type' => 'string',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '374D8C7E-9ECC-4750-A87F-50571702F175', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
+ 'type' => 'object',
'properties' => [
'BackResult' => [
- 'description' => '',
+ 'description' => 'The recognition result of the supplementary page of the driver\'s license.',
+ 'type' => 'object',
'properties' => [
- 'ArchiveNumber' => [
- 'description' => '',
- 'example' => '130601473955',
- 'type' => 'string',
- ],
- 'Name' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'CardNumber' => [
- 'description' => '',
- 'example' => '210288898898898888',
- 'type' => 'string',
- ],
- 'Record' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
+ 'ArchiveNumber' => ['description' => 'The archive number.', 'type' => 'string', 'example' => '130601473955', 'title' => ''],
+ 'Name' => ['description' => 'The name.', 'type' => 'string', 'example' => '张三', 'title' => ''],
+ 'CardNumber' => ['description' => 'The card number.', 'type' => 'string', 'example' => '210288898898898888', 'title' => ''],
+ 'Record' => ['description' => 'The record.', 'type' => 'string', 'example' => '实习期至2019年05月06日。', 'title' => ''],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
'FaceResult' => [
- 'description' => '',
+ 'description' => 'The recognition result of the main page of the driver\'s license.',
+ 'type' => 'object',
'properties' => [
- 'VehicleType' => [
- 'description' => '',
- 'example' => 'C1',
- 'type' => 'string',
- ],
- 'IssueDate' => [
- 'description' => '',
- 'example' => '20130208',
- 'type' => 'string',
- ],
- 'EndDate' => [
- 'description' => '',
- 'example' => '20190201',
- 'type' => 'string',
- ],
- 'Gender' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'Address' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'StartDate' => [
- 'description' => '',
- 'example' => '20130208',
- 'type' => 'string',
- ],
- 'LicenseNumber' => [
- 'description' => '',
- 'example' => '210288898898898888',
- 'type' => 'string',
- ],
- 'Name' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'IssueUnit' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'Nationality' => [
- 'type' => 'string',
- ],
- 'BirthDate' => [
- 'type' => 'string',
- ],
+ 'VehicleType' => ['description' => 'The permitted vehicle type on the driver\'s license.', 'type' => 'string', 'example' => 'C1', 'title' => ''],
+ 'IssueDate' => ['description' => 'The initial issue date. Format: YYYYMMDD. Example: 19800101, which indicates January 01, 1980.', 'type' => 'string', 'example' => '20130208', 'title' => ''],
+ 'EndDate' => ['description' => 'The validity period duration or expiration date of the driver\'s license. The value depends on the data format of the driver\'s license. Format: YYYYMMDD. Example: 19800101, which indicates January 01, 1980.', 'type' => 'string', 'example' => '20190201', 'title' => ''],
+ 'Gender' => ['description' => 'The gender.', 'type' => 'string', 'example' => '男', 'title' => ''],
+ 'Address' => ['description' => 'The address.', 'type' => 'string', 'example' => '江苏省徐州市铜山区棠张镇田河村1队129号', 'title' => ''],
+ 'StartDate' => ['description' => 'The start date of the validity period of the driver\'s license. Format: YYYYMMDD. Example: 19800101, which indicates January 01, 1980.', 'type' => 'string', 'example' => '20130208', 'title' => ''],
+ 'LicenseNumber' => ['description' => 'The card number.', 'type' => 'string', 'example' => '210288898898898888', 'title' => ''],
+ 'Name' => ['description' => 'The name.', 'type' => 'string', 'example' => '张三', 'title' => ''],
+ 'IssueUnit' => ['description' => 'The issuing authority.', 'type' => 'string', 'example' => '江苏省徐州市公安局交通巡逻警察支队', 'title' => ''],
+ 'Nationality' => ['description' => 'The nationality.', 'type' => 'string', 'example' => '中国', 'title' => ''],
+ 'BirthDate' => ['description' => 'The date of birth.', 'type' => 'string', 'example' => '1992-05-20', 'title' => ''],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"374D8C7E-9ECC-4750-A87F-50571702F175\\",\\n \\"Data\\": {\\n \\"BackResult\\": {\\n \\"ArchiveNumber\\": \\"130601473955\\",\\n \\"Name\\": \\"张三\\",\\n \\"CardNumber\\": \\"210288898898898888\\",\\n \\"Record\\": \\"实习期至2019年05月06日。\\"\\n },\\n \\"FaceResult\\": {\\n \\"VehicleType\\": \\"C1\\",\\n \\"IssueDate\\": \\"20130208\\",\\n \\"EndDate\\": \\"20190201\\",\\n \\"Gender\\": \\"男\\",\\n \\"Address\\": \\"江苏省徐州市铜山区棠张镇田河村1队129号\\",\\n \\"StartDate\\": \\"20130208\\",\\n \\"LicenseNumber\\": \\"210288898898898888\\",\\n \\"Name\\": \\"张三\\",\\n \\"IssueUnit\\": \\"江苏省徐州市公安局交通巡逻警察支队\\",\\n \\"Nationality\\": \\"中国\\",\\n \\"BirthDate\\": \\"1992-05-20\\"\\n }\\n }\\n}","type":"json"}]',
+ 'title' => 'Driver\'s license recognition',
+ 'summary' => 'This topic describes the syntax and examples of the RecognizeDriverLicense operation for driver\'s license recognition.',
+ 'description' => '## Feature description'."\n"
+ .'The driver\'s license recognition feature identifies key fields on both the main page and the supplementary page of a driver\'s license, including archive number, name, validity period duration, gender, issue date, driver\'s license number, permitted vehicle type, validity period start date, and address — a total of 9 key fields.'."\n"
+ ."\n"
+ .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeDriverLicense) to experience this feature or purchase it online.'."\n"
+ .'- For questions about API integration or usage of Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Integration guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete registration.'."\n"
+ .'2. Activate the service: Make sure you have activated the [OCR service](https://vision.aliyun.com/ocr). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_ocr_public_cn#/open).'."\n"
+ .'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/ocr/2019-12-30/RecognizeDriverLicense?lang=JAVA&sdkStyle=dara&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Focr%2FRecognizeDriverLicense%2Fjsz1.jpg%22%2C%22Side%22%3A%22face%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the OCR (ocr) category in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in commonly used languages, see [Driver\'s license recognition sample code](~~480750~~).'."\n"
+ ."\n"
+ .'7. Direct client calls: Common client call methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Image format: JPEG, JPG, PNG, BMP, or GIF.'."\n"
+ .'- Image size: up to 4 MB.'."\n"
+ .'- Image resolution: greater than 15 × 15 pixels and less than 4096 × 4096 pixels.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For the billable methods and pricing of driver\'s license recognition, see [Billing overview](~~202631~~).'."\n"
+ ."\n"
+ .'> The debugging operation below is a paid operation. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeDriverLicense).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'For the driver\'s license recognition feature under the Alibaba Cloud Vision AI OCR category, we recommend that you use the SDK. The SDK supports multiple programming languages. When calling the operation, select the SDK package for the OCR (ocr) category. File parameters can be passed as local files or arbitrary URLs through the SDK. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in commonly used languages, see [Driver\'s license recognition sample code](~~480750~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of driver\'s license recognition, see [Common error codes](~~146772~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [
+ ['createdAt' => '2023-12-19T06:02:22.000Z', 'description' => 'Response parameters changed'],
+ ['createdAt' => '2023-12-06T02:12:37.000Z', 'description' => 'Request parameters changed'],
+ ['createdAt' => '2021-05-10T07:33:03.000Z', 'description' => 'OpenAPI offline'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeDriverLicense'],
+ ],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeDriverLicense',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"374D8C7E-9ECC-4750-A87F-50571702F175\\",\\n \\"Data\\": {\\n \\"BackResult\\": {\\n \\"ArchiveNumber\\": \\"130601473955\\",\\n \\"Name\\": \\"张三\\",\\n \\"CardNumber\\": \\"210288898898898888\\",\\n \\"Record\\": \\"实习期至2019年05月06日。\\"\\n },\\n \\"FaceResult\\": {\\n \\"VehicleType\\": \\"C1\\",\\n \\"IssueDate\\": \\"20130208\\",\\n \\"EndDate\\": \\"20190201\\",\\n \\"Gender\\": \\"男\\",\\n \\"Address\\": \\"江苏省徐州市铜山区棠张镇田河村1队129号\\",\\n \\"StartDate\\": \\"20130208\\",\\n \\"LicenseNumber\\": \\"210288898898898888\\",\\n \\"Name\\": \\"张三\\",\\n \\"IssueUnit\\": \\"江苏省徐州市公安局交通巡逻警察支队\\",\\n \\"Nationality\\": \\"中国\\",\\n \\"BirthDate\\": \\"1992-05-20\\"\\n }\\n }\\n}","errorExample":""},{"type":"xml","example":"<RecognizeDriverLicenseResponse>\\n <RequestId>374D8C7E-9ECC-4750-A87F-50571702F175</RequestId>\\n <Data>\\n <BackResult>\\n <ArchiveNumber>130601473955</ArchiveNumber>\\n <Name>张三</Name>\\n <CardNumber>210288898898898888</CardNumber>\\n <Record>实习期至2019年05月06日。</Record>\\n </BackResult>\\n <FaceResult>\\n <VehicleType>C1</VehicleType>\\n <IssueDate>20130208</IssueDate>\\n <EndDate>20190201</EndDate>\\n <Gender>男</Gender>\\n <Address>江苏省徐州市铜山区棠张镇田河村1队129号</Address>\\n <StartDate>20130208</StartDate>\\n <LicenseNumber>210288898898898888</LicenseNumber>\\n <Name>张三</Name>\\n <IssueUnit>江苏省徐州市公安局交通巡逻警察支队</IssueUnit>\\n <Nationality>中国</Nationality>\\n <BirthDate>1992-05-20</BirthDate>\\n </FaceResult>\\n </Data>\\n</RecognizeDriverLicenseResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
- 'responseParamsDescription' => ' ',
],
'RecognizeDrivingLicense' => [
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -879,198 +829,171 @@
[
'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeDrivingLicense/xsz2.jpg',
- 'isFileTransferUrl' => true,
- 'required' => true,
- 'type' => 'string',
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) link in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeDrivingLicense/xsz2.jpg', 'title' => ''],
],
[
'name' => 'Side',
'in' => 'formData',
'schema' => [
- 'description' => '',
- 'example' => 'face',
- 'required' => false,
+ 'description' => 'Specifies whether the uploaded photo is the main page or the supplementary page of the vehicle license.'."\n"
+ ."\n"
+ .'- face: main page'."\n"
+ ."\n"
+ .'- back: supplementary page.',
'type' => 'string',
- 'enum' => [
- 'face',
- 'back',
- ],
+ 'required' => false,
+ 'enum' => ['face', 'back'],
+ 'example' => 'face',
+ 'title' => '',
],
],
],
'responses' => [
200 => [
'schema' => [
+ 'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'example' => '1DD989C1-4E08-4E04-9D5D-314901E91226',
- 'type' => 'string',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '1DD989C1-4E08-4E04-9D5D-314901E91226', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
+ 'type' => 'object',
'properties' => [
'BackResult' => [
- 'description' => '',
+ 'description' => 'The recognition result of the supplementary page of the vehicle license.',
+ 'type' => 'object',
'properties' => [
- 'OverallDimension' => [
- 'description' => '',
- 'example' => '4945x1845x1480',
- 'type' => 'string',
- ],
- 'InspectionRecord' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'UnladenMass' => [
- 'description' => '',
- 'example' => '2000',
- 'type' => 'string',
- ],
- 'FileNumber' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'TractionMass' => [
- 'description' => '',
- 'example' => '100',
- 'type' => 'string',
- ],
- 'GrossMass' => [
- 'description' => '',
- 'example' => '2205',
- 'type' => 'string',
- ],
- 'PlateNumber' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'ApprovedPassengerCapacity' => [
- 'description' => '',
- 'example' => '5',
- 'type' => 'string',
- ],
- 'EnergyType' => [
- 'description' => '',
- 'example' => '-',
- 'type' => 'string',
- ],
- 'ApprovedLoad' => [
- 'description' => '',
- 'example' => '300',
- 'type' => 'string',
- ],
+ 'OverallDimension' => ['description' => 'The overall dimensions.', 'type' => 'string', 'example' => '4945x1845x1480', 'title' => ''],
+ 'InspectionRecord' => ['description' => 'The inspection record.', 'type' => 'string', 'example' => '检验有效期至2014年09月云A(01)', 'title' => ''],
+ 'UnladenMass' => ['description' => 'The unladen mass.', 'type' => 'string', 'example' => '2000', 'title' => ''],
+ 'FileNumber' => ['description' => 'The file number.', 'type' => 'string', 'example' => '苏F123E9', 'title' => ''],
+ 'TractionMass' => ['description' => 'The approved traction mass.', 'type' => 'string', 'example' => '100', 'title' => ''],
+ 'GrossMass' => ['description' => 'The gross mass.', 'type' => 'string', 'example' => '2205', 'title' => ''],
+ 'PlateNumber' => ['description' => 'The plate number.', 'type' => 'string', 'example' => '苏F123E9', 'title' => ''],
+ 'ApprovedPassengerCapacity' => ['description' => 'The approved passenger capacity.', 'type' => 'string', 'example' => '5', 'title' => ''],
+ 'EnergyType' => ['description' => 'The energy type.', 'type' => 'string', 'example' => '-', 'title' => ''],
+ 'ApprovedLoad' => ['description' => 'The approved load capacity.', 'type' => 'string', 'example' => '300', 'title' => ''],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
'FaceResult' => [
- 'description' => '',
+ 'description' => 'The recognition result of the main page of the vehicle license.',
+ 'type' => 'object',
'properties' => [
- 'IssueDate' => [
- 'description' => '',
- 'example' => '20180313',
- 'type' => 'string',
- ],
- 'Model' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'VehicleType' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'Owner' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'EngineNumber' => [
- 'description' => '',
- 'example' => '111111',
- 'type' => 'string',
- ],
- 'PlateNumber' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'Address' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'UseCharacter' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'Vin' => [
- 'description' => '',
- 'example' => 'SSVUDDTT2J2022555',
- 'type' => 'string',
- ],
- 'RegisterDate' => [
- 'description' => '',
- 'example' => '20180312',
- 'type' => 'string',
- ],
+ 'IssueDate' => ['description' => 'The issue date in the format of YYYYMMDD. For example, 19800101 indicates January 01, 1980.', 'type' => 'string', 'example' => '20180313', 'title' => ''],
+ 'Model' => ['description' => 'The brand and model.', 'type' => 'string', 'example' => '大众汽车牌SVW6666DFD', 'title' => ''],
+ 'VehicleType' => ['description' => 'The vehicle type.', 'type' => 'string', 'example' => '小型普通客车', 'title' => ''],
+ 'Owner' => ['description' => 'The owner name.', 'type' => 'string', 'example' => '张三', 'title' => ''],
+ 'EngineNumber' => ['description' => 'The engine number.', 'type' => 'string', 'example' => '111111', 'title' => ''],
+ 'PlateNumber' => ['description' => 'The plate number.', 'type' => 'string', 'example' => '苏F123E9', 'title' => ''],
+ 'Address' => ['description' => 'The address.', 'type' => 'string', 'example' => '中牟县三刘寨村', 'title' => ''],
+ 'UseCharacter' => ['description' => 'The use character.', 'type' => 'string', 'example' => '非营运', 'title' => ''],
+ 'Vin' => ['description' => 'The vehicle identification number (VIN).', 'type' => 'string', 'example' => 'SSVUDDTT2J2022555', 'title' => ''],
+ 'RegisterDate' => ['description' => 'The registration date in the format of YYYYMMDD. For example, 19800101 indicates January 01, 1980.', 'type' => 'string', 'example' => '20180312', 'title' => ''],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"1DD989C1-4E08-4E04-9D5D-314901E91226\\",\\n \\"Data\\": {\\n \\"BackResult\\": {\\n \\"OverallDimension\\": \\"4945x1845x1480\\",\\n \\"InspectionRecord\\": \\"检验有效期至2014年09月云A(01)\\",\\n \\"UnladenMass\\": \\"2000\\",\\n \\"FileNumber\\": \\"苏F123E9\\",\\n \\"TractionMass\\": \\"100\\",\\n \\"GrossMass\\": \\"2205\\",\\n \\"PlateNumber\\": \\"苏F123E9\\",\\n \\"ApprovedPassengerCapacity\\": \\"5\\",\\n \\"EnergyType\\": \\"-\\",\\n \\"ApprovedLoad\\": \\"300\\"\\n },\\n \\"FaceResult\\": {\\n \\"IssueDate\\": \\"20180313\\",\\n \\"Model\\": \\"大众汽车牌SVW6666DFD\\",\\n \\"VehicleType\\": \\"小型普通客车\\",\\n \\"Owner\\": \\"张三\\",\\n \\"EngineNumber\\": \\"111111\\",\\n \\"PlateNumber\\": \\"苏F123E9\\",\\n \\"Address\\": \\"中牟县三刘寨村\\",\\n \\"UseCharacter\\": \\"非营运\\",\\n \\"Vin\\": \\"SSVUDDTT2J2022555\\",\\n \\"RegisterDate\\": \\"20180312\\"\\n }\\n }\\n}","type":"json"}]',
+ 'title' => 'Vehicle license recognition',
+ 'summary' => 'This topic describes the syntax and examples of the RecognizeDrivingLicense operation for vehicle license recognition.',
+ 'description' => '## Feature description'."\n"
+ .'The vehicle license recognition feature identifies key fields on both the main page and the supplementary page of a vehicle license. It outputs 21 key fields, including brand and model, vehicle type, plate number, inspection record, approved load capacity, and approved passenger capacity.'."\n"
+ ."\n"
+ .'> - You can access [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for human assistance.'."\n"
+ .'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeDrivingLicense) to experience this feature or purchase it online.'."\n"
+ .'- For questions about API integration or usage of visual AI features on the Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Integration guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete registration.'."\n"
+ .'2. Activate the service: Make sure you have activated the [OCR service](https://vision.aliyun.com/ocr). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_ocr_public_cn#/open).'."\n"
+ .'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/ocr/2019-12-30/RecognizeDrivingLicense?lang=JAVA&sdkStyle=dara&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Focr%2FRecognizeDrivingLicense%2Fxsz1.jpg%22%2C%22Side%22%3A%22face%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find and install the SDK package for the OCR (ocr) category in the corresponding SDK documentation.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in commonly used languages, see [Vehicle license recognition sample code](~~480762~~).'."\n"
+ ."\n"
+ .'7. Direct client calls: Common client-side calling methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Image format: JPEG, JPG, PNG, BMP, or GIF.'."\n"
+ .'- Image size: up to 3 MB.'."\n"
+ .'- Image resolution: No resolution limit is imposed. However, excessively high resolution may cause the API to time out. The timeout period is 5 seconds.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of vehicle license recognition, see [Billing overview](~~202631~~).'."\n"
+ ."\n"
+ .'> The debugging operation below is a paid operation. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeDrivingLicense).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'For the vehicle license recognition feature under the Alibaba Cloud Vision AI OCR category, we recommend that you use the SDK. The SDK supports multiple programming languages. When calling the operation, select the SDK package for the OCR (ocr) category. File parameters passed through the SDK support both local files and arbitrary URLs. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in commonly used languages, see [Vehicle license recognition sample code](~~480762~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of vehicle license recognition, see [Common error codes](~~146772~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [
+ ['createdAt' => '2023-12-06T02:12:37.000Z', 'description' => 'Request parameters changed'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeDrivingLicense'],
+ ],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeDrivingLicense',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"1DD989C1-4E08-4E04-9D5D-314901E91226\\",\\n \\"Data\\": {\\n \\"BackResult\\": {\\n \\"OverallDimension\\": \\"4945x1845x1480\\",\\n \\"InspectionRecord\\": \\"检验有效期至2014年09月云A(01)\\",\\n \\"UnladenMass\\": \\"2000\\",\\n \\"FileNumber\\": \\"苏F123E9\\",\\n \\"TractionMass\\": \\"100\\",\\n \\"GrossMass\\": \\"2205\\",\\n \\"PlateNumber\\": \\"苏F123E9\\",\\n \\"ApprovedPassengerCapacity\\": \\"5\\",\\n \\"EnergyType\\": \\"-\\",\\n \\"ApprovedLoad\\": \\"300\\"\\n },\\n \\"FaceResult\\": {\\n \\"IssueDate\\": \\"20180313\\",\\n \\"Model\\": \\"大众汽车牌SVW6666DFD\\",\\n \\"VehicleType\\": \\"小型普通客车\\",\\n \\"Owner\\": \\"张三\\",\\n \\"EngineNumber\\": \\"111111\\",\\n \\"PlateNumber\\": \\"苏F123E9\\",\\n \\"Address\\": \\"中牟县三刘寨村\\",\\n \\"UseCharacter\\": \\"非营运\\",\\n \\"Vin\\": \\"SSVUDDTT2J2022555\\",\\n \\"RegisterDate\\": \\"20180312\\"\\n }\\n }\\n}","errorExample":""},{"type":"xml","example":"<RecognizeDrivingLicenseResponse>\\n <RequestId>1DD989C1-4E08-4E04-9D5D-314901E91226</RequestId>\\n <Data>\\n <BackResult>\\n <OverallDimension>4945x1845x1480</OverallDimension>\\n <InspectionRecord>检验有效期至2014年09月云A(01)</InspectionRecord>\\n <UnladenMass>2000</UnladenMass>\\n <FileNumber>苏F123E9</FileNumber>\\n <TractionMass>100</TractionMass>\\n <GrossMass>2205</GrossMass>\\n <PlateNumber>苏F123E9</PlateNumber>\\n <ApprovedPassengerCapacity>5</ApprovedPassengerCapacity>\\n <EnergyType>-</EnergyType>\\n <ApprovedLoad>300</ApprovedLoad>\\n </BackResult>\\n <FaceResult>\\n <IssueDate>20180313</IssueDate>\\n <Model>大众汽车牌SVW6666DFD</Model>\\n <VehicleType>小型普通客车</VehicleType>\\n <Owner>张三</Owner>\\n <EngineNumber>111111</EngineNumber>\\n <PlateNumber>苏F123E9</PlateNumber>\\n <Address>中牟县三刘寨村</Address>\\n <UseCharacter>非营运</UseCharacter>\\n <Vin>SSVUDDTT2J2022555</Vin>\\n <RegisterDate>20180312</RegisterDate>\\n </FaceResult>\\n </Data>\\n</RecognizeDrivingLicenseResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
'RecognizeIdentityCard' => [
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -1083,26 +1006,22 @@
[
'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeIdentityCard/sfz1.jpg',
- 'isFileTransferUrl' => true,
- 'required' => true,
- 'type' => 'string',
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an OSS URL in the Shanghai region. For local files or OSS URLs in other regions, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeIdentityCard/sfz1.jpg', 'title' => ''],
],
[
'name' => 'Side',
'in' => 'formData',
'schema' => [
- 'description' => '',
- 'example' => 'face',
- 'required' => false,
+ 'description' => 'The side of the ID card.'."\n"
+ ."\n"
+ .'- face: the portrait side.'."\n"
+ ."\n"
+ .'- back: the national emblem side.',
'type' => 'string',
- 'enum' => [
- 'face',
- 'back',
- ],
+ 'required' => false,
+ 'enum' => ['face', 'back'],
+ 'example' => 'face',
+ 'title' => '',
],
],
],
@@ -1110,209 +1029,205 @@
200 => [
'schema' => [
'description' => '1',
+ 'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'example' => 'D3F5BA69-79C4-46A4-B02B-58C4EEBC4C33',
- 'type' => 'string',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'A6175A03-624C-1976-908D-C8BE4C547C45', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
+ 'type' => 'object',
'properties' => [
'BackResult' => [
- 'description' => '',
+ 'description' => 'The result of the national emblem side.',
+ 'type' => 'object',
'properties' => [
- 'EndDate' => [
- 'description' => '',
- 'example' => '19800101',
- 'type' => 'string',
- ],
- 'Issue' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'StartDate' => [
- 'description' => '',
- 'example' => '19970101',
- 'type' => 'string',
- ],
+ 'EndDate' => ['description' => 'The expiration date. Format: YYYYMMDD. Example: 19800101, which indicates January 01, 1980.', 'type' => 'string', 'example' => '19800101', 'title' => ''],
+ 'Issue' => ['description' => 'The issuing authority.', 'type' => 'string', 'example' => '杭州市公安局', 'title' => ''],
+ 'StartDate' => ['description' => 'The validity start date. Format: YYYYMMDD. Example: 19800101, which indicates January 01, 1980.', 'type' => 'string', 'example' => '19970101', 'title' => ''],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
'FrontResult' => [
- 'description' => '',
+ 'description' => 'The result of the portrait side.',
+ 'type' => 'object',
'properties' => [
'FaceRectangle' => [
- 'description' => '',
+ 'description' => 'The face position.',
+ 'type' => 'object',
'properties' => [
'Size' => [
- 'description' => '',
+ 'description' => 'The size of the face rectangle.',
+ 'type' => 'object',
'properties' => [
- 'Width' => [
- 'description' => '',
- 'example' => '118.16333770751953',
- 'format' => 'float',
- 'type' => 'number',
- ],
- 'Height' => [
- 'description' => '',
- 'example' => '97.063156127929688',
- 'format' => 'float',
- 'type' => 'number',
- ],
+ 'Width' => ['description' => 'The width.', 'type' => 'number', 'format' => 'float', 'example' => '196', 'title' => ''],
+ 'Height' => ['description' => 'The height.', 'type' => 'number', 'format' => 'float', 'example' => '243', 'title' => ''],
],
- 'type' => 'object',
- ],
- 'Angle' => [
- 'description' => '',
- 'example' => '-87.710586547851562',
- 'format' => 'float',
- 'type' => 'number',
+ 'title' => '',
+ 'example' => '',
],
+ 'Angle' => ['description' => 'The clockwise rotation angle of the rectangle. Valid values: -180 to 180.', 'type' => 'number', 'format' => 'float', 'example' => '0', 'title' => ''],
'Center' => [
- 'description' => '',
+ 'description' => 'The center coordinates of the face rectangle.',
+ 'type' => 'object',
'properties' => [
- 'Y' => [
- 'description' => '',
- 'example' => '225.20643615722656',
- 'format' => 'float',
- 'type' => 'number',
- ],
- 'X' => [
- 'description' => '',
- 'example' => '475.59390258789062',
- 'format' => 'float',
- 'type' => 'number',
- ],
+ 'Y' => ['description' => 'The Y coordinate of the face rectangle center.', 'type' => 'number', 'format' => 'float', 'example' => '225', 'title' => ''],
+ 'X' => ['description' => 'The X coordinate of the face rectangle center.', 'type' => 'number', 'format' => 'float', 'example' => '667', 'title' => ''],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
- ],
- 'BirthDate' => [
- 'description' => '',
- 'example' => '19960111',
- 'type' => 'string',
- ],
- 'Gender' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'Address' => [
- 'description' => '',
+ 'title' => '',
'example' => '',
- 'type' => 'string',
],
+ 'BirthDate' => ['description' => 'The date of birth. Format: YYYYMMDD. Example: 19800101, which indicates January 01, 1980.', 'type' => 'string', 'example' => '19880722', 'title' => ''],
+ 'Gender' => ['description' => 'The gender.', 'type' => 'string', 'example' => '男', 'title' => ''],
+ 'Address' => ['description' => 'The address.', 'type' => 'string', 'example' => '江苏省南京市浦口区天天小区1栋11号', 'title' => ''],
'FaceRectVertices' => [
- 'description' => '',
+ 'description' => 'The face position. Represented by four vertices in counterclockwise order: bottom-left, bottom-right, top-right, and top-left.',
+ 'type' => 'array',
'items' => [
'description' => '1',
+ 'type' => 'object',
'properties' => [
- 'Y' => [
- 'description' => '',
- 'example' => '164.23321533203125',
- 'format' => 'float',
- 'type' => 'number',
- ],
- 'X' => [
- 'description' => '',
- 'example' => '429.46124267578125',
- 'format' => 'float',
- 'type' => 'number',
- ],
+ 'Y' => ['description' => 'The Y coordinate of the face position.', 'type' => 'number', 'format' => 'float', 'example' => '105', 'title' => ''],
+ 'X' => ['description' => 'The X coordinate of the face position.', 'type' => 'number', 'format' => 'float', 'example' => '569', 'title' => ''],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
- 'type' => 'array',
+ 'title' => '',
+ 'example' => '',
],
'CardAreas' => [
- 'description' => '',
+ 'description' => 'The ID card region position. Represented by four vertices in counterclockwise order: top-left, bottom-left, bottom-right, and top-right.',
+ 'type' => 'array',
'items' => [
'description' => '1',
+ 'type' => 'object',
'properties' => [
- 'Y' => [
- 'description' => '',
- 'example' => '81',
- 'format' => 'float',
- 'type' => 'number',
- ],
- 'X' => [
- 'description' => '',
- 'example' => '40',
- 'format' => 'float',
- 'type' => 'number',
- ],
+ 'Y' => ['description' => 'The Y coordinate of the ID card region.', 'type' => 'number', 'format' => 'float', 'example' => '485', 'title' => ''],
+ 'X' => ['description' => 'The X coordinate of the ID card region.', 'type' => 'number', 'format' => 'float', 'example' => '132', 'title' => ''],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
- 'type' => 'array',
- ],
- 'Nationality' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'Name' => [
- 'description' => '',
+ 'title' => '',
'example' => '',
- 'type' => 'string',
- ],
- 'IDNumber' => [
- 'description' => '',
- 'example' => '310228199601115411',
- 'type' => 'string',
],
+ 'Nationality' => ['description' => 'The ethnicity.', 'type' => 'string', 'example' => '汉', 'title' => ''],
+ 'Name' => ['description' => 'The name.', 'type' => 'string', 'example' => '小明', 'title' => ''],
+ 'IDNumber' => ['description' => 'The ID number.', 'type' => 'string', 'example' => '320001198807220000', 'title' => ''],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"A6175A03-624C-1976-908D-C8BE4C547C45\\",\\n \\"Data\\": {\\n \\"BackResult\\": {\\n \\"EndDate\\": \\"19800101\\",\\n \\"Issue\\": \\"杭州市公安局\\",\\n \\"StartDate\\": \\"19970101\\"\\n },\\n \\"FrontResult\\": {\\n \\"FaceRectangle\\": {\\n \\"Size\\": {\\n \\"Width\\": 196,\\n \\"Height\\": 243\\n },\\n \\"Angle\\": 0,\\n \\"Center\\": {\\n \\"Y\\": 225,\\n \\"X\\": 667\\n }\\n },\\n \\"BirthDate\\": \\"19880722\\",\\n \\"Gender\\": \\"男\\",\\n \\"Address\\": \\"江苏省南京市浦口区天天小区1栋11号\\",\\n \\"FaceRectVertices\\": [\\n {\\n \\"Y\\": 105,\\n \\"X\\": 569\\n }\\n ],\\n \\"CardAreas\\": [\\n {\\n \\"Y\\": 485,\\n \\"X\\": 132\\n }\\n ],\\n \\"Nationality\\": \\"汉\\",\\n \\"Name\\": \\"小明\\",\\n \\"IDNumber\\": \\"320001198807220000\\"\\n }\\n }\\n}","type":"json"}]',
+ 'title' => 'ID card recognition',
+ 'summary' => 'This topic describes the syntax and examples of the RecognizeIdentityCard operation for ID card recognition.',
+ 'description' => '## Feature description'."\n"
+ .'ID card recognition identifies key fields on second-generation Chinese ID cards, including name, gender, ethnicity, ID number, date of birth, address, validity start date, and issuing authority. It also outputs the ID card region position and face position.'."\n"
+ ."\n"
+ .'> - You can access [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for help.'."\n"
+ .'- You can try this feature for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeIdentityCard) to experience and purchase this feature.'."\n"
+ .'- For questions about API integration and usage of Alibaba Cloud Visual Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ .'- Currently, only Chinese mainland resident ID cards are supported. ID cards from Hong Kong (China), Macao (China), and Taiwan (China) are not supported.'."\n"
+ ."\n"
+ .'## Common scenarios'."\n"
+ .'Remote registration: Recognizes the content of ID cards that users commit and automatically performs padding of user identity information.'."\n"
+ ."\n"
+ .'## Advantages'."\n"
+ .'Complete recognition: Supports recognition of all fields on an ID card.'."\n"
+ ."\n"
+ .'## Integration guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete registration.'."\n"
+ .'2. Activate the service: Make sure you have activated the [OCR service](https://vision.aliyun.com/ocr). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_ocr_public_cn#/open).'."\n"
+ .'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/ocr/2019-12-30/RecognizeIdentityCard?lang=JAVA&sdkStyle=dara&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Focr%2FRecognizeIdentityCard%2Fsfzbm1.jpg%22%2C%22Side%22%3A%22back%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development and integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the OCR (ocr) category in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in common programming languages, see [ID card recognition sample code](~~600208~~).'."\n"
+ ."\n"
+ .'7. Direct client calls: Common client call methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Image format: JPEG, JPG, PNG, BMP, or GIF.'."\n"
+ .'- Image size: up to 3 MB.'."\n"
+ .'- Image resolution: greater than 15 × 15 pixels and less than 4096 × 4096 pixels.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For the billable methods and pricing of ID card recognition, see [Billing overview](~~202631~~).'."\n"
+ ."\n"
+ .'> The following debugging operation is a paid operation. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeIdentityCard).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'For the ID card recognition feature under the Alibaba Cloud Visual AI OCR category, we recommend that you use the SDK. The SDK supports multiple programming languages. Select the SDK package for the OCR (ocr) category. File parameters support local files and arbitrary URLs through the SDK. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in common programming languages, see [ID card recognition sample code](~~600208~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of ID card recognition, see [Common error codes](~~146772~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [
+ ['createdAt' => '2023-12-06T02:12:37.000Z', 'description' => 'Request parameters changed'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeIdentityCard'],
+ ],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeIdentityCard',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"A6175A03-624C-1976-908D-C8BE4C547C45\\",\\n \\"Data\\": {\\n \\"BackResult\\": {\\n \\"EndDate\\": \\"19800101\\",\\n \\"Issue\\": \\"杭州市公安局\\",\\n \\"StartDate\\": \\"19970101\\"\\n },\\n \\"FrontResult\\": {\\n \\"FaceRectangle\\": {\\n \\"Size\\": {\\n \\"Width\\": 196,\\n \\"Height\\": 243\\n },\\n \\"Angle\\": 0,\\n \\"Center\\": {\\n \\"Y\\": 225,\\n \\"X\\": 667\\n }\\n },\\n \\"BirthDate\\": \\"19880722\\",\\n \\"Gender\\": \\"男\\",\\n \\"Address\\": \\"江苏省南京市浦口区天天小区1栋11号\\",\\n \\"FaceRectVertices\\": [\\n {\\n \\"Y\\": 105,\\n \\"X\\": 569\\n }\\n ],\\n \\"CardAreas\\": [\\n {\\n \\"Y\\": 485,\\n \\"X\\": 132\\n }\\n ],\\n \\"Nationality\\": \\"汉\\",\\n \\"Name\\": \\"小明\\",\\n \\"IDNumber\\": \\"320001198807220000\\"\\n }\\n }\\n}","errorExample":""},{"type":"xml","example":"<RecognizeIdentityCardResponse>\\n <RequestId>A6175A03-624C-1976-908D-C8BE4C547C45</RequestId>\\n <Data>\\n <FrontResult>\\n <Address>江苏省南京市浦口区天天小区1栋11号</Address>\\n <FaceRectVertices>\\n <X>569</X>\\n <Y>105</Y>\\n </FaceRectVertices>\\n <FaceRectVertices>\\n <X>766</X>\\n <Y>104</Y>\\n </FaceRectVertices>\\n <FaceRectVertices>\\n <X>766</X>\\n <Y>348</Y>\\n </FaceRectVertices>\\n <FaceRectVertices>\\n <X>569</X>\\n <Y>348</Y>\\n </FaceRectVertices>\\n <FaceRectangle>\\n <Center>\\n <X>667</X>\\n <Y>225</Y>\\n </Center>\\n <Angle>0</Angle>\\n <Size>\\n <Height>243</Height>\\n <Width>196</Width>\\n </Size>\\n </FaceRectangle>\\n <CardAreas>\\n <X>132</X>\\n <Y>485</Y>\\n </CardAreas>\\n <CardAreas>\\n <X>132</X>\\n <Y>47</Y>\\n </CardAreas>\\n <CardAreas>\\n <X>817</X>\\n <Y>47</Y>\\n </CardAreas>\\n <CardAreas>\\n <X>818</X>\\n <Y>482</Y>\\n </CardAreas>\\n <Gender>男</Gender>\\n <Nationality>汉</Nationality>\\n <BirthDate>19880722</BirthDate>\\n <Name>小明</Name>\\n <IDNumber>320001198807220000</IDNumber>\\n </FrontResult>\\n </Data>\\n</RecognizeIdentityCardResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
'RecognizeLicensePlate' => [
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -1325,156 +1240,342 @@
[
'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeLicensePlate/cpsb1.jpg',
- 'isFileTransferUrl' => true,
- 'required' => true,
- 'type' => 'string',
- ],
+ 'schema' => ['description' => 'The license plate recognition feature currently supports the Shanghai and Shenzhen regions. If you selected the Shanghai region when activating the service, use OSS links in the Shanghai region. For local files or OSS links in other regions, see [File URL processing](~~155645~~). If you selected the Shenzhen region when activating the service, only OSS links in the Shenzhen region are supported.', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeLicensePlate/cpsb1.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'description' => '1',
+ 'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'example' => '3F10DAC3-CF4A-487C-BF33-3B8EB9AA12F2',
- 'type' => 'string',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '3F10DAC3-CF4A-487C-BF33-3B8EB9AA12F2', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
+ 'type' => 'object',
'properties' => [
'Plates' => [
- 'description' => '',
+ 'description' => 'The detailed information about the license plates.',
+ 'type' => 'array',
'items' => [
'description' => '1',
+ 'type' => 'object',
'properties' => [
- 'PlateTypeConfidence' => [
- 'description' => '',
- 'example' => '1',
- 'format' => 'float',
- 'type' => 'number',
- ],
- 'PlateType' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'Confidence' => [
- 'description' => '',
- 'example' => '0.99745339155197144',
- 'format' => 'float',
- 'type' => 'number',
- ],
- 'PlateNumber' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
+ 'PlateTypeConfidence' => ['description' => 'The confidence score of the license plate type. Value range: 0 to 1.', 'type' => 'number', 'format' => 'float', 'example' => '1', 'title' => ''],
+ 'PlateType' => ['description' => 'The license plate type, such as small vehicle, new energy vehicle, large vehicle, trailer, training vehicle, police vehicle, military vehicle, embassy vehicle, or Hong Kong/Macau vehicle.', 'type' => 'string', 'example' => '小型汽车', 'title' => ''],
+ 'Confidence' => ['description' => 'The confidence score of the license plate number. Value range: 0 to 1.', 'type' => 'number', 'format' => 'float', 'example' => '0.99745339155197144', 'title' => ''],
+ 'PlateNumber' => ['description' => 'The license plate number.', 'type' => 'string', 'example' => '粤BP57E7', 'title' => ''],
'Roi' => [
- 'description' => '',
+ 'description' => 'The license plate position.',
+ 'type' => 'object',
'properties' => [
- 'W' => [
- 'description' => '',
- 'example' => '141',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
- 'H' => [
- 'description' => '',
- 'example' => '53',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
- 'Y' => [
- 'description' => '',
- 'example' => '256',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
- 'X' => [
- 'description' => '',
- 'example' => '294',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
+ 'W' => ['description' => 'The width of the license plate.', 'type' => 'integer', 'format' => 'int32', 'example' => '141', 'title' => ''],
+ 'H' => ['description' => 'The height of the license plate.', 'type' => 'integer', 'format' => 'int32', 'example' => '53', 'title' => ''],
+ 'Y' => ['description' => 'The y-coordinate of the upper-left corner of the license plate.', 'type' => 'integer', 'format' => 'int32', 'example' => '256', 'title' => ''],
+ 'X' => ['description' => 'The x-coordinate of the upper-left corner of the license plate.', 'type' => 'integer', 'format' => 'int32', 'example' => '294', 'title' => ''],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
'Positions' => [
- 'description' => '',
+ 'description' => 'The position information of the license plate bounding box. The coordinates of the four corners of the bounding rectangle are listed clockwise: upper-left XY, upper-right XY, lower-right XY, and lower-left XY.',
+ 'type' => 'array',
'items' => [
+ 'type' => 'object',
'properties' => [
- 'X' => [
- 'description' => '',
- 'example' => '466',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'Y' => [
- 'description' => '',
- 'example' => '293',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
+ 'X' => ['description' => 'The x-coordinate of the bounding rectangle.', 'type' => 'integer', 'format' => 'int64', 'example' => '466', 'title' => ''],
+ 'Y' => ['description' => 'The y-coordinate of the bounding rectangle.', 'type' => 'integer', 'format' => 'int64', 'example' => '293', 'title' => ''],
],
- 'type' => 'object',
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
- 'type' => 'array',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
- 'type' => 'array',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"3F10DAC3-CF4A-487C-BF33-3B8EB9AA12F2\\",\\n \\"Data\\": {\\n \\"Plates\\": [\\n {\\n \\"PlateTypeConfidence\\": 1,\\n \\"PlateType\\": \\"小型汽车\\",\\n \\"Confidence\\": 0.9974533915519714,\\n \\"PlateNumber\\": \\"粤BP57E7\\",\\n \\"Roi\\": {\\n \\"W\\": 141,\\n \\"H\\": 53,\\n \\"Y\\": 256,\\n \\"X\\": 294\\n },\\n \\"Positions\\": [\\n {\\n \\"X\\": 466,\\n \\"Y\\": 293\\n }\\n ]\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'License plate recognition',
+ 'summary' => 'This topic describes the syntax and examples of the RecognizeLicensePlate operation for license plate recognition.',
+ 'description' => '## Feature description'."\n"
+ .'The license plate recognition feature accurately identifies license plate locations in images and returns five key fields: license plate position coordinates, license plate type, license plate number, license plate number confidence, and license plate confidence.'."\n"
+ ."\n"
+ .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeLicensePlate) to experience this feature or purchase it online.'."\n"
+ .'- For questions about API integration, usage, or consultation regarding the Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Integration guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete registration.'."\n"
+ .'2. Activate the service: Make sure you have activated the [OCR service](https://vision.aliyun.com/ocr). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_ocr_public_cn#/open).'."\n"
+ .'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/ocr/2019-12-30/RecognizeLicensePlate?lang=JAVA&sdkStyle=dara&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Focr%2FRecognizeLicensePlate%2Fcpsb1.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the OCR (ocr) category in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in commonly used languages, see [License plate recognition sample code](~~600145~~).'."\n"
+ ."\n"
+ .'7. Direct client calls: Common client call methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Image format: JPEG, JPG, PNG, BMP, or GIF.'."\n"
+ .'- Image size: up to 4 MB.'."\n"
+ .'- Image resolution: greater than 15 × 15 pixels and smaller than 4096 × 4096 pixels.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of license plate recognition, see [Billing overview](~~202631~~).'."\n"
+ ."\n"
+ .'> The debugging operation below is a paid operation. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeLicensePlate).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'For the license plate recognition feature under the Alibaba Cloud Vision AI OCR category, we recommend using the SDK. The SDK supports multiple programming languages. When calling the operation, select the SDK package for the OCR (ocr) category. File parameters support local files and arbitrary URLs through the SDK. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in commonly used languages, see [License plate recognition sample code](~~600145~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of license plate recognition, see [Common error codes](~~146772~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [
+ ['createdAt' => '2022-09-27T09:39:29.000Z', 'description' => 'Response parameters changed'],
+ ['createdAt' => '2021-05-10T07:33:03.000Z', 'description' => 'OpenAPI offline'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeLicensePlate'],
+ ],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeLicensePlate',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"3F10DAC3-CF4A-487C-BF33-3B8EB9AA12F2\\",\\n \\"Data\\": {\\n \\"Plates\\": [\\n {\\n \\"PlateTypeConfidence\\": 1,\\n \\"PlateType\\": \\"小型汽车\\",\\n \\"Confidence\\": 0.9974533915519714,\\n \\"PlateNumber\\": \\"粤BP57E7\\",\\n \\"Roi\\": {\\n \\"W\\": 141,\\n \\"H\\": 53,\\n \\"Y\\": 256,\\n \\"X\\": 294\\n },\\n \\"Positions\\": [\\n {\\n \\"X\\": 466,\\n \\"Y\\": 293\\n }\\n ]\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<RecognizeLicensePlateResponse>\\n <RequestId>3F10DAC3-CF4A-487C-BF33-3B8EB9AA12F2</RequestId>\\n <Data>\\n <Plates>\\n <PlateTypeConfidence>1</PlateTypeConfidence>\\n <PlateType>小型汽车</PlateType>\\n <Confidence>0.9974534</Confidence>\\n <PlateNumber>粤BP57E7</PlateNumber>\\n <Roi>\\n <W>141</W>\\n <H>53</H>\\n <Y>256</Y>\\n <X>294</X>\\n </Roi>\\n <Positions>\\n <X>466</X>\\n <Y>293</Y>\\n </Positions>\\n <Positions>\\n <X>667</X>\\n <Y>283</Y>\\n </Positions>\\n <Positions>\\n <X>669</X>\\n <Y>330</Y>\\n </Positions>\\n <Positions>\\n <X>469</X>\\n <Y>341</Y>\\n </Positions>\\n </Plates>\\n </Data>\\n</RecognizeLicensePlateResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'RecognizeQrCode' => [
- 'methods' => [
- 'post',
+ 'RecognizePdf' => [
+ 'summary' => 'This topic describes the syntax and provides examples of the RecognizePdf operation for PDF recognition.',
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'deprecated' => false,
+ 'systemTags' => [],
+ 'parameters' => [
+ [
+ 'name' => 'FileURL',
+ 'in' => 'formData',
+ 'schema' => ['title' => '', 'description' => 'The URL of the file. We recommend that you use an Object Storage Service (OSS) link in the Shanghai region. If the file is stored locally or the OSS link is in a region other than Shanghai, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/ocr/xxxx.pdf'],
+ ],
],
- 'schemes' => [
- 'http',
- 'https',
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => '',
+ 'description' => 'Schema of Response',
+ 'type' => 'object',
+ 'properties' => [
+ 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => 'CD9A9659-ABEE-4A7D-837F-9FDF40879A97'],
+ 'Data' => [
+ 'description' => 'The returned result data.',
+ 'type' => 'object',
+ 'properties' => [
+ 'Height' => ['description' => 'The height of the document after rotation in the image.', 'type' => 'integer', 'format' => 'int64', 'example' => '788', 'title' => ''],
+ 'Width' => ['description' => 'The width of the document after rotation in the image.', 'type' => 'integer', 'format' => 'int64', 'example' => '1220', 'title' => ''],
+ 'OrgHeight' => ['description' => 'The height of the original image.', 'type' => 'integer', 'format' => 'int64', 'example' => '610', 'title' => ''],
+ 'OrgWidth' => ['description' => 'The width of the original image.', 'type' => 'integer', 'format' => 'int64', 'example' => '394', 'title' => ''],
+ 'PageIndex' => ['description' => 'The page number of the PDF file.', 'type' => 'integer', 'format' => 'int64', 'example' => '1', 'title' => ''],
+ 'Angle' => ['description' => 'The rotation angle of the PDF file.', 'type' => 'integer', 'format' => 'int64', 'example' => '0', 'title' => ''],
+ 'WordsInfo' => [
+ 'description' => 'The text information.',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '1',
+ 'type' => 'object',
+ 'properties' => [
+ 'Angle' => ['description' => 'The rotation angle of the recognized field.', 'type' => 'integer', 'format' => 'int64', 'example' => '0', 'title' => ''],
+ 'Word' => ['description' => 'The text information.', 'type' => 'string', 'example' => '发票代码:012002000211', 'title' => ''],
+ 'Height' => ['description' => 'The height of the recognized field.', 'type' => 'integer', 'format' => 'int64', 'example' => '16', 'title' => ''],
+ 'Width' => ['description' => 'The width of the recognized field.', 'type' => 'integer', 'format' => 'int64', 'example' => '205', 'title' => ''],
+ 'X' => ['description' => 'The X coordinate of the upper-left corner of the recognized field.', 'type' => 'integer', 'format' => 'int64', 'example' => '863', 'title' => ''],
+ 'Y' => ['description' => 'The Y coordinate of the upper-left corner of the recognized field.', 'type' => 'integer', 'format' => 'int64', 'example' => '46', 'title' => ''],
+ 'Positions' => [
+ 'description' => 'The position of the text information. The coordinates of the four corners of the recognition bounding box are listed clockwise: upper-left XY coordinates, upper-right XY coordinates, lower-right XY coordinates, and lower-left XY coordinates.',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '1',
+ 'type' => 'object',
+ 'properties' => [
+ 'X' => ['description' => 'The X coordinate of the bounding box.', 'type' => 'integer', 'format' => 'int64', 'example' => '863', 'title' => ''],
+ 'Y' => ['description' => 'The Y coordinate of the bounding box.', 'type' => 'integer', 'format' => 'int64', 'example' => '43', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ ],
+ 'example' => '',
+ ],
+ ],
],
+ 'errorCodes' => [
+ 400 => [
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
+ ],
+ 403 => [
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
+ ],
+ 408 => [
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
+ ],
+ 503 => [
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"CD9A9659-ABEE-4A7D-837F-9FDF40879A97\\",\\n \\"Data\\": {\\n \\"Height\\": 788,\\n \\"Width\\": 1220,\\n \\"OrgHeight\\": 610,\\n \\"OrgWidth\\": 394,\\n \\"PageIndex\\": 1,\\n \\"Angle\\": 0,\\n \\"WordsInfo\\": [\\n {\\n \\"Angle\\": 0,\\n \\"Word\\": \\"发票代码:012002000211\\",\\n \\"Height\\": 16,\\n \\"Width\\": 205,\\n \\"X\\": 863,\\n \\"Y\\": 46,\\n \\"Positions\\": [\\n {\\n \\"X\\": 863,\\n \\"Y\\": 43\\n }\\n ]\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'PDF recognition',
+ 'description' => '## Feature description'."\n"
+ .'The PDF recognition feature performs structured recognition of text in PDF files.'."\n"
+ ."\n"
+ .'> - You can access [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for human assistance.'."\n"
+ .'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizePdf) to experience this feature or purchase it online.'."\n"
+ .'- To learn more about API integration, usage, or consultation for Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Common scenarios'."\n"
+ ."\n"
+ .'- Content moderation: Combine with content moderation capabilities to review recognition results and detect non-compliant information in documents.'."\n"
+ .'- Enterprise reimbursement: Perform structured recognition on PDF-format VAT invoices to automate reimbursement workflows.'."\n"
+ ."\n"
+ .'## Advantages'."\n"
+ ."\n"
+ .'- Accurate recognition: Upgraded intelligent algorithms accurately recognize file content and preserve the original layout.'."\n"
+ .'- Multi-language recognition: Supports recognition of Chinese, English, mixed Chinese-English, and other multilingual content.'."\n"
+ ."\n"
+ .'## Integration guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete registration.'."\n"
+ .'2. Activate the service: Make sure you have activated the [OCR service](https://vision.aliyun.com/ocr). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_ocr_public_cn#/open).'."\n"
+ .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/ocr/2019-12-30/RecognizePdf?lang=JAVA&sdkStyle=dara&params=%7B%22FileURL%22%3A%22https%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Focr%2FRecognizePdf%2FRecognizePdf1.pdf%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the OCR (ocr) category in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in commonly used languages, see [PDF recognition sample code](~~478612~~).'."\n"
+ ."\n"
+ .'7. Direct client calls: Common client call methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- File format: PDF.'."\n"
+ .'- File size: up to 10 MB.'."\n"
+ .'- Document length: up to 5 pages for PDF files.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of PDF recognition, see [Billing overview](~~202631~~).'."\n"
+ ."\n"
+ .'> The debugging operation below is a paid operation. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizePdf).',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'For the PDF recognition feature under the Alibaba Cloud Vision AI OCR category, we recommend that you use the SDK. Multiple programming languages are supported. When calling the operation, select the SDK package for the OCR (ocr) category. File parameters support local files and arbitrary URLs through the SDK. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in commonly used languages, see [PDF recognition sample code](~~478612~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of PDF recognition, see [Common error codes](~~146772~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [
+ ['createdAt' => '2022-09-27T09:39:29.000Z', 'description' => 'Response parameters changed'],
+ ['createdAt' => '2021-07-01T01:39:15.000Z', 'description' => 'OpenAPI offline'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizePdf'],
+ ],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizePdf',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'RecognizeQrCode' => [
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -1489,23 +1590,22 @@
'in' => 'formData',
'style' => 'repeatList',
'schema' => [
- 'description' => '1',
+ 'description' => '1.',
+ 'type' => 'array',
'items' => [
+ 'type' => 'object',
'properties' => [
- 'ImageURL' => [
- 'description' => '',
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeQrCode/RecognizeQrCode6.jpg',
- 'isFileTransferUrl' => true,
- 'required' => true,
- 'type' => 'string',
- ],
+ 'ImageURL' => ['description' => 'The URL of the image to be detected. Each element in the JSON array is an image detection task structure (image table). A maximum of 10 elements are supported, which means up to 10 images can be detected at the same time. We recommend that you use OSS links in the China (Shanghai) region. For images stored locally or in OSS links outside the China (Shanghai) region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeQrCode/RecognizeQrCode6.jpg', 'title' => ''],
],
'required' => false,
- 'type' => 'object',
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
- 'maxItems' => 10,
'required' => true,
- 'type' => 'array',
+ 'maxItems' => 10,
+ 'title' => '',
+ 'example' => '',
],
],
],
@@ -1513,114 +1613,361 @@
200 => [
'schema' => [
'description' => '1',
+ 'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'example' => 'A53DC437-F883-4968-86D5-EB21FB044692',
- 'type' => 'string',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'A53DC437-F883-4968-86D5-EB21FB044692', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned result data.',
+ 'type' => 'object',
'properties' => [
'Elements' => [
- 'description' => '',
+ 'description' => 'The element information returned by the recognition.',
+ 'type' => 'array',
'items' => [
+ 'type' => 'object',
'properties' => [
- 'ImageURL' => [
- 'description' => '',
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeQrCode/RecognizeQrCode6.jpg',
- 'type' => 'string',
- ],
- 'TaskId' => [
- 'description' => '',
- 'example' => 'img5iGtwVIxQzc4Nqy$L84yHd-1v****',
- 'type' => 'string',
- ],
+ 'ImageURL' => ['description' => 'The image URL corresponding to the request.', 'type' => 'string', 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeQrCode/RecognizeQrCode6.jpg', 'title' => ''],
+ 'TaskId' => ['description' => 'The ID of the detection task.', 'type' => 'string', 'example' => 'img5iGtwVIxQzc4Nqy$L84yHd-1v****', 'title' => ''],
'Results' => [
- 'description' => '',
+ 'description' => 'The returned results. A successful call returns one or more elements in the results.',
+ 'type' => 'array',
'items' => [
+ 'type' => 'object',
'properties' => [
- 'Suggestion' => [
- 'description' => '',
- 'example' => 'review',
- 'type' => 'string',
- ],
+ 'Suggestion' => ['description' => 'The recommended action. Valid values:'."\n"
+ ."\n"
+ .'- pass: The image is normal and no further action is required.'."\n"
+ ."\n"
+ .'- review: The detection result is uncertain and manual review is required.'."\n"
+ ."\n"
+ .'- block: The image contains a violation. We recommend that you take further action, such as deleting the image or restricting access.', 'type' => 'string', 'example' => 'review', 'title' => ''],
'QrCodesData' => [
'description' => '1',
- 'items' => [
- 'description' => '',
- 'example' => 'https://yqh.aliyun.com/live/detail/23798',
- 'type' => 'string',
- ],
'type' => 'array',
+ 'items' => ['description' => 'The text information contained in the QR codes when the image contains QR codes (the URL or text corresponding to each QR code).'."\n"
+ ."\n"
+ .'> Not all QR code images can be recognized and return the corresponding URL or text.'."\n"
+ .'- When **Suggestion** is `review`, the recognized QR code does not contain the corresponding URL or text information, and **QrCodesData** does not return the corresponding information.'."\n"
+ .'- When **Suggestion** is `block`, the corresponding URL or text information of the recognized QR code is returned.', 'type' => 'string', 'example' => 'https://yqh.aliyun.com/live/detail/23798', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
- 'Label' => [
- 'description' => '',
- 'example' => 'qrcode',
- 'type' => 'string',
- ],
- 'Rate' => [
- 'description' => '',
- 'example' => '99.91',
- 'format' => 'float',
- 'type' => 'number',
- ],
+ 'Label' => ['description' => 'The classification of the detection result. Valid values:'."\n"
+ ."\n"
+ .'- normal: A normal image.'."\n"
+ ."\n"
+ .'- qrcode: An image containing a QR code.'."\n"
+ ."\n"
+ .'- programCode: An image containing a mini program code.'."\n"
+ ."\n"
+ .'> Mini program codes are not recognized by default. To enable this feature, contact us through the DingTalk group (23109592).', 'type' => 'string', 'example' => 'qrcode', 'title' => ''],
+ 'Rate' => ['description' => 'The probability that the result belongs to this classification. Value range: `[0.00-100.00]`. A higher value indicates a higher probability of belonging to this classification.', 'type' => 'number', 'format' => 'float', 'example' => '99.91', 'title' => ''],
],
- 'type' => 'object',
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
- 'type' => 'array',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
- 'type' => 'array',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"A53DC437-F883-4968-86D5-EB21FB044692\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"ImageURL\\": \\"http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeQrCode/RecognizeQrCode6.jpg\\",\\n \\"TaskId\\": \\"img5iGtwVIxQzc4Nqy$L84yHd-1v****\\",\\n \\"Results\\": [\\n {\\n \\"Suggestion\\": \\"review\\",\\n \\"QrCodesData\\": [\\n \\"https://yqh.aliyun.com/live/detail/23798\\"\\n ],\\n \\"Label\\": \\"qrcode\\",\\n \\"Rate\\": 99.91\\n }\\n ]\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'QR code recognition',
+ 'summary' => 'This topic describes the syntax and provides examples of the QR code recognition feature (RecognizeQrCode).',
+ 'description' => '## Feature description'."\n"
+ .'The QR code recognition feature detects whether an image contains QR codes and returns the text information contained in each QR code (the URL or text corresponding to each QR code). Multiple QR codes in a single image are supported.'."\n"
+ ."\n"
+ .'> - If multiple tasks are detected at the same time, you are charged based on the number of tasks.'."\n"
+ .'- You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get online assistance.'."\n"
+ .'- You can try this feature for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeQrCode) to experience this feature or purchase it online.'."\n"
+ .'- To learn more about API integration, usage, or consultation for Alibaba Cloud Visual Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Integration guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Sign Up** in the upper-right corner, and follow the instructions to complete registration.'."\n"
+ .'2. Activate the service: Make sure you have activated the [OCR service](https://vision.aliyun.com/ocr). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_ocr_public_cn#/open).'."\n"
+ .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/ocr/2019-12-30/RecognizeQrCode?lang=JAVA&sdkStyle=dara&params=%7B%22Tasks%22%3A%5B%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Focr%2FRecognizeQrCode%2FRecognizeQrCode1.jpg%22%7D%5D%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the OCR (ocr) category in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the references as needed and invoke the API.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in commonly used languages, see [QR code recognition sample code](~~478589~~).'."\n"
+ ."\n"
+ .'7. Direct client calls: Common client call methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Image format: PNG, JPG, JPEG, BMP, GIF, or WEBP.'."\n"
+ .'- Image size: up to 10 MB.'."\n"
+ .'- Image resolution: at least 256 × 256 pixels is recommended. Low resolution may affect recognition accuracy.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ .'- Only QR code images are supported. Other types of codes are not supported.'."\n"
+ ."\n"
+ .'## Detection notes'."\n"
+ ."\n"
+ .'- The maximum detection time is 6 seconds. If the detection is not completed within this time limit, the system returns a timeout error code.'."\n"
+ ."\n"
+ .'- The image download time limit is 3 seconds. If the download time exceeds 3 seconds, a download timeout error is returned.'."\n"
+ ."\n"
+ .'- The response time of the image detection API depends on the image download time. Ensure that the storage service hosting the images is stable and reliable. We recommend that you use Alibaba Cloud OSS or CDN caching.'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of QR code recognition, see [Billing overview](~~202631~~).'."\n"
+ ."\n"
+ .'> The debugging API below is a paid API. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeQrCode).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'For the QR code recognition feature under the Alibaba Cloud Visual AI OCR category, we recommend that you use the SDK. Multiple programming languages are supported. When making calls, select the SDK package for the OCR (ocr) category. File parameters can be passed as local files or arbitrary URLs through the SDK. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in commonly used languages, see [QR code recognition sample code](~~478589~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of QR code recognition, see [Common error codes](~~146772~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [
+ ['createdAt' => '2022-11-10T08:51:34.000Z', 'description' => 'Request parameters changed'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeQrCode'],
+ ],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeQrCode',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"A53DC437-F883-4968-86D5-EB21FB044692\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"ImageURL\\": \\"http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeQrCode/RecognizeQrCode6.jpg\\",\\n \\"TaskId\\": \\"img5iGtwVIxQzc4Nqy$L84yHd-1v****\\",\\n \\"Results\\": [\\n {\\n \\"Suggestion\\": \\"review\\",\\n \\"QrCodesData\\": [\\n \\"https://yqh.aliyun.com/live/detail/23798\\"\\n ],\\n \\"Label\\": \\"qrcode\\",\\n \\"Rate\\": 99.91\\n }\\n ]\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<RecognizeQrCodeResponse>\\n <RequestId>A53DC437-F883-4968-86D5-EB21FB044692</RequestId>\\n <Data>\\n <Elements>\\n <ImageURL>http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeQrCode/RecognizeQrCode6.jpg</ImageURL>\\n <TaskId>img5iGtwVIxQzc4Nqy$L84yHd-1v****</TaskId>\\n <Results>\\n <Suggestion>review</Suggestion>\\n <QrCodesData>https://yqh.aliyun.com/live/detail/23798</QrCodesData>\\n <Label>qrcode</Label>\\n <Rate>99.91</Rate>\\n </Results>\\n </Elements>\\n </Data>\\n</RecognizeQrCodeResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
- 'responseParamsDescription' => ' ',
],
- 'RecognizeTable' => [
- 'methods' => [
- 'post',
+ 'RecognizeQuotaInvoice' => [
+ 'summary' => 'This topic describes the syntax and examples of the RecognizeQuotaInvoice operation for quota invoice recognition.',
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'deprecated' => false,
+ 'systemTags' => [],
+ 'parameters' => [
+ [
+ 'name' => 'ImageURL',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) link in the Shanghai region. If the file is stored locally or the OSS link is not in the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeQuotaInvoice/RecognizeQuotaInvoice1.jpg', 'title' => ''],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => '',
+ 'description' => 'Schema of Response',
+ 'type' => 'object',
+ 'properties' => [
+ 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => 'BC4C12D0-7FD3-419A-B997-A91212DF6D82'],
+ 'Data' => [
+ 'description' => 'The returned data.',
+ 'type' => 'object',
+ 'properties' => [
+ 'Angle' => ['description' => 'The rotation angle of the invoice. The value ranges from 0 to 360. 0 indicates upward, 90 indicates rightward, 180 indicates downward, and 270 indicates leftward.', 'type' => 'integer', 'format' => 'int64', 'example' => '1', 'title' => ''],
+ 'Height' => ['description' => 'The height of the invoice after rotation.', 'type' => 'integer', 'format' => 'int64', 'example' => '624', 'title' => ''],
+ 'Width' => ['description' => 'The width of the invoice after rotation.', 'type' => 'integer', 'format' => 'int64', 'example' => '865', 'title' => ''],
+ 'OrgHeight' => ['description' => 'The height of the original image.', 'type' => 'integer', 'format' => 'int64', 'example' => '610', 'title' => ''],
+ 'OrgWidth' => ['description' => 'The width of the original image.', 'type' => 'integer', 'format' => 'int64', 'example' => '855', 'title' => ''],
+ 'Content' => [
+ 'description' => 'The recognized content.',
+ 'type' => 'object',
+ 'properties' => [
+ 'SumAmount' => ['description' => 'The amount in uppercase Chinese characters.', 'type' => 'string', 'example' => '壹拾元整', 'title' => ''],
+ 'InvoiceCode' => ['description' => 'The invoice code.', 'type' => 'string', 'example' => '144031800103', 'title' => ''],
+ 'InvoiceNo' => ['description' => 'The invoice number.', 'type' => 'string', 'example' => '40637706', 'title' => ''],
+ 'InvoiceAmount' => ['description' => 'The amount in lowercase (numeric) format.', 'type' => 'string', 'example' => '10', 'title' => ''],
+ 'InvoiceDetails' => ['description' => 'The parsed invoice code details.', 'type' => 'string', 'example' => '税务局代码:国税,行政区划代码:深圳市,年份:2018,发票行业代码:None,发票类别代码:None,金额版:万元版,批次号:03', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'KeyValueInfos' => [
+ 'description' => 'The position information.',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '1',
+ 'type' => 'object',
+ 'properties' => [
+ 'Key' => ['description' => 'The name of the recognized field.', 'type' => 'string', 'example' => '大写金额', 'title' => ''],
+ 'Value' => ['description' => 'The value of the recognized field.', 'type' => 'string', 'example' => '壹拾元整', 'title' => ''],
+ 'ValuePositions' => [
+ 'description' => 'The position information of the recognized field. The coordinates of the four corners are arranged clockwise.',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '1',
+ 'type' => 'object',
+ 'properties' => [
+ 'X' => ['description' => 'The X coordinate of the bounding box.', 'type' => 'integer', 'format' => 'int64', 'example' => '544', 'title' => ''],
+ 'Y' => ['description' => 'The Y coordinate of the bounding box.', 'type' => 'integer', 'format' => 'int64', 'example' => '387', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'ValueScore' => ['description' => 'The confidence score of the recognized **Value** field. The value ranges from 0 to 100.', 'type' => 'number', 'format' => 'float', 'example' => '100', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ ],
+ 'example' => '',
+ ],
+ ],
],
- 'schemes' => [
- 'http',
- 'https',
+ 'errorCodes' => [
+ 400 => [
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
+ ],
+ 403 => [
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
+ ],
+ 408 => [
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
+ ],
+ 503 => [
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"BC4C12D0-7FD3-419A-B997-A91212DF6D82\\",\\n \\"Data\\": {\\n \\"Angle\\": 1,\\n \\"Height\\": 624,\\n \\"Width\\": 865,\\n \\"OrgHeight\\": 610,\\n \\"OrgWidth\\": 855,\\n \\"Content\\": {\\n \\"SumAmount\\": \\"壹拾元整\\",\\n \\"InvoiceCode\\": \\"144031800103\\",\\n \\"InvoiceNo\\": \\"40637706\\",\\n \\"InvoiceAmount\\": \\"10\\",\\n \\"InvoiceDetails\\": \\"税务局代码:国税,行政区划代码:深圳市,年份:2018,发票行业代码:None,发票类别代码:None,金额版:万元版,批次号:03\\"\\n },\\n \\"KeyValueInfos\\": [\\n {\\n \\"Key\\": \\"大写金额\\",\\n \\"Value\\": \\"壹拾元整\\",\\n \\"ValuePositions\\": [\\n {\\n \\"X\\": 544,\\n \\"Y\\": 387\\n }\\n ],\\n \\"ValueScore\\": 100\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'Quota invoice recognition',
+ 'description' => '## Feature description'."\n"
+ .'The quota invoice recognition feature can perform structured recognition of invoice numbers, invoice codes, and invoice amounts on quota invoices.'."\n"
+ ."\n"
+ .'> - The quota invoice recognition operation only recognizes text content in invoices and does not support verifying invoice authenticity.'."\n"
+ .'- You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get online assistance.'."\n"
+ .'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeQuotaInvoice) to experience this feature or purchase it online.'."\n"
+ .'- For questions about Alibaba Cloud Vision Intelligence Open Platform visual AI API integration or usage, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Common scenarios'."\n"
+ ."\n"
+ .'- Financial reimbursement: Recognizes and records key information on various quota invoices. This feature is applicable to tax accounting and internal reimbursement scenarios, effectively reducing manual accounting workload, simplifying reimbursement flows, and automating financial reimbursement.'."\n"
+ .'- Billing records: Recognizes and fetches invoice amount information. This feature is applicable to financial bookkeeping scenarios, enabling quick entry of billing information, effectively reducing user input costs, and improving user experience.'."\n"
+ ."\n"
+ .'## Advantages'."\n"
+ ."\n"
+ .'- Automation: Effectively reduces manual accounting workload, simplifies reimbursement processes, and automates financial reimbursement.'."\n"
+ .'- Cost savings: Enables quick entry of billing information, effectively reducing user input costs and improving user experience.'."\n"
+ ."\n"
+ .'## Integration guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete account registration.'."\n"
+ .'2. Activate the service: Make sure you have activated the [OCR service](https://vision.aliyun.com/ocr). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_ocr_public_cn#/open).'."\n"
+ .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using an AccessKey pair of a RAM user, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/ocr/2019-12-30/RecognizeQuotaInvoice?lang=JAVA&sdkStyle=dara&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Focr%2FRecognizeQuotaInvoice%2FRecognizeQuotaInvoice1.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the OCR (ocr) AI category in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Direct client calls: Common client invocation methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Image format: JPEG, JPG, PNG, or BMP.'."\n"
+ .'- Image size: up to 4 MB.'."\n"
+ .'- Image resolution: greater than 15 × 15 pixels and smaller than 4096 × 4096 pixels.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of quota invoice recognition, see [Billing overview](~~202631~~).'."\n"
+ ."\n"
+ .'> The debugging operation below is a paid operation. For a free trial, go to [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeQuotaInvoice).',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'For the quota invoice recognition feature under the Alibaba Cloud Vision AI OCR category, we recommend that you use the SDK. Multiple programming languages are supported. When calling the operation, select the SDK package for the OCR (ocr) AI category. File parameters support local files and arbitrary URLs through the SDK. For more information, see [SDK overview](~~145033~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of quota invoice recognition, see [Common error codes](~~146772~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [
+ ['createdAt' => '2022-09-27T09:39:29.000Z', 'description' => 'Response parameters changed'],
+ ['createdAt' => '2021-07-01T01:39:15.000Z', 'description' => 'OpenAPI offline'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeQuotaInvoice'],
+ ],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeQuotaInvoice',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
],
+ ],
+ 'RecognizeTable' => [
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -1633,219 +1980,229 @@
[
'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeTable/RecognizeTable4.jpg',
- 'isFileTransferUrl' => true,
- 'required' => true,
- 'type' => 'string',
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) link in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeTable/RecognizeTable4.jpg', 'title' => ''],
],
[
'name' => 'OutputFormat',
'in' => 'formData',
'schema' => [
- 'description' => '',
- 'example' => 'json',
- 'required' => true,
+ 'description' => 'The output format is `json`. (`html` and `xlsx` are deprecated. If you set this parameter to `html` or `xlsx`, the output is still in JSON format.).',
'type' => 'string',
- 'enum' => [
- 'html',
- 'json',
- 'xlsx',
- ],
+ 'required' => true,
+ 'enum' => ['html', 'json', 'xlsx'],
+ 'example' => 'json',
+ 'title' => '',
],
],
[
'name' => 'UseFinanceModel',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'true',
- 'required' => true,
- 'type' => 'boolean',
- ],
+ 'schema' => ['description' => 'Specifies whether to use the financial statement model. Valid values:'."\n"
+ .'- true: Use the financial statement model.'."\n"
+ .'- false: Do not use the financial statement model.', 'type' => 'boolean', 'required' => true, 'example' => 'true', 'title' => ''],
],
[
'name' => 'AssureDirection',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'false',
- 'required' => true,
- 'type' => 'boolean',
- ],
+ 'schema' => ['description' => 'Specifies whether the image direction is confirmed to be upright. Valid values:'."\n"
+ .'- true: The image is upright.'."\n"
+ .'- false: The image is not upright.', 'type' => 'boolean', 'required' => true, 'example' => 'false', 'title' => ''],
],
[
'name' => 'HasLine',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'false',
- 'required' => true,
- 'type' => 'boolean',
- ],
+ 'schema' => ['description' => 'Specifies whether the table has no lines. Valid values:'."\n"
+ .'- true: The table has no lines or has only horizontal lines without vertical lines.'."\n"
+ .'- false: The table has lines.', 'type' => 'boolean', 'required' => true, 'example' => 'false', 'title' => ''],
],
[
'name' => 'SkipDetection',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'false',
- 'required' => true,
- 'type' => 'boolean',
- ],
+ 'schema' => ['description' => 'Specifies whether to skip detection. Valid values:'."\n"
+ .'- true: Skip detection.'."\n"
+ .'- false: Do not skip detection.', 'type' => 'boolean', 'required' => true, 'example' => 'false', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
+ 'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'example' => 'CBC36BE6-2A18-5256-82BD-8B5477E5D058',
- 'type' => 'string',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'CBC36BE6-2A18-5256-82BD-8B5477E5D058', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
+ 'type' => 'object',
'properties' => [
- 'FileContent' => [
- 'description' => '',
- 'example' => 'UEsDBBQAAAAIAAAAIQBukMk4WAIAA****',
- 'type' => 'string',
- ],
+ 'FileContent' => ['description' => 'The request parameters `html` and `xlsx` are deprecated. Data is output in JSON format by default.', 'type' => 'string', 'example' => 'UEsDBBQAAAAIAAAAIQBukMk4WAIAA****', 'title' => ''],
'Tables' => [
- 'description' => '',
+ 'description' => 'The data in JSON format. This parameter is returned only when the request parameter OutputFormat is set to `json`.',
+ 'type' => 'array',
'items' => [
+ 'type' => 'object',
'properties' => [
'Head' => [
- 'items' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
'type' => 'array',
+ 'items' => ['description' => 'The table header information.', 'type' => 'string', 'example' => '存活盘点表', 'title' => ''],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
'Tail' => [
- 'items' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
'type' => 'array',
+ 'items' => ['description' => 'The table footer information.', 'type' => 'string', 'example' => '职工券', 'title' => ''],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
'TableRows' => [
- 'description' => '',
+ 'description' => 'The table data in JSON format.',
+ 'type' => 'array',
'items' => [
+ 'type' => 'object',
'properties' => [
'TableColumns' => [
- 'description' => '',
+ 'description' => 'The table data in JSON format.',
+ 'type' => 'array',
'items' => [
+ 'type' => 'object',
'properties' => [
- 'EndRow' => [
- 'description' => '',
- 'example' => '1',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
- 'EndColumn' => [
- 'description' => '',
- 'example' => '4',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
- 'Width' => [
- 'description' => '',
- 'example' => '0',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
- 'Height' => [
- 'description' => '',
- 'example' => '0',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
+ 'EndRow' => ['description' => 'The number of rows that the cell spans (rowspan), calculated as ey-sy.', 'type' => 'integer', 'format' => 'int32', 'example' => '1', 'title' => ''],
+ 'EndColumn' => ['description' => 'The number of columns that the cell spans (colspan), calculated as ex-sx.', 'type' => 'integer', 'format' => 'int32', 'example' => '4', 'title' => ''],
+ 'Width' => ['description' => 'The width of the cell in the image.', 'type' => 'integer', 'format' => 'int32', 'example' => '0', 'title' => ''],
+ 'Height' => ['description' => 'The height of the cell in the image.', 'type' => 'integer', 'format' => 'int32', 'example' => '0', 'title' => ''],
'Texts' => [
- 'items' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
'type' => 'array',
- ],
- 'StartRow' => [
+ 'items' => ['description' => 'The text content. Each row of text is a block.', 'type' => 'string', 'example' => '序号', 'title' => ''],
'description' => '',
- 'example' => '0',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
- 'StartColumn' => [
- 'description' => '',
- 'example' => '1',
- 'format' => 'int32',
- 'type' => 'integer',
+ 'title' => '',
+ 'example' => '',
],
+ 'StartRow' => ['description' => 'The starting row ID of the cell.', 'type' => 'integer', 'format' => 'int32', 'example' => '0', 'title' => ''],
+ 'StartColumn' => ['description' => 'The starting column ID of the cell.', 'type' => 'integer', 'format' => 'int32', 'example' => '1', 'title' => ''],
],
- 'type' => 'object',
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
- 'type' => 'array',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
- 'type' => 'array',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
- 'type' => 'array',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"CBC36BE6-2A18-5256-82BD-8B5477E5D058\\",\\n \\"Data\\": {\\n \\"FileContent\\": \\"UEsDBBQAAAAIAAAAIQBukMk4WAIAA****\\",\\n \\"Tables\\": [\\n {\\n \\"Head\\": [\\n \\"存活盘点表\\"\\n ],\\n \\"Tail\\": [\\n \\"职工券\\"\\n ],\\n \\"TableRows\\": [\\n {\\n \\"TableColumns\\": [\\n {\\n \\"EndRow\\": 1,\\n \\"EndColumn\\": 4,\\n \\"Width\\": 0,\\n \\"Height\\": 0,\\n \\"Texts\\": [\\n \\"序号\\"\\n ],\\n \\"StartRow\\": 0,\\n \\"StartColumn\\": 1\\n }\\n ]\\n }\\n ]\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'Table recognition',
+ 'summary' => 'This topic describes the syntax and examples of RecognizeTable for table recognition.',
+ 'description' => '## Feature description'."\n"
+ .'The table recognition feature automatically recognizes content in tables. This feature is applicable to tables that have black border lines and complete horizontal and vertical grid lines.'."\n"
+ ."\n"
+ .'> - You can go to [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- You can try this feature for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeTable) to try this feature or purchase it online.'."\n"
+ .'- To learn more about API integration, usage, or consultation for Alibaba Cloud Visual Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Integration guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete registration.'."\n"
+ .'2. Activate the service: Make sure you have activated the [OCR service](https://vision.aliyun.com/ocr). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_ocr_public_cn#/open).'."\n"
+ .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/ocr/2019-12-30/RecognizeTable?lang=JAVA&sdkStyle=dara&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Focr%2FRecognizeTable%2FRecognizeTable1.jpg%22%2C%22OutputFormat%22%3A%22json%22%2C%22UseFinanceModel%22%3Atrue%2C%22HasLine%22%3Afalse%2C%22AssureDirection%22%3Atrue%2C%22SkipDetection%22%3Afalse%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the OCR (ocr) category in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the API.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in common programming languages, see [Table recognition sample code](~~600191~~).'."\n"
+ ."\n"
+ .'7. Direct client calls: Common client call methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Image format: JPEG, JPG, PNG, BMP, or GIF.'."\n"
+ .'- Image size: up to 3 MB.'."\n"
+ .'- Image resolution: No limit on image resolution, but excessively high resolution may cause the API to time out. The timeout period is 5 seconds.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of table recognition, see [Billing overview](~~202631~~).'."\n"
+ ."\n"
+ .'> The API debugging interface below is a paid interface. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeTable).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'For the table recognition feature under the Alibaba Cloud Visual AI OCR category, we recommend that you use the SDK. The SDK supports multiple programming languages. When calling the SDK, select the SDK package for the OCR (ocr) category. File parameters support local files and arbitrary URLs through the SDK. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in common programming languages, see [Table recognition sample code](~~600191~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of table recognition, see [Common error codes](~~146772~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging interface are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [
+ ['createdAt' => '2022-03-30T07:03:21.000Z', 'description' => 'Error codes changed'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeTable'],
+ ],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeTable',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"CBC36BE6-2A18-5256-82BD-8B5477E5D058\\",\\n \\"Data\\": {\\n \\"FileContent\\": \\"UEsDBBQAAAAIAAAAIQBukMk4WAIAA****\\",\\n \\"Tables\\": [\\n {\\n \\"Head\\": [\\n \\"存活盘点表\\"\\n ],\\n \\"Tail\\": [\\n \\"职工券\\"\\n ],\\n \\"TableRows\\": [\\n {\\n \\"TableColumns\\": [\\n {\\n \\"EndRow\\": 1,\\n \\"EndColumn\\": 4,\\n \\"Width\\": 0,\\n \\"Height\\": 0,\\n \\"Texts\\": [\\n \\"序号\\"\\n ],\\n \\"StartRow\\": 0,\\n \\"StartColumn\\": 1\\n }\\n ]\\n }\\n ]\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
'RecognizeTaxiInvoice' => [
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -1858,179 +2215,421 @@
[
'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeTaxiInvoice/RecognizeTaxiInvoice2.jpg',
- 'isFileTransferUrl' => true,
- 'required' => true,
- 'type' => 'string',
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) link in the Shanghai region. If the file is stored locally or the OSS link is not in the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeTaxiInvoice/RecognizeTaxiInvoice2.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
+ 'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'example' => 'B2BBBD26-1D3E-4CFA-A80B-6A9266B8D125',
- 'type' => 'string',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'B2BBBD26-1D3E-4CFA-A80B-6A9266B8D125', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
+ 'type' => 'object',
'properties' => [
'Invoices' => [
- 'description' => '',
+ 'description' => 'The detailed information about the invoice list.',
+ 'type' => 'array',
'items' => [
+ 'type' => 'object',
'properties' => [
'Items' => [
- 'description' => '',
+ 'description' => 'The text list of each invoice.',
+ 'type' => 'array',
'items' => [
+ 'type' => 'object',
'properties' => [
'ItemRoi' => [
- 'description' => '',
+ 'description' => 'The position information of each field on the invoice.',
+ 'type' => 'object',
'properties' => [
'Size' => [
- 'description' => '',
+ 'description' => 'The width and height of the bounding box.',
+ 'type' => 'object',
'properties' => [
- 'W' => [
- 'description' => '',
- 'example' => '887.9998779296875',
- 'format' => 'float',
- 'type' => 'number',
- ],
- 'H' => [
- 'description' => '',
- 'example' => '81.999984741210938',
- 'format' => 'float',
- 'type' => 'number',
- ],
+ 'W' => ['description' => 'The width of the bounding box.', 'type' => 'number', 'format' => 'float', 'example' => '887.9998779296875', 'title' => ''],
+ 'H' => ['description' => 'The height of the bounding box.', 'type' => 'number', 'format' => 'float', 'example' => '81.999984741210938', 'title' => ''],
],
- 'type' => 'object',
- ],
- 'Angle' => [
- 'description' => '',
- 'example' => '-90',
- 'format' => 'float',
- 'type' => 'number',
+ 'title' => '',
+ 'example' => '',
],
+ 'Angle' => ['description' => 'The angle information. The origin of the coordinates is in the upper-left corner, and the direction parallel to the X-axis has an angle of 0. Counterclockwise rotation angles are negative, and clockwise rotation angles are positive. The angle is the degree between the horizontal axis (X-axis) rotated clockwise and the first edge it encounters. The angle range is -180° to 180°.', 'type' => 'number', 'format' => 'float', 'example' => '-90', 'title' => ''],
'Center' => [
- 'description' => '',
+ 'description' => 'The center point of the bounding box.',
+ 'type' => 'object',
'properties' => [
- 'Y' => [
- 'description' => '',
- 'example' => '1360',
- 'format' => 'float',
- 'type' => 'number',
- ],
- 'X' => [
- 'description' => '',
- 'example' => '1593',
- 'format' => 'float',
- 'type' => 'number',
- ],
+ 'Y' => ['description' => 'The Y coordinate of the center point of the bounding box.', 'type' => 'number', 'format' => 'float', 'example' => '1360', 'title' => ''],
+ 'X' => ['description' => 'The X coordinate of the center point of the bounding box.', 'type' => 'number', 'format' => 'float', 'example' => '1593', 'title' => ''],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
- ],
- 'Text' => [
- 'description' => '',
- 'example' => '86655664',
- 'type' => 'string',
+ 'title' => '',
+ 'example' => '',
],
+ 'Text' => ['description' => 'The information of each field on the invoice.', 'type' => 'string', 'example' => '86655664', 'title' => ''],
],
- 'type' => 'object',
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
- 'type' => 'array',
- ],
- 'RotateType' => [
- 'description' => '',
- 'example' => '0',
- 'format' => 'int32',
- 'type' => 'integer',
+ 'title' => '',
+ 'example' => '',
],
+ 'RotateType' => ['description' => 'The rotation angle of the invoice. Valid values:'."\n"
+ ."\n"
+ .'- 0: no rotation required.'."\n"
+ ."\n"
+ .'- 1: 90 degrees clockwise.'."\n"
+ ."\n"
+ .'- 2: 180 degrees clockwise.'."\n"
+ ."\n"
+ .'- 3: 270 degrees clockwise.', 'type' => 'integer', 'format' => 'int32', 'example' => '0', 'title' => ''],
'InvoiceRoi' => [
- 'description' => '',
+ 'description' => 'The position of the invoice.',
+ 'type' => 'object',
'properties' => [
- 'W' => [
- 'description' => '',
- 'example' => '1773',
- 'format' => 'float',
- 'type' => 'number',
- ],
- 'H' => [
- 'description' => '',
- 'example' => '3625',
- 'format' => 'float',
- 'type' => 'number',
- ],
- 'Y' => [
- 'description' => '',
- 'example' => '302',
- 'format' => 'float',
- 'type' => 'number',
+ 'W' => ['description' => 'The width of the invoice.', 'type' => 'number', 'format' => 'float', 'example' => '1773', 'title' => ''],
+ 'H' => ['description' => 'The height of the invoice.', 'type' => 'number', 'format' => 'float', 'example' => '3625', 'title' => ''],
+ 'Y' => ['description' => 'The Y coordinate of the upper-left corner of the invoice.', 'type' => 'number', 'format' => 'float', 'example' => '302', 'title' => ''],
+ 'X' => ['description' => 'The X coordinate of the upper-left corner of the invoice.', 'type' => 'number', 'format' => 'float', 'example' => '513', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ ],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ ],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
+ ],
+ ],
+ ],
+ 'errorCodes' => [
+ 400 => [
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
+ ],
+ 403 => [
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
+ ],
+ 408 => [
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
+ ],
+ 503 => [
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"B2BBBD26-1D3E-4CFA-A80B-6A9266B8D125\\",\\n \\"Data\\": {\\n \\"Invoices\\": [\\n {\\n \\"Items\\": [\\n {\\n \\"ItemRoi\\": {\\n \\"Size\\": {\\n \\"W\\": 887.9998779296875,\\n \\"H\\": 81.99998474121094\\n },\\n \\"Angle\\": -90,\\n \\"Center\\": {\\n \\"Y\\": 1360,\\n \\"X\\": 1593\\n }\\n },\\n \\"Text\\": \\"86655664\\"\\n }\\n ],\\n \\"RotateType\\": 0,\\n \\"InvoiceRoi\\": {\\n \\"W\\": 1773,\\n \\"H\\": 3625,\\n \\"Y\\": 302,\\n \\"X\\": 513\\n }\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'Taxi invoice recognition',
+ 'summary' => 'This topic describes the syntax and examples of RecognizeTaxiInvoice.',
+ 'description' => '## Feature description'."\n"
+ .'The taxi invoice recognition feature accurately detects the positions of taxi invoices from major cities across the country in images. It supports structured recognition of taxi invoices and outputs six key fields: invoice number, code, vehicle number, date, time, and amount.'."\n"
+ ."\n"
+ .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'> - You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeTaxiInvoice) to experience this feature or purchase it online.'."\n"
+ .'> - For questions about API integration, usage, or consultation regarding the Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Integration guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete registration.'."\n"
+ .'2. Activate the service: Make sure you have activated the [OCR service](https://vision.aliyun.com/ocr). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_ocr_public_cn#/open).'."\n"
+ .'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/ocr/2019-12-30/RecognizeTaxiInvoice?lang=JAVA&sdkStyle=dara&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Focr%2FRecognizeTaxiInvoice%2FRecognizeTaxiInvoice1.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .' - Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .' - Find the SDK package for the OCR (ocr) category in the corresponding SDK documentation and install it.'."\n"
+ .' - Modify the sample code provided in the References as needed and invoke the API.'."\n"
+ ."\n"
+ .'6. Direct client calls: Common client call methods for this feature include the following.'."\n"
+ .' - [Direct call from web frontend](~~467779~~)'."\n"
+ .' - [Direct call from mini programs](~~467780~~)'."\n"
+ .' - [Direct call from Android](~~467781~~)'."\n"
+ .' - [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Image format: JPEG, JPG, PNG, BMP, or GIF.'."\n"
+ .'- Image size: up to 3 MB.'."\n"
+ .'- Image resolution: No resolution limit is imposed, but an excessively high resolution may cause the API to time out. The timeout period is 5 seconds.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of taxi invoice recognition, see [Billing overview](~~202631~~).'."\n"
+ ."\n"
+ .'> The API debugging interface below is a paid interface. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeTaxiInvoice).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'For the taxi invoice recognition feature under the Alibaba Cloud Vision AI OCR category, we recommend that you use the SDK. The SDK supports multiple programming languages. When making calls, select the SDK package for the OCR (ocr) category. File parameters passed through the SDK support both local files and arbitrary URLs. For more information, see [SDK overview](~~145033~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of taxi invoice recognition, see [Common error codes](~~146772~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging interface are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [
+ ['createdAt' => '2022-03-30T07:03:21.000Z', 'description' => 'Error codes changed'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeTaxiInvoice'],
+ ],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeTaxiInvoice',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'RecognizeTicketInvoice' => [
+ 'summary' => 'This topic describes the syntax and provides examples of the RecognizeTicketInvoice operation for VAT roll invoice recognition.',
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'deprecated' => false,
+ 'systemTags' => [],
+ 'parameters' => [
+ [
+ 'name' => 'ImageURL',
+ 'in' => 'formData',
+ 'schema' => ['title' => '', 'description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) link in the Shanghai region. If the file is stored locally or the OSS link is not in the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeTicketInvoice/RecognizeTicketInvoice1.png'],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => '',
+ 'description' => 'Schema of Response',
+ 'type' => 'object',
+ 'properties' => [
+ 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '063C0178-7EA3-4754-96FB-C0C9AE6B9AAE'],
+ 'Data' => [
+ 'description' => 'The returned result data.',
+ 'type' => 'object',
+ 'properties' => [
+ 'Count' => ['description' => 'The number of invoices.', 'type' => 'integer', 'format' => 'int64', 'example' => '1', 'title' => ''],
+ 'Height' => ['description' => 'The height of the invoice after rotation.', 'type' => 'integer', 'format' => 'int64', 'example' => '594', 'title' => ''],
+ 'Width' => ['description' => 'The width of the invoice after rotation.', 'type' => 'integer', 'format' => 'int64', 'example' => '594', 'title' => ''],
+ 'OrgHeight' => ['description' => 'The height of the original image.', 'type' => 'integer', 'format' => 'int64', 'example' => '1417', 'title' => ''],
+ 'OrgWidth' => ['description' => 'The width of the original image.', 'type' => 'integer', 'format' => 'int64', 'example' => '1417', 'title' => ''],
+ 'Results' => [
+ 'description' => 'The recognition results.',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '1',
+ 'type' => 'object',
+ 'properties' => [
+ 'Index' => ['description' => 'The index of the invoice in the image.', 'type' => 'integer', 'format' => 'int64', 'example' => '1', 'title' => ''],
+ 'Content' => [
+ 'description' => 'The recognized content.',
+ 'type' => 'object',
+ 'properties' => [
+ 'InvoiceCode' => ['description' => 'The invoice code.', 'type' => 'string', 'example' => '044031860107', 'title' => ''],
+ 'InvoiceNumber' => ['description' => 'The invoice number.', 'type' => 'string', 'example' => '09267581', 'title' => ''],
+ 'InvoiceDate' => ['description' => 'The invoice date.', 'type' => 'string', 'example' => '2018-09-20', 'title' => ''],
+ 'AntiFakeCode' => ['description' => 'The verification code.', 'type' => 'string', 'example' => '81931914902643039780', 'title' => ''],
+ 'PayeeName' => ['description' => 'The seller name.', 'type' => 'string', 'example' => '深圳市xxxx有限公司', 'title' => ''],
+ 'PayeeRegisterNo' => ['description' => 'The seller tax number.', 'type' => 'string', 'example' => '914403002794492693', 'title' => ''],
+ 'PayerName' => ['description' => 'The buyer name.', 'type' => 'string', 'example' => '深圳市xxxx有限公司', 'title' => ''],
+ 'PayerRegisterNo' => ['description' => 'The buyer tax number.', 'type' => 'string', 'example' => '91440300MA5EXWHW6F', 'title' => ''],
+ 'SumAmount' => ['description' => 'The total price.', 'type' => 'string', 'example' => '¥220.00', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'Type' => ['description' => 'The invoice type. The following types are supported:'."\n"
+ ."\n"
+ .'- VAT invoice'."\n"
+ .'- Taxi receipt'."\n"
+ .'- Fixed-amount invoice'."\n"
+ .'- Motor vehicle sales invoice'."\n"
+ .'- Roll invoice.', 'type' => 'string', 'example' => '卷票', 'title' => ''],
+ 'KeyValueInfos' => [
+ 'description' => 'The position information.',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '1',
+ 'type' => 'object',
+ 'properties' => [
+ 'Key' => ['description' => 'The name of the recognized field.', 'type' => 'string', 'example' => '发票代码', 'title' => ''],
+ 'Value' => ['description' => 'The value of the recognized field.', 'type' => 'string', 'example' => '044031860107', 'title' => ''],
+ 'ValuePositions' => [
+ 'description' => 'The position information of the recognized field. The coordinates of the four corners are arranged clockwise.',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '1',
+ 'type' => 'object',
+ 'properties' => [
+ 'X' => ['description' => 'The X coordinate of the bounding box.', 'type' => 'integer', 'format' => 'int64', 'example' => '586', 'title' => ''],
+ 'Y' => ['description' => 'The Y coordinate of the bounding box.', 'type' => 'integer', 'format' => 'int64', 'example' => '16', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'ValueScore' => ['description' => 'The confidence score of the recognized field Value. Valid values: 0 to 100.', 'type' => 'number', 'format' => 'float', 'example' => '100', 'title' => ''],
],
- 'X' => [
- 'description' => '',
- 'example' => '513',
- 'format' => 'float',
- 'type' => 'number',
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'SliceRectangle' => [
+ 'description' => 'The coordinates of the four corners of the invoice recognition bounding box, arranged clockwise.',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '1',
+ 'type' => 'object',
+ 'properties' => [
+ 'X' => ['description' => 'The X coordinate of the bounding box.', 'type' => 'integer', 'format' => 'int64', 'example' => '586', 'title' => ''],
+ 'Y' => ['description' => 'The Y coordinate of the bounding box.', 'type' => 'integer', 'format' => 'int64', 'example' => '16', 'title' => ''],
],
+ 'title' => '',
+ 'example' => '',
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
- 'type' => 'array',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"063C0178-7EA3-4754-96FB-C0C9AE6B9AAE\\",\\n \\"Data\\": {\\n \\"Count\\": 1,\\n \\"Height\\": 594,\\n \\"Width\\": 594,\\n \\"OrgHeight\\": 1417,\\n \\"OrgWidth\\": 1417,\\n \\"Results\\": [\\n {\\n \\"Index\\": 1,\\n \\"Content\\": {\\n \\"InvoiceCode\\": \\"044031860107\\",\\n \\"InvoiceNumber\\": \\"09267581\\",\\n \\"InvoiceDate\\": \\"2018-09-20\\",\\n \\"AntiFakeCode\\": \\"81931914902643039780\\",\\n \\"PayeeName\\": \\"深圳市xxxx有限公司\\",\\n \\"PayeeRegisterNo\\": \\"914403002794492693\\",\\n \\"PayerName\\": \\"深圳市xxxx有限公司\\",\\n \\"PayerRegisterNo\\": \\"91440300MA5EXWHW6F\\",\\n \\"SumAmount\\": \\"¥220.00\\"\\n },\\n \\"Type\\": \\"卷票\\",\\n \\"KeyValueInfos\\": [\\n {\\n \\"Key\\": \\"发票代码\\",\\n \\"Value\\": \\"044031860107\\",\\n \\"ValuePositions\\": [\\n {\\n \\"X\\": 586,\\n \\"Y\\": 16\\n }\\n ],\\n \\"ValueScore\\": 100\\n }\\n ],\\n \\"SliceRectangle\\": [\\n {\\n \\"X\\": 586,\\n \\"Y\\": 16\\n }\\n ]\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'VAT roll invoice recognition',
+ 'description' => '## Feature description'."\n"
+ .'The VAT roll invoice recognition feature supports structured recognition of fields on roll invoices, including total amount with tax, invoice code, invoice number, total tax amount, total amount, cipher area, invoice date, tax rate, buyer identification number, and seller identification number.'."\n"
+ ."\n"
+ .'> - The VAT roll invoice recognition operation only recognizes text content on invoices and does not support invoice authenticity verification.'."\n"
+ .'- You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- You can try this feature for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeTicketInvoice) to experience this feature or purchase it online.'."\n"
+ .'- For questions about Alibaba Cloud Visual Intelligence Open Platform API integration or usage, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Common scenarios'."\n"
+ ."\n"
+ .'- Invoice verification: Intelligently recognizes four key fields — invoice code, invoice number, amount, and invoice date — to quickly connect to the tax authority invoice verification platform for authenticity checks. This effectively reduces labor costs and controls business risks.'."\n"
+ .'- Billing records: Automatically recognizes and enters information such as invoice amount and invoice date. This feature can be applied to financial bookkeeping scenarios to help users quickly enter billing information, reduce manual input costs, and improve user experience.'."\n"
+ ."\n"
+ .'## Advantages'."\n"
+ ."\n"
+ .'- Full-field recognition: Supports structured recognition of key fields on VAT roll invoices, meeting the field recognition requirements in scenarios such as financial and tax reimbursement.'."\n"
+ .'- Cost savings: After invoice information is recognized, the information is entered as needed, effectively reducing manual input costs and improving user experience.'."\n"
+ ."\n"
+ .'## Integration guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete account registration.'."\n"
+ .'2. Activate the service: Make sure you have activated the [OCR service](https://vision.aliyun.com/ocr). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_ocr_public_cn#/open).'."\n"
+ .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/ocr/2019-12-30/RecognizeTicketInvoice?lang=JAVA&sdkStyle=dara&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Focr%2FRecognizeTicketInvoice%2FRecognizeTicketInvoice1.png%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the OCR (ocr) category in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the references as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in commonly used languages, see [VAT roll invoice recognition sample code](~~600159~~).'."\n"
+ ."\n"
+ .'7. Direct client calls: Common client call methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Image format: JPEG, JPG, PNG, or BMP.'."\n"
+ .'- Image size: up to 4 MB.'."\n"
+ .'- Image resolution: greater than 15 × 15 pixels and less than 4096 × 4096 pixels.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of VAT roll invoice recognition, see [Billing overview](~~202631~~).'."\n"
+ ."\n"
+ .'> The debugging operation below is a paid operation. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeTicketInvoice).',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'For the VAT roll invoice recognition feature under the Alibaba Cloud Visual AI OCR category, we recommend that you use the SDK. The SDK supports multiple programming languages. When calling the SDK, select the SDK package for the OCR (ocr) category. File parameters support local files and arbitrary URLs through SDK calls. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in commonly used languages, see [VAT roll invoice recognition sample code](~~600159~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of VAT roll invoice recognition, see [Common error codes](~~146772~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [
+ ['createdAt' => '2022-09-27T09:39:29.000Z', 'description' => 'Response parameters changed'],
+ ['createdAt' => '2021-07-01T01:39:15.000Z', 'description' => 'OpenAPI offline'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeTicketInvoice'],
+ ],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeTicketInvoice',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"B2BBBD26-1D3E-4CFA-A80B-6A9266B8D125\\",\\n \\"Data\\": {\\n \\"Invoices\\": [\\n {\\n \\"Items\\": [\\n {\\n \\"ItemRoi\\": {\\n \\"Size\\": {\\n \\"W\\": 887.9998779296875,\\n \\"H\\": 81.99998474121094\\n },\\n \\"Angle\\": -90,\\n \\"Center\\": {\\n \\"Y\\": 1360,\\n \\"X\\": 1593\\n }\\n },\\n \\"Text\\": \\"86655664\\"\\n }\\n ],\\n \\"RotateType\\": 0,\\n \\"InvoiceRoi\\": {\\n \\"W\\": 1773,\\n \\"H\\": 3625,\\n \\"Y\\": 302,\\n \\"X\\": 513\\n }\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<RequestId>B2BBBD26-1D3E-4CFA-A80B-6A9266B8D125</RequestId>\\n<Data>\\n <Invoices>\\n <RotateType>0</RotateType>\\n <InvoiceRoi>\\n <W>1773</W>\\n <H>3625</H>\\n <X>513</X>\\n <Y>302</Y>\\n </InvoiceRoi>\\n <Items>\\n <ItemRoi>\\n <Center>\\n <X>1436</X>\\n <Y>968.5</Y>\\n </Center>\\n <Angle>-90</Angle>\\n <Size>\\n <W>89</W>\\n <H>1110</H>\\n </Size>\\n </ItemRoi>\\n <Text>132011781210</Text>\\n </Items>\\n <Items>\\n <ItemRoi>\\n <Center>\\n <X>1246.5</X>\\n <Y>1239</Y>\\n </Center>\\n <Angle>-90</Angle>\\n <Size>\\n <W>92</W>\\n <H>743</H>\\n </Size>\\n </ItemRoi>\\n <Text>13742573</Text>\\n </Items>\\n <Items>\\n <ItemRoi>\\n <Center>\\n <X>1593</X>\\n <Y>1360</Y>\\n </Center>\\n <Angle>0</Angle>\\n <Size>\\n <W>887.9998779296875</W>\\n <H>81.99998474121094</H>\\n </Size>\\n </ItemRoi>\\n <Text>013560325483</Text>\\n </Items>\\n <Items>\\n <ItemRoi>\\n <Center>\\n <X>1744</X>\\n <Y>1507.5</Y>\\n </Center>\\n <Angle>0</Angle>\\n <Size>\\n <W>585.9998779296875</W>\\n <H>80.99998474121094</H>\\n </Size>\\n </ItemRoi>\\n <Text>86655664</Text>\\n </Items>\\n <Items>\\n <ItemRoi>\\n <Center>\\n <X>1778</X>\\n <Y>1668</Y>\\n </Center>\\n <Angle>-90</Angle>\\n <Size>\\n <W>80</W>\\n <H>524</H>\\n </Size>\\n </ItemRoi>\\n <Text>A-B6167</Text>\\n </Items>\\n <Items>\\n <ItemRoi>\\n <Center>\\n <X>1629.5</X>\\n <Y>1840</Y>\\n </Center>\\n <Angle>-90</Angle>\\n <Size>\\n <W>81.99998474121094</W>\\n <H>828.9998779296875</H>\\n </Size>\\n </ItemRoi>\\n <Text>2018年02月28日</Text>\\n </Items>\\n <Items>\\n <ItemRoi>\\n <Center>\\n <X>1864</X>\\n <Y>2009.5</Y>\\n </Center>\\n <Angle>-90</Angle>\\n <Size>\\n <W>91</W>\\n <H>390</H>\\n </Size>\\n </ItemRoi>\\n <Text>22:24</Text>\\n </Items>\\n <Items>\\n <ItemRoi>\\n <Center>\\n <X>1862</X>\\n <Y>2180</Y>\\n </Center>\\n <Angle>-90</Angle>\\n <Size>\\n <W>96</W>\\n <H>384</H>\\n </Size>\\n </ItemRoi>\\n <Text>22:57</Text>\\n </Items>\\n <Items>\\n <ItemRoi>\\n <Center>\\n <X>1730</X>\\n <Y>2348</Y>\\n </Center>\\n <Angle>-90</Angle>\\n <Size>\\n <W>96</W>\\n <H>608</H>\\n </Size>\\n </ItemRoi>\\n <Text>3.60元/公里</Text>\\n </Items>\\n <Items>\\n <ItemRoi>\\n <Center>\\n <X>1813</X>\\n <Y>2530</Y>\\n </Center>\\n <Angle>-90</Angle>\\n <Size>\\n <W>92</W>\\n <H>466</H>\\n </Size>\\n </ItemRoi>\\n <Text>40.9公里</Text>\\n </Items>\\n <Items>\\n <ItemRoi>\\n <Center>\\n <X>1741</X>\\n <Y>2697</Y>\\n </Center>\\n <Angle>0</Angle>\\n <Size>\\n <W>613.9998779296875</W>\\n <H>91.99998474121094</H>\\n </Size>\\n </ItemRoi>\\n <Text>00:04.03</Text>\\n </Items>\\n <Items>\\n <ItemRoi>\\n <Center>\\n <X>1785.5</X>\\n <Y>2868.5</Y>\\n </Center>\\n <Angle>-90</Angle>\\n <Size>\\n <W>91</W>\\n <H>519</H>\\n </Size>\\n </ItemRoi>\\n <Text>129.00元</Text>\\n </Items>\\n <Items>\\n <ItemRoi>\\n <Center>\\n <X>1850.5</X>\\n <Y>3026</Y>\\n </Center>\\n <Angle>0</Angle>\\n <Size>\\n <W>400.99993896484375</W>\\n <H>105.99998474121094</H>\\n </Size>\\n </ItemRoi>\\n <Text>0.00元</Text>\\n </Items>\\n <Items>\\n <ItemRoi>\\n <Center>\\n <X>1848.5</X>\\n <Y>3187</Y>\\n </Center>\\n <Angle>0</Angle>\\n <Size>\\n <W>396.99993896484375</W>\\n <H>99.99998474121094</H>\\n </Size>\\n </ItemRoi>\\n <Text>0.00元</Text>\\n </Items>\\n <Items>\\n <ItemRoi>\\n <Center>\\n <X>1953</X>\\n <Y>3368</Y>\\n </Center>\\n <Angle>0</Angle>\\n <Size>\\n <W>166</W>\\n <H>78</H>\\n </Size>\\n </ItemRoi>\\n <Text>**</Text>\\n </Items>\\n <Items>\\n <ItemRoi>\\n <Center>\\n <X>1954</X>\\n <Y>3539</Y>\\n </Center>\\n <Angle>0</Angle>\\n <Size>\\n <W>160</W>\\n <H>72</H>\\n </Size>\\n </ItemRoi>\\n <Text>**</Text>\\n </Items>\\n <Items>\\n <ItemRoi>\\n <Center>\\n <X>1945</X>\\n <Y>3704.5</Y>\\n </Center>\\n <Angle>0</Angle>\\n <Size>\\n <W>158</W>\\n <H>71</H>\\n </Size>\\n </ItemRoi>\\n <Text>**</Text>\\n </Items>\\n </Invoices>\\n</Data>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
'RecognizeTrainTicket' => [
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -2043,114 +2642,121 @@
[
'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeTrainTicket/RecognizeTrainTicket3.jpg',
- 'isFileTransferUrl' => true,
- 'required' => true,
- 'type' => 'string',
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) link in the Shanghai region. If the file is stored locally or the OSS link is not in the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeTrainTicket/RecognizeTrainTicket3.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
+ 'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'example' => 'BE4B73EA-30A0-4573-A548-3A101B34641A',
- 'type' => 'string',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'BE4B73EA-30A0-4573-A548-3A101B34641A', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
+ 'type' => 'object',
'properties' => [
- 'Price' => [
- 'description' => '',
- 'example' => '104.5',
- 'format' => 'float',
- 'type' => 'number',
- ],
- 'Destination' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'DepartureStation' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'Date' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'Number' => [
- 'description' => '',
- 'example' => 'G7350',
- 'type' => 'string',
- ],
- 'Seat' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'Name' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'Level' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
+ 'Price' => ['description' => 'The ticket price.', 'type' => 'number', 'format' => 'float', 'example' => '104.5', 'title' => ''],
+ 'Destination' => ['description' => 'The destination station.', 'type' => 'string', 'example' => '南京南站', 'title' => ''],
+ 'DepartureStation' => ['description' => 'The departure station.', 'type' => 'string', 'example' => '苏州站', 'title' => ''],
+ 'Date' => ['description' => 'The travel date and time.', 'type' => 'string', 'example' => '2017年08月05日22:09开', 'title' => ''],
+ 'Number' => ['description' => 'The train number.', 'type' => 'string', 'example' => 'G7350', 'title' => ''],
+ 'Seat' => ['description' => 'The carriage and seat number.', 'type' => 'string', 'example' => '04车13A号', 'title' => ''],
+ 'Name' => ['description' => 'The passenger name.', 'type' => 'string', 'example' => '帅帅', 'title' => ''],
+ 'Level' => ['description' => 'The seat class.', 'type' => 'string', 'example' => '二等座', 'title' => ''],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"BE4B73EA-30A0-4573-A548-3A101B34641A\\",\\n \\"Data\\": {\\n \\"Price\\": 104.5,\\n \\"Destination\\": \\"南京南站\\",\\n \\"DepartureStation\\": \\"苏州站\\",\\n \\"Date\\": \\"2017年08月05日22:09开\\",\\n \\"Number\\": \\"G7350\\",\\n \\"Seat\\": \\"04车13A号\\",\\n \\"Name\\": \\"帅帅\\",\\n \\"Level\\": \\"二等座\\"\\n }\\n}","type":"json"}]',
+ 'title' => 'Train ticket recognition',
+ 'summary' => 'This topic describes the syntax and examples of the RecognizeTrainTicket operation.',
+ 'description' => '## Feature description'."\n"
+ .'The train ticket recognition feature performs structured recognition on train tickets and extracts eight key fields: travel date, departure station, destination station, seat class, passenger name, train number, ticket price, and carriage and seat number.'."\n"
+ ."\n"
+ .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeTrainTicket) to experience this feature or purchase it online.'."\n"
+ .'- For questions about API integration and usage of Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Integration guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete the registration.'."\n"
+ .'2. Activate the service: Make sure you have activated the [OCR service](https://vision.aliyun.com/ocr). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_ocr_public_cn#/open).'."\n"
+ .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using an AccessKey pair of a RAM user, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/ocr/2019-12-30/RecognizeTrainTicket?lang=JAVA&sdkStyle=dara&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Focr%2FRecognizeTrainTicket%2FRecognizeTrainTicket1.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from [SDK overview](~~145033~~).'."\n"
+ .'- Find and install the SDK package for the OCR (ocr) category in the corresponding SDK documentation.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Direct client calls: Common client call methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Image format: JPEG, JPG, PNG, BMP, or GIF.'."\n"
+ .'- Image size: up to 3 MB.'."\n"
+ .'- Image resolution: No resolution limit is imposed. However, excessively high resolutions may cause the API to time out. The timeout period is 5 seconds.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of train ticket recognition, see [Billing overview](~~202631~~).'."\n"
+ .'> The debugging operation below is a paid operation. For a free trial, go to [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeTrainTicket).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'For the train ticket recognition feature under the Alibaba Cloud Vision AI OCR category, we recommend that you use the SDK. The SDK supports multiple programming languages. When calling the operation, select the SDK package for the OCR (ocr) category. File parameters passed through the SDK support both local files and arbitrary URLs. For more information, see [SDK overview](~~145033~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of train ticket recognition, see [Common error codes](~~146772~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [
+ ['createdAt' => '2024-02-23T08:01:25.000Z', 'description' => 'Error codes changed'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '18', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeTrainTicket'],
+ ],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeTrainTicket',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"BE4B73EA-30A0-4573-A548-3A101B34641A\\",\\n \\"Data\\": {\\n \\"Price\\": 104.5,\\n \\"Destination\\": \\"南京南站\\",\\n \\"DepartureStation\\": \\"苏州站\\",\\n \\"Date\\": \\"2017年08月05日22:09开\\",\\n \\"Number\\": \\"G7350\\",\\n \\"Seat\\": \\"04车13A号\\",\\n \\"Name\\": \\"帅帅\\",\\n \\"Level\\": \\"二等座\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<RecognizeTrainTicketResponse>\\n <RequestId>BE4B73EA-30A0-4573-A548-3A101B34641A</RequestId>\\n <Data>\\n <Price>104.5</Price>\\n <Destination>南京南站</Destination>\\n <DepartureStation>苏州站</DepartureStation>\\n <Date>2017年08月05日22:09开</Date>\\n <Number>G7350</Number>\\n <Seat>04车13A号</Seat>\\n <Name>帅帅</Name>\\n <Level>二等座</Level>\\n </Data>\\n</RecognizeTrainTicketResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
- 'responseParamsDescription' => ' ',
],
'RecognizeVATInvoice' => [
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -2163,25 +2769,19 @@
[
'name' => 'FileURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeVATInvoice/RecognizeVATInvoice3.jpg',
- 'isFileTransferUrl' => true,
- 'required' => true,
- 'type' => 'string',
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an OSS URL in the China (Shanghai) region. If the file is stored locally or in an OSS bucket outside the China (Shanghai) region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeVATInvoice/RecognizeVATInvoice3.jpg', 'title' => ''],
],
[
'name' => 'FileType',
'in' => 'formData',
'schema' => [
- 'description' => '',
- 'example' => 'jpg',
- 'required' => true,
+ 'description' => 'The input image format parameter. Set this parameter to `jpg`.',
+ 'enumValueTitles' => ['jpg' => 'jpg'],
'type' => 'string',
- 'enum' => [
- 'jpg',
- ],
+ 'required' => true,
+ 'enum' => ['jpg'],
+ 'example' => 'jpg',
+ 'title' => '',
],
],
],
@@ -2189,376 +2789,296 @@
200 => [
'schema' => [
'description' => '1',
+ 'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'example' => '56A10D65-ECE0-59DE-9775-F6494D2AF13B',
- 'type' => 'string',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '56A10D65-ECE0-59DE-9775-F6494D2AF13B', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned result data.',
+ 'type' => 'object',
'properties' => [
'Box' => [
- 'description' => '',
+ 'description' => 'The bounding boxes of key fields on the invoice. The format is \\[X coordinate of the upper-left corner, Y coordinate of the upper-left corner, X coordinate of the lower-right corner, Y coordinate of the lower-right corner].',
+ 'type' => 'object',
'properties' => [
'PayerRegisterNoes' => [
'description' => '1',
- 'items' => [
- 'description' => '',
- 'example' => '358,262,567,290',
- 'format' => 'float',
- 'type' => 'number',
- ],
'type' => 'array',
+ 'items' => ['description' => 'The bounding box of the buyer\'s taxpayer identification number.', 'type' => 'number', 'format' => 'float', 'example' => '358,262,567,290', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'PayeeAddresses' => [
'description' => '1',
- 'items' => [
- 'description' => '',
- 'example' => '355,909,734,939',
- 'format' => 'float',
- 'type' => 'number',
- ],
'type' => 'array',
+ 'items' => ['description' => 'The bounding box of the buyer\'s address and phone number.', 'type' => 'number', 'format' => 'float', 'example' => '355,909,734,939', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'PayeeBankNames' => [
'description' => '1',
- 'items' => [
- 'description' => '',
- 'example' => '354,947,938,977',
- 'format' => 'float',
- 'type' => 'number',
- ],
'type' => 'array',
+ 'items' => ['description' => 'The bounding box of the buyer\'s bank name and account number.', 'type' => 'number', 'format' => 'float', 'example' => '354,947,938,977', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'Checkers' => [
'description' => '1',
- 'items' => [
- 'description' => '',
- 'example' => '589,1003,662,1033',
- 'format' => 'float',
- 'type' => 'number',
- ],
'type' => 'array',
+ 'items' => ['description' => 'The bounding box of the reviewer.', 'type' => 'number', 'format' => 'float', 'example' => '589,1003,662,1033', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'TaxAmounts' => [
'description' => '1',
- 'items' => [
- 'description' => '',
- 'example' => '1606,721,1658,748',
- 'format' => 'float',
- 'type' => 'number',
- ],
'type' => 'array',
+ 'items' => ['description' => 'The bounding box of the total tax amount.', 'type' => 'number', 'format' => 'float', 'example' => '1606,721,1658,748', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'SumAmounts' => [
'description' => '1',
- 'items' => [
- 'description' => '',
- 'example' => '32,774,629,805',
- 'format' => 'float',
- 'type' => 'number',
- ],
'type' => 'array',
+ 'items' => ['description' => 'The bounding box of the total amount (tax inclusive).', 'type' => 'number', 'format' => 'float', 'example' => '32,774,629,805', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'Clerks' => [
'description' => '1',
- 'items' => [
- 'description' => '',
- 'example' => '986,1003,1060,1033',
- 'format' => 'float',
- 'type' => 'number',
- ],
'type' => 'array',
+ 'items' => ['description' => 'The bounding box of the invoice issuer.', 'type' => 'number', 'format' => 'float', 'example' => '986,1003,1060,1033', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'InvoiceNoes' => [
'description' => '1',
- 'items' => [
- 'description' => '',
- 'example' => '1377,78,1478,105',
- 'format' => 'float',
- 'type' => 'number',
- ],
'type' => 'array',
+ 'items' => ['description' => 'The bounding box of the invoice number.', 'type' => 'number', 'format' => 'float', 'example' => '1377,78,1478,105', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'InvoiceDates' => [
'description' => '1',
- 'items' => [
- 'description' => '',
- 'example' => '1376,115,1596,145',
- 'format' => 'float',
- 'type' => 'number',
- ],
'type' => 'array',
+ 'items' => ['description' => 'The bounding box of the invoice date.', 'type' => 'number', 'format' => 'float', 'example' => '1376,115,1596,145', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'InvoiceCodes' => [
'description' => '1',
- 'items' => [
- 'description' => '',
- 'example' => '1378,41,1520,68',
- 'format' => 'float',
- 'type' => 'number',
- ],
'type' => 'array',
+ 'items' => ['description' => 'The bounding box of the invoice code.', 'type' => 'number', 'format' => 'float', 'example' => '1378,41,1520,68', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'InvoiceFakeCodes' => [
'description' => '1',
- 'items' => [
- 'description' => '',
- 'example' => '1376,153,1640,181',
- 'format' => 'float',
- 'type' => 'number',
- ],
'type' => 'array',
+ 'items' => ['description' => 'The bounding box of the verification code.', 'type' => 'number', 'format' => 'float', 'example' => '1376,153,1640,181', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'PayerNames' => [
'description' => '1',
- 'items' => [
- 'description' => '',
- 'example' => '354,222,700,255',
- 'format' => 'float',
- 'type' => 'number',
- ],
'type' => 'array',
+ 'items' => ['description' => 'The bounding box of the buyer\'s name.', 'type' => 'number', 'format' => 'float', 'example' => '354,222,700,255', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'PayerBankNames' => [
'description' => '1',
- 'items' => [
- 'description' => '',
- 'example' => '0,0,0,0',
- 'format' => 'float',
- 'type' => 'number',
- ],
'type' => 'array',
+ 'items' => ['description' => 'The bounding box of the seller\'s bank name and account number.', 'type' => 'number', 'format' => 'float', 'example' => '0,0,0,0', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'Payees' => [
'description' => '1',
- 'items' => [
- 'description' => '',
- 'example' => '189,1003,264,1033',
- 'format' => 'float',
- 'type' => 'number',
- ],
'type' => 'array',
+ 'items' => ['description' => 'The bounding box of the payee.', 'type' => 'number', 'format' => 'float', 'example' => '189,1003,264,1033', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'PayeeNames' => [
'description' => '1',
- 'items' => [
- 'description' => '',
- 'example' => '356,833,633,865',
- 'format' => 'float',
- 'type' => 'number',
- ],
'type' => 'array',
+ 'items' => ['description' => 'The bounding box of the buyer\'s name.', 'type' => 'number', 'format' => 'float', 'example' => '356,833,633,865', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'InvoiceAmounts' => [
'description' => '1',
- 'items' => [
- 'description' => '',
- 'example' => '1364, 776,1438,804',
- 'format' => 'float',
- 'type' => 'number',
- ],
'type' => 'array',
+ 'items' => ['description' => 'The bounding box of the total amount (tax inclusive).', 'type' => 'number', 'format' => 'float', 'example' => '1364, 776,1438,804', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'WithoutTaxAmounts' => [
'description' => '1',
- 'items' => [
- 'description' => '',
- 'example' => '1265,721,1339,749',
- 'format' => 'float',
- 'type' => 'number',
- ],
'type' => 'array',
+ 'items' => ['description' => 'The bounding box of the total amount (tax exclusive).', 'type' => 'number', 'format' => 'float', 'example' => '1265,721,1339,749', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'PayerAddresses' => [
'description' => '1',
- 'items' => [
- 'description' => '',
- 'example' => '0,0,0,0',
- 'format' => 'float',
- 'type' => 'number',
- ],
'type' => 'array',
+ 'items' => ['description' => 'The bounding box of the seller\'s address and phone number.', 'type' => 'number', 'format' => 'float', 'example' => '0,0,0,0', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'PayeeRegisterNoes' => [
'description' => '1',
- 'items' => [
- 'description' => '',
- 'example' => '356,873,571,902',
- 'format' => 'float',
- 'type' => 'number',
- ],
'type' => 'array',
+ 'items' => ['description' => 'The bounding box of the seller\'s taxpayer identification number.', 'type' => 'number', 'format' => 'float', 'example' => '356,873,571,902', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'ItemNames' => [
'description' => '1',
- 'items' => [
- 'description' => '',
- 'example' => '0,0,0,0',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
'type' => 'array',
+ 'items' => ['description' => 'The bounding box of the goods or taxable services/service names.', 'type' => 'integer', 'format' => 'int32', 'example' => '0,0,0,0', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
'Content' => [
- 'description' => '',
+ 'description' => 'The recognition results of each field on the invoice.',
+ 'type' => 'object',
'properties' => [
- 'PayerAddress' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'PayeeRegisterNo' => [
- 'description' => '',
- 'example' => '91420200000123403',
- 'type' => 'string',
- ],
- 'PayeeBankName' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'InvoiceNo' => [
- 'description' => '',
- 'example' => '03753869',
- 'type' => 'string',
- ],
- 'PayerRegisterNo' => [
- 'description' => '',
- 'example' => '91420200000123403',
- 'type' => 'string',
- ],
- 'Checker' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'TaxAmount' => [
- 'description' => '',
- 'example' => '9.52',
- 'type' => 'string',
- ],
- 'InvoiceDate' => [
- 'description' => '',
- 'example' => '20190415',
- 'type' => 'string',
- ],
- 'WithoutTaxAmount' => [
- 'description' => '',
- 'example' => '190.48',
- 'type' => 'string',
- ],
- 'InvoiceAmount' => [
- 'description' => '',
- 'example' => '200.00',
- 'type' => 'string',
- ],
- 'AntiFakeCode' => [
- 'description' => '',
- 'example' => '02702870934284730434',
- 'type' => 'string',
- ],
- 'PayerName' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'Payee' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'SumAmount' => [
- 'description' => '',
- 'example' => '87',
- 'type' => 'string',
- ],
- 'PayerBankName' => [
- 'description' => '',
- 'example' => '6221************1234',
- 'type' => 'string',
- ],
- 'Clerk' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'PayeeName' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'PayeeAddress' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'InvoiceCode' => [
- 'description' => '',
- 'example' => '031001600311',
- 'type' => 'string',
- ],
+ 'PayerAddress' => ['description' => 'The buyer\'s address and phone number.', 'type' => 'string', 'example' => '浙江省杭州市西湖区杭大路9号聚龙大厦西区15-18楼0571-87901580', 'title' => ''],
+ 'PayeeRegisterNo' => ['description' => 'The seller\'s taxpayer identification number.', 'type' => 'string', 'example' => '91420200000123403', 'title' => ''],
+ 'PayeeBankName' => ['description' => 'The seller\'s bank name and account number.', 'type' => 'string', 'example' => '中国银行浙江省分行35845832****', 'title' => ''],
+ 'InvoiceNo' => ['description' => 'The invoice number.', 'type' => 'string', 'example' => '03753869', 'title' => ''],
+ 'PayerRegisterNo' => ['description' => 'The buyer\'s taxpayer identification number.', 'type' => 'string', 'example' => '91420200000123403', 'title' => ''],
+ 'Checker' => ['description' => 'The reviewer.', 'type' => 'string', 'example' => '张三', 'title' => ''],
+ 'TaxAmount' => ['description' => 'The total tax amount.', 'type' => 'string', 'example' => '9.52', 'title' => ''],
+ 'InvoiceDate' => ['description' => 'The invoice date.', 'type' => 'string', 'example' => '20190415', 'title' => ''],
+ 'WithoutTaxAmount' => ['description' => 'The total amount (tax exclusive).', 'type' => 'string', 'example' => '190.48', 'title' => ''],
+ 'InvoiceAmount' => ['description' => 'The total amount including tax (in lowercase).', 'type' => 'string', 'example' => '200.00', 'title' => ''],
+ 'AntiFakeCode' => ['description' => 'The verification code.', 'type' => 'string', 'example' => '02702870934284730434', 'title' => ''],
+ 'PayerName' => ['description' => 'The buyer\'s name.', 'type' => 'string', 'example' => '三号技术有限责任公司', 'title' => ''],
+ 'Payee' => ['description' => 'The payee.', 'type' => 'string', 'example' => '张三', 'title' => ''],
+ 'SumAmount' => ['description' => 'The total amount including tax (in uppercase).', 'type' => 'string', 'example' => '87', 'title' => ''],
+ 'PayerBankName' => ['description' => 'The buyer\'s bank name and account number.', 'type' => 'string', 'example' => '6221************1234', 'title' => ''],
+ 'Clerk' => ['description' => 'The invoice issuer.', 'type' => 'string', 'example' => '张三', 'title' => ''],
+ 'PayeeName' => ['description' => 'The seller\'s name.', 'type' => 'string', 'example' => '上海机场(集团)有限公司', 'title' => ''],
+ 'PayeeAddress' => ['description' => 'The seller\'s address and phone number.', 'type' => 'string', 'example' => '上海虹桥机场迎宾二路161号22342185', 'title' => ''],
+ 'InvoiceCode' => ['description' => 'The invoice code.', 'type' => 'string', 'example' => '031001600311', 'title' => ''],
'ItemName' => [
'description' => '1',
- 'items' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
'type' => 'array',
+ 'items' => ['description' => 'The goods or taxable services/service names.', 'type' => 'string', 'example' => '餐饮服务', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"56A10D65-ECE0-59DE-9775-F6494D2AF13B\\",\\n \\"Data\\": {\\n \\"Box\\": {\\n \\"PayerRegisterNoes\\": [\\n 0\\n ],\\n \\"PayeeAddresses\\": [\\n 0\\n ],\\n \\"PayeeBankNames\\": [\\n 0\\n ],\\n \\"Checkers\\": [\\n 0\\n ],\\n \\"TaxAmounts\\": [\\n 0\\n ],\\n \\"SumAmounts\\": [\\n 0\\n ],\\n \\"Clerks\\": [\\n 0\\n ],\\n \\"InvoiceNoes\\": [\\n 0\\n ],\\n \\"InvoiceDates\\": [\\n 0\\n ],\\n \\"InvoiceCodes\\": [\\n 0\\n ],\\n \\"InvoiceFakeCodes\\": [\\n 0\\n ],\\n \\"PayerNames\\": [\\n 0\\n ],\\n \\"PayerBankNames\\": [\\n 0\\n ],\\n \\"Payees\\": [\\n 0\\n ],\\n \\"PayeeNames\\": [\\n 0\\n ],\\n \\"InvoiceAmounts\\": [\\n 0\\n ],\\n \\"WithoutTaxAmounts\\": [\\n 0\\n ],\\n \\"PayerAddresses\\": [\\n 0\\n ],\\n \\"PayeeRegisterNoes\\": [\\n 0\\n ],\\n \\"ItemNames\\": [\\n 0\\n ]\\n },\\n \\"Content\\": {\\n \\"PayerAddress\\": \\"浙江省杭州市西湖区杭大路9号聚龙大厦西区15-18楼0571-87901580\\",\\n \\"PayeeRegisterNo\\": \\"91420200000123403\\",\\n \\"PayeeBankName\\": \\"中国银行浙江省分行35845832****\\",\\n \\"InvoiceNo\\": \\"03753869\\",\\n \\"PayerRegisterNo\\": \\"91420200000123403\\",\\n \\"Checker\\": \\"张三\\",\\n \\"TaxAmount\\": \\"9.52\\",\\n \\"InvoiceDate\\": \\"20190415\\",\\n \\"WithoutTaxAmount\\": \\"190.48\\",\\n \\"InvoiceAmount\\": \\"200.00\\",\\n \\"AntiFakeCode\\": \\"02702870934284730434\\",\\n \\"PayerName\\": \\"三号技术有限责任公司\\",\\n \\"Payee\\": \\"张三\\",\\n \\"SumAmount\\": \\"87\\",\\n \\"PayerBankName\\": \\"6221************1234\\",\\n \\"Clerk\\": \\"张三\\",\\n \\"PayeeName\\": \\"上海机场(集团)有限公司\\",\\n \\"PayeeAddress\\": \\"上海虹桥机场迎宾二路161号22342185\\",\\n \\"InvoiceCode\\": \\"031001600311\\",\\n \\"ItemName\\": [\\n \\"餐饮服务\\"\\n ]\\n }\\n }\\n}","type":"json"}]',
+ 'title' => 'VAT invoice recognition',
+ 'summary' => 'This topic describes the syntax and examples of the VAT invoice recognition operation RecognizeVATInvoice.',
+ 'description' => '## Feature description'."\n"
+ .'The VAT invoice recognition feature recognizes keyword fields on VAT invoices (electronic invoicing and paper invoices), including the verification code, reviewer, invoice issuer, invoice code, and payee.'."\n"
+ ."\n"
+ .'> - The VAT invoice recognition operation only recognizes text content on invoices. It does not verify invoice authenticity.'."\n"
+ .'- You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeVATInvoice) to experience this feature or purchase it online.'."\n"
+ .'- For questions about Alibaba Cloud Vision Intelligence Open Platform visual AI API integration or usage, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Integration guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete registration.'."\n"
+ .'2. Activate the service: Make sure you have activated the [OCR service](https://vision.aliyun.com/ocr). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_ocr_public_cn#/open).'."\n"
+ .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/ocr/2019-12-30/RecognizeVATInvoice?lang=JAVA&sdkStyle=dara&params=%7B%22FileURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Focr%2FRecognizeVATInvoice%2FRecognizeVATInvoice1.jpg%22%2C%22FileType%22%3A%22jpg%22%7D&tab=DEMO) to debug this operation online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the OCR (ocr) category in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in commonly used languages, see [VAT invoice recognition sample code](~~600152~~).'."\n"
+ ."\n"
+ .'7. Direct client calls: Common client call methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Image format: PNG, JPG, JPEG, BMP, WebP, or PDF.'."\n"
+ .'- Image size: up to 3 MB.'."\n"
+ .'- Image resolution: greater than 15 × 15 pixels and less than 4096 × 4096 pixels.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of VAT invoice recognition, see [Billing overview](~~202631~~).'."\n"
+ ."\n"
+ .'> The debugging operation below is a paid operation. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeVATInvoice).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'We recommend that you use an SDK to call the VAT invoice recognition operation under the OCR category of Alibaba Cloud Vision AI. The SDK supports multiple programming languages. When calling the operation, select the SDK package for the OCR (ocr) category. File parameters support local files and arbitrary URLs through SDK calls. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in commonly used languages, see [VAT invoice recognition sample code](~~600152~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of VAT invoice recognition, see [Common error codes](~~146772~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [
+ ['createdAt' => '2023-09-14T08:05:59.000Z', 'description' => 'Request parameters changed'],
+ ['createdAt' => '2022-09-30T07:16:55.000Z', 'description' => 'Response parameters changed'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeVATInvoice'],
+ ],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeVATInvoice',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"56A10D65-ECE0-59DE-9775-F6494D2AF13B\\",\\n \\"Data\\": {\\n \\"Box\\": {\\n \\"PayerRegisterNoes\\": [\\n 0\\n ],\\n \\"PayeeAddresses\\": [\\n 0\\n ],\\n \\"PayeeBankNames\\": [\\n 0\\n ],\\n \\"Checkers\\": [\\n 0\\n ],\\n \\"TaxAmounts\\": [\\n 0\\n ],\\n \\"SumAmounts\\": [\\n 0\\n ],\\n \\"Clerks\\": [\\n 0\\n ],\\n \\"InvoiceNoes\\": [\\n 0\\n ],\\n \\"InvoiceDates\\": [\\n 0\\n ],\\n \\"InvoiceCodes\\": [\\n 0\\n ],\\n \\"InvoiceFakeCodes\\": [\\n 0\\n ],\\n \\"PayerNames\\": [\\n 0\\n ],\\n \\"PayerBankNames\\": [\\n 0\\n ],\\n \\"Payees\\": [\\n 0\\n ],\\n \\"PayeeNames\\": [\\n 0\\n ],\\n \\"InvoiceAmounts\\": [\\n 0\\n ],\\n \\"WithoutTaxAmounts\\": [\\n 0\\n ],\\n \\"PayerAddresses\\": [\\n 0\\n ],\\n \\"PayeeRegisterNoes\\": [\\n 0\\n ],\\n \\"ItemNames\\": [\\n 0\\n ]\\n },\\n \\"Content\\": {\\n \\"PayerAddress\\": \\"浙江省杭州市西湖区杭大路9号聚龙大厦西区15-18楼0571-87901580\\",\\n \\"PayeeRegisterNo\\": \\"91420200000123403\\",\\n \\"PayeeBankName\\": \\"中国银行浙江省分行35845832****\\",\\n \\"InvoiceNo\\": \\"03753869\\",\\n \\"PayerRegisterNo\\": \\"91420200000123403\\",\\n \\"Checker\\": \\"张三\\",\\n \\"TaxAmount\\": \\"9.52\\",\\n \\"InvoiceDate\\": \\"20190415\\",\\n \\"WithoutTaxAmount\\": \\"190.48\\",\\n \\"InvoiceAmount\\": \\"200.00\\",\\n \\"AntiFakeCode\\": \\"02702870934284730434\\",\\n \\"PayerName\\": \\"三号技术有限责任公司\\",\\n \\"Payee\\": \\"张三\\",\\n \\"SumAmount\\": \\"87\\",\\n \\"PayerBankName\\": \\"6221************1234\\",\\n \\"Clerk\\": \\"张三\\",\\n \\"PayeeName\\": \\"上海机场(集团)有限公司\\",\\n \\"PayeeAddress\\": \\"上海虹桥机场迎宾二路161号22342185\\",\\n \\"InvoiceCode\\": \\"031001600311\\",\\n \\"ItemName\\": [\\n \\"餐饮服务\\"\\n ]\\n }\\n }\\n}","errorExample":""},{"type":"xml","example":"<RecognizeVATInvoiceResponse>\\n <RequestId>56A10D65-ECE0-59DE-9775-F6494D2AF13B</RequestId>\\n <Data>\\n <Content>\\n <Checker/>\\n <PayeeAddress>浙江省杭州市西湖区杭大路9号聚龙大厦西区15-18楼0571-87901580</PayeeAddress>\\n <PayeeName>三号技术有限责任公司</PayeeName>\\n <PayerAddress/>\\n <AntiFakeCode>60966753003521159330</AntiFakeCode>\\n <PayerBankName/>\\n <InvoiceNo>3753869</InvoiceNo>\\n <PayerRegisterNo>91420200000123403</PayerRegisterNo>\\n <WithoutTaxAmount>82.08</WithoutTaxAmount>\\n <InvoiceAmount>87</InvoiceAmount>\\n <PayerName>三号技术有限责任公司</PayerName>\\n <TaxAmount>4.92</TaxAmount>\\n <PayeeBankName>中国银行浙江省分行35845832****</PayeeBankName>\\n <Clerk/>\\n <ItemName>餐饮服务</ItemName>\\n <PayeeRegisterNo>91420200000123403</PayeeRegisterNo>\\n <InvoiceCode>33002000411</InvoiceCode>\\n <InvoiceDate>2020年12月15日</InvoiceDate>\\n <SumAmount>87</SumAmount>\\n <Payee/>\\n </Content>\\n <Box>\\n <PayerRegisterNoes>118</PayerRegisterNoes>\\n <PayerRegisterNoes>128</PayerRegisterNoes>\\n <PayerRegisterNoes>278</PayerRegisterNoes>\\n <PayerRegisterNoes>138</PayerRegisterNoes>\\n <PayerAddresses>0</PayerAddresses>\\n <PayerAddresses>0</PayerAddresses>\\n <PayerAddresses>0</PayerAddresses>\\n <PayerAddresses>0</PayerAddresses>\\n <InvoiceAmounts>207</InvoiceAmounts>\\n <InvoiceAmounts>347</InvoiceAmounts>\\n <InvoiceAmounts>278</InvoiceAmounts>\\n <InvoiceAmounts>355</InvoiceAmounts>\\n <InvoiceDates>585</InvoiceDates>\\n <InvoiceDates>60</InvoiceDates>\\n <InvoiceDates>675</InvoiceDates>\\n <InvoiceDates>69</InvoiceDates>\\n <PayeeAddresses>118</PayeeAddresses>\\n <PayeeAddresses>407</PayeeAddresses>\\n <PayeeAddresses>407</PayeeAddresses>\\n <PayeeAddresses>415</PayeeAddresses>\\n <Clerks>0</Clerks>\\n <Clerks>0</Clerks>\\n <Clerks>0</Clerks>\\n <Clerks>0</Clerks>\\n <WithoutTaxAmounts>546</WithoutTaxAmounts>\\n <WithoutTaxAmounts>327</WithoutTaxAmounts>\\n <WithoutTaxAmounts>584</WithoutTaxAmounts>\\n <WithoutTaxAmounts>337</WithoutTaxAmounts>\\n <Checkers>0</Checkers>\\n <Checkers>0</Checkers>\\n <Checkers>0</Checkers>\\n <Checkers>0</Checkers>\\n <TaxAmounts>696</TaxAmounts>\\n <TaxAmounts>328</TaxAmounts>\\n <TaxAmounts>724</TaxAmounts>\\n <TaxAmounts>335</TaxAmounts>\\n <InvoiceCodes>583</InvoiceCodes>\\n <InvoiceCodes>16</InvoiceCodes>\\n <InvoiceCodes>643</InvoiceCodes>\\n <InvoiceCodes>25</InvoiceCodes>\\n <SumAmounts>207</SumAmounts>\\n <SumAmounts>347</SumAmounts>\\n <SumAmounts>278</SumAmounts>\\n <SumAmounts>355</SumAmounts>\\n <ItemNames>0</ItemNames>\\n <ItemNames>0</ItemNames>\\n <ItemNames>0</ItemNames>\\n <ItemNames>0</ItemNames>\\n <PayerNames>119</PayerNames>\\n <PayerNames>109</PayerNames>\\n <PayerNames>237</PayerNames>\\n <PayerNames>118</PayerNames>\\n <InvoiceFakeCodes>583</InvoiceFakeCodes>\\n <InvoiceFakeCodes>82</InvoiceFakeCodes>\\n <InvoiceFakeCodes>700</InvoiceFakeCodes>\\n <InvoiceFakeCodes>90</InvoiceFakeCodes>\\n <PayeeBankNames>119</PayeeBankNames>\\n <PayeeBankNames>423</PayeeBankNames>\\n <PayeeBankNames>282</PayeeBankNames>\\n <PayeeBankNames>431</PayeeBankNames>\\n <PayeeNames>117</PayeeNames>\\n <PayeeNames>371</PayeeNames>\\n <PayeeNames>226</PayeeNames>\\n <PayeeNames>381</PayeeNames>\\n <Payees>0</Payees>\\n <Payees>0</Payees>\\n <Payees>0</Payees>\\n <Payees>0</Payees>\\n <InvoiceNoes>582</InvoiceNoes>\\n <InvoiceNoes>38</InvoiceNoes>\\n <InvoiceNoes>623</InvoiceNoes>\\n <InvoiceNoes>46</InvoiceNoes>\\n <PayerBankNames>0</PayerBankNames>\\n <PayerBankNames>0</PayerBankNames>\\n <PayerBankNames>0</PayerBankNames>\\n <PayerBankNames>0</PayerBankNames>\\n <PayeeRegisterNoes>119</PayeeRegisterNoes>\\n <PayeeRegisterNoes>389</PayeeRegisterNoes>\\n <PayeeRegisterNoes>247</PayeeRegisterNoes>\\n <PayeeRegisterNoes>400</PayeeRegisterNoes>\\n </Box>\\n </Data>\\n</RecognizeVATInvoiceResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
'RecognizeVINCode' => [
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -2571,887 +3091,645 @@
[
'name' => 'ImageURL',
'in' => 'query',
- 'schema' => [
- 'description' => '',
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeVINCode/vin1.jpg',
- 'isFileTransferUrl' => true,
- 'required' => true,
- 'type' => 'string',
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) link in the Shanghai region. If the file is stored locally or the OSS link is not in the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeVINCode/vin1.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
+ 'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'example' => '911FC8CF-CC27-477E-BE3B-7ED77DF4DFE0',
- 'type' => 'string',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '911FC8CF-CC27-477E-BE3B-7ED77DF4DFE0', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
+ 'type' => 'object',
'properties' => [
- 'VinCode' => [
- 'description' => '',
- 'example' => 'LVBB2FAF777999888',
- 'type' => 'string',
- ],
+ 'VinCode' => ['description' => 'The recognized VIN code of the vehicle.', 'type' => 'string', 'example' => 'LVBB2FAF777999888', 'title' => ''],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"911FC8CF-CC27-477E-BE3B-7ED77DF4DFE0\\",\\n \\"Data\\": {\\n \\"VinCode\\": \\"LVBB2FAF777999888\\"\\n }\\n}","type":"json"}]',
+ 'title' => 'VIN code recognition',
+ 'summary' => 'Describes the syntax and provides examples for the RecognizeVINCode operation.',
+ 'description' => '## Description'."\n"
+ .'The VIN code recognition feature identifies vehicle identification number (VIN) codes and returns the VIN code values.'."\n"
+ ."\n"
+ .'> - You can join [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for human assistance.'."\n"
+ .'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeVINCode) to experience this feature or purchase it online.'."\n"
+ .'- To get help with API integration, usage, or other questions about the Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Getting started'."\n"
+ .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to create an account.'."\n"
+ .'2. Activate the service: Make sure you have activated the [OCR service](https://vision.aliyun.com/ocr). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_ocr_public_cn#/open).'."\n"
+ .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using an AccessKey pair of a RAM user, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/ocr/2019-12-30/RecognizeVINCode?lang=JAVA&sdkStyle=dara&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Focr%2FRecognizeVINCode%2Fvin1.jpg%22%7D&tab=DEMO) to debug this operation online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the OCR (ocr) category in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in commonly used languages, see [VIN code recognition sample code](~~605238~~).'."\n"
+ ."\n"
+ .'7. Direct client calls: Common client call methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Image format: JPEG, JPG, PNG, BMP, or GIF.'."\n"
+ .'- Image size: up to 3 MB.'."\n"
+ .'- Image resolution: No limit on image resolution. However, excessively high resolution may cause the API to time out. The timeout period is 5 seconds.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of VIN code recognition, see [Billing overview](~~202631~~).'."\n"
+ ."\n"
+ .'> The debugging operation below is a paid operation. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=ocr&children=RecognizeVINCode).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'To call the VIN code recognition feature under the Alibaba Cloud Vision AI OCR category, use the SDK. Multiple programming languages are supported. Select the SDK package for the OCR (ocr) category. The SDK supports local files and arbitrary URLs for file parameters. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in commonly used languages, see [VIN code recognition sample code](~~605238~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of VIN code recognition, see [Common error codes](~~146772~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeVINCode'],
+ ],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeVINCode',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"911FC8CF-CC27-477E-BE3B-7ED77DF4DFE0\\",\\n \\"Data\\": {\\n \\"VinCode\\": \\"LVBB2FAF777999888\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<RecognizeVINCodeResponse>\\n <RequestId>911FC8CF-CC27-477E-BE3B-7ED77DF4DFE0</RequestId>\\n <Data>\\n <VinCode>LVBB2FAF777999888</VinCode>\\n </Data>\\n</RecognizeVINCodeResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
- 'responseParamsDescription' => ' ',
],
- 'RecognizePdf' => [
- 'summary' => 'PDF识别',
- 'methods' => [
- 'post',
+ ],
+ 'endpoints' => [
+ ['regionId' => 'cn-shanghai', 'regionName' => 'China (Shanghai)', 'areaId' => 'asiaPacific', 'areaName' => 'Asia Pacific', 'public' => 'ocr.cn-shanghai.aliyuncs.com', 'endpoint' => 'ocr.cn-shanghai.aliyuncs.com', 'vpc' => 'ocr-vpc.cn-shanghai.aliyuncs.com'],
+ ],
+ 'errorCodes' => [
+ ['code' => 'AuthFailed', 'message' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'http_code' => 403, 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
+ ['code' => 'ClientError.IllegalArgument', 'message' => '请检查参数,如参数值所代表的数据库是否存在', 'http_code' => 400, 'description' => ''],
+ ['code' => 'EntityNotExist.Role', 'message' => '没有Ram权限,请联系主账号给你添加AliyunVIAPIFullAccess权限,操作流程可参考https://help.aliyun.com/document_detail/145025.htm', 'http_code' => 400, 'description' => ''],
+ ['code' => 'IllegalUrlParameter', 'message' => 'parameter url is illegal', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InternalError', 'message' => 'An error occurred to the algorithm service.', 'http_code' => 500, 'description' => ''],
+ ['code' => 'InternalError.Algo', 'message' => '算法服务报错,请稍后重试', 'http_code' => 500, 'description' => ''],
+ ['code' => 'InternalError.Busy', 'message' => 'Server busy.', 'http_code' => 500, 'description' => ''],
+ ['code' => 'InternalError.Decode', 'message' => 'Failed to decode the image.', 'http_code' => 500, 'description' => ''],
+ ['code' => 'InternalError.Env', 'message' => 'Failed to initilize the environment.', 'http_code' => 500, 'description' => ''],
+ ['code' => 'InternalError.Model', 'message' => 'Failed to load the model.', 'http_code' => 500, 'description' => ''],
+ ['code' => 'InternalError.Process', 'message' => 'An error occurred during inference.', 'http_code' => 500, 'description' => ''],
+ ['code' => 'InternalError.Remote', 'message' => 'The request processing has failed due to some unknown error.', 'http_code' => 500, 'description' => ''],
+ ['code' => 'InternalError.Server', 'message' => 'The request processing has failed due to some unknown error.', 'http_code' => 500, 'description' => ''],
+ ['code' => 'InternalError.Timeout', 'message' => '算法服务报错,请稍后重试', 'http_code' => 500, 'description' => ''],
+ ['code' => 'InternalServerError', 'message' => 'A server error occurred while processing your request.', 'http_code' => 500, 'description' => ''],
+ ['code' => 'InvalidAccessKeyId.Inactive', 'message' => 'AccessKeyId非法,请检查AccessKeyId是否被禁用,或者AccessKeyId和AccessKeySecret是否填写正确。', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidAccessKeyId.NotFound', 'message' => 'access key not found', 'http_code' => 404, 'description' => ''],
+ ['code' => 'InvalidAccessKeySecret', 'message' => 'AccessKeyId或AccessKeySecret填写错误,请检查AccessKeyId和AccessKeySecret是否填写正确。', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidAction.NotFound', 'message' => '能力未找到,请检查类目与能力是否匹配,检查访问域名与能力是否匹配,关于访问域名可参考:https://help.aliyun.com/document_detail/143103.htm。SDK接入请参考:https://help.aliyun.com/document_detail/145033.html,选择合适编程语言根据实例代码作相关修改进行接入。', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidApi.ForbiddenInvoke', 'message' => '调用受限,请检查您调用的能力是否为受限能力,受限能力需要在控制台https://vision.console.aliyun.com/找到相应能力申请经过审批之后才能调用。如非上述情况,请检查账号是否欠费', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidApi.NotPurchase', 'message' => 'specified api is not purchase', 'http_code' => 403, 'description' => ''],
+ ['code' => 'InvalidApi.OutOfService', 'message' => '产品未开通,请开通产品:https://common-buy.aliyun.com/?commodityCode=viapi_ocr_public_cn#/open', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidFile.Content', 'message' => '请参考算法文档检查文件内容,更换包含符合算法要求的', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidFile.Decode', 'message' => '请检查文件是否能够正常打开', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidFile.Download', 'message' => '文件无法下载,请检查链接是否可访问和本地网络情况 - 非上海OSS文件链接请参考:https://help.aliyun.com/document_detail/155645.html', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidFile.REGION', 'message' => '文件链接地域不对,非上海OSS文件链接请参考:https://help.aliyun.com/document_detail/155645.html', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidFile.Resolution', 'message' => '文件分辨率超出限制,请检查文件分辨率和内容,修改文件分辨率后重试', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidFile.Type', 'message' => '文件类型错误,请检查文件类型 - 请参考算法API文档,使用算法支持的文件类型', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidFile.Unsafe', 'message' => 'Risky file URL.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidFile.URL', 'message' => '文件无法下载,请检查链接是否可访问和本地网络情况 - 非上海OSS文件链接请参考:https://help.aliyun.com/document_detail/155645.html', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidImage.Category', 'message' => 'The input image does not match the current service.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidImage.Content', 'message' => 'image content is invalid', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidImage.Decode', 'message' => '请检查图片是否能够正常打开', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidImage.Download', 'message' => 'Failed to download the file.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidImage.Gif', 'message' => 'Failed to open the GIF image.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidImage.NotFoundFace', 'message' => '图像中没找到人脸,请检查您的图像中是否包含人脸或人脸太小', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidImage.Region', 'message' => 'The URL format of the file is invalid.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidImage.Resolution', 'message' => '文件分辨率超出限制,请检查文件分辨率和内容,修改文件分辨率后重试', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidImage.Timeout', 'message' => '图片下载超时,请检查链接是否可访问和本地网络情况 - 非上海OSS图片链接请参考:https://help.aliyun.com/document_detail/155645.html。请检查OSS链接是否过期等。', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidImage.Type', 'message' => '图片类型错误,请检查图片类型 - 请参考算法API文档,使用算法支持的图片类型', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidImage.Unsafe', 'message' => 'Risky file URL.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidImage.UnsupportedMediaType', 'message' => 'Failed to decode the image.', 'http_code' => 415, 'description' => ''],
+ ['code' => 'InvalidImage.URL', 'message' => 'The URL format of the file is invalid or URL access has failed.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidImageType', 'message' => 'Invalid image type.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidOutputFormat', 'message' => 'Invalid output format.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidParameter', 'message' => 'The request parameter is invalid.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidParameter', 'message' => 'The image type does not match the API operation.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidParameter', 'message' => 'The image content does not meet the table specifications.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidParameter.BadRequest', 'message' => '参数错误,请根据算法API文档和报错Message检查参数值。是否参数值前后多了空格或者其他特殊字符等。', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidParameter.NotFound', 'message' => '参数错误,请根据算法API文档和报错Message检查参数值。是否参数值前后多了空格或者其他特殊字符等。', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidParameter.TooLarge', 'message' => 'The file size exceeds the limit.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidRamRole', 'message' => '没有Ram权限,请联系主账号给你添加AliyunVIAPIFullAccess权限,操作流程可参考https://help.aliyun.com/document_detail/145025.htm', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidResult', 'message' => 'result is invalid', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidSide', 'message' => 'param side is invalid', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidTimeStamp.Expired', 'message' => 'timestamp expired', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidVersion', 'message' => 'Specified parameter Version is not valid', 'http_code' => 400, 'description' => ''],
+ ['code' => 'MissingAccessKeyId', 'message' => 'access key is missing', 'http_code' => 400, 'description' => ''],
+ ['code' => 'MissingAssureDirection', 'message' => 'AssureDirection is required for this operation.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'MissingFileURL', 'message' => 'FileURL is required for this operation.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'MissingImageURL', 'message' => 'ImageURL is required for this operation.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'MissingLimit', 'message' => 'Limit is required for this operation', 'http_code' => 400, 'description' => ''],
+ ['code' => 'MissingMinHeight', 'message' => 'MinHeight is required for this operation.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'MissingOutputFormat', 'message' => 'OutputFormat is required for this operation.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'MissingParameter', 'message' => 'A required parameter is not specified.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'MissingSide', 'message' => 'Side is required for this operation.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'MissingSkipDetection', 'message' => 'SkipDetection is required for this operation.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'MissingTasks', 'message' => 'Tasks is required for this operation.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'MissingUseFinanceModel', 'message' => 'UseFinanceModel is required for this operation.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'ParameterError', 'message' => 'The parameter is invalid. Please check again.', 'http_code' => 400, 'description' => 'The parameter is invalid. Please check again.'],
+ ['code' => 'ServiceUnavailable', 'message' => 'The service is unavailable.', 'http_code' => 503, 'description' => ''],
+ ['code' => 'SignatureDoesNotMatch', 'message' => 'signature not match', 'http_code' => 400, 'description' => ''],
+ ['code' => 'SignatureNonceUsed', 'message' => 'signature nonce error', 'http_code' => 400, 'description' => ''],
+ ['code' => 'Throttling', 'message' => 'The request was denied due to QPS limits.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'Throttling.User', 'message' => 'The request was denied due to QPS limits.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'Timeout', 'message' => 'The request has timed out.', 'http_code' => 408, 'description' => ''],
+ ['code' => 'Unauthorized', 'message' => 'RAM authentication failed.', 'http_code' => 403, 'description' => ''],
+ ['code' => 'UnsupportedHTTPMethod', 'message' => 'The HTTP request method is not supported.', 'http_code' => 403, 'description' => ''],
+ ],
+ 'changeSet' => [
+ [
+ 'apis' => [
+ ['description' => 'Response parameters changed', 'api' => 'RecognizeCharacter'],
],
- 'schemes' => [
- 'http',
- 'https',
+ 'createdAt' => '2025-12-22T05:58:56.000Z',
+ 'description' => '',
+ ],
+ [
+ 'apis' => [
+ ['description' => 'Error codes changed', 'api' => 'RecognizeTrainTicket'],
],
- 'security' => [
- [
- 'AK' => [],
- ],
+ 'createdAt' => '2024-02-23T08:01:33.000Z',
+ 'description' => '',
+ ],
+ [
+ 'apis' => [
+ ['description' => 'Response parameters changed', 'api' => 'RecognizeVideoCharacter'],
],
- 'deprecated' => false,
- 'systemTags' => [],
- 'parameters' => [
- [
- 'name' => 'FileURL',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/ocr/xxxx.pdf',
- 'isFileTransferUrl' => true,
- 'required' => true,
- 'title' => 'A short description of struct',
- 'type' => 'string',
- ],
- ],
+ 'createdAt' => '2024-02-21T06:00:39.000Z',
+ 'description' => '',
+ ],
+ [
+ 'apis' => [
+ ['description' => 'Response parameters changed', 'api' => 'RecognizeBankCard'],
],
- 'responses' => [
- 200 => [
- 'schema' => [
- 'description' => 'Schema of Response',
- 'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'example' => 'CD9A9659-ABEE-4A7D-837F-9FDF40879A97',
- 'title' => 'Id of the request',
- 'type' => 'string',
- ],
- 'Data' => [
- 'description' => '',
- 'properties' => [
- 'Height' => [
- 'description' => '',
- 'example' => '788',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'Width' => [
- 'description' => '',
- 'example' => '1220',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'OrgHeight' => [
- 'description' => '',
- 'example' => '610',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'OrgWidth' => [
- 'description' => '',
- 'example' => '394',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'PageIndex' => [
- 'description' => '',
- 'example' => '1',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'Angle' => [
- 'description' => '',
- 'example' => '0',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'WordsInfo' => [
- 'description' => '',
- 'items' => [
- 'description' => '1',
- 'properties' => [
- 'Angle' => [
- 'description' => '',
- 'example' => '0',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'Word' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'Height' => [
- 'description' => '',
- 'example' => '16',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'Width' => [
- 'description' => '',
- 'example' => '205',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'X' => [
- 'description' => '',
- 'example' => '863',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'Y' => [
- 'description' => '',
- 'example' => '46',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'Positions' => [
- 'description' => '',
- 'items' => [
- 'description' => '1',
- 'properties' => [
- 'X' => [
- 'description' => '',
- 'example' => '863',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'Y' => [
- 'description' => '',
- 'example' => '43',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- ],
- 'type' => 'object',
- ],
- 'type' => 'array',
- ],
- ],
- 'type' => 'object',
- ],
- 'type' => 'array',
- ],
- ],
- 'type' => 'object',
- ],
- ],
- 'title' => 'Schema of Response',
- 'type' => 'object',
- ],
- ],
+ 'createdAt' => '2023-12-19T09:06:40.000Z',
+ 'description' => '',
+ ],
+ [
+ 'apis' => [
+ ['description' => 'Response parameters changed', 'api' => 'RecognizeDriverLicense'],
],
- 'errorCodes' => [
- 400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
- ],
- 403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
- ],
- 408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
- ],
- 503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
- ],
- ],
+ 'createdAt' => '2023-12-19T06:02:32.000Z',
+ 'description' => '',
+ ],
+ [
+ 'apis' => [
+ ['description' => 'Request parameters changed', 'api' => 'RecognizeDriverLicense'],
+ ['description' => 'Request parameters changed', 'api' => 'RecognizeDrivingLicense'],
+ ['description' => 'Request parameters changed', 'api' => 'RecognizeIdentityCard'],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"CD9A9659-ABEE-4A7D-837F-9FDF40879A97\\",\\n \\"Data\\": {\\n \\"Height\\": 788,\\n \\"Width\\": 1220,\\n \\"OrgHeight\\": 610,\\n \\"OrgWidth\\": 394,\\n \\"PageIndex\\": 1,\\n \\"Angle\\": 0,\\n \\"WordsInfo\\": [\\n {\\n \\"Angle\\": 0,\\n \\"Word\\": \\"发票代码:012002000211\\",\\n \\"Height\\": 16,\\n \\"Width\\": 205,\\n \\"X\\": 863,\\n \\"Y\\": 46,\\n \\"Positions\\": [\\n {\\n \\"X\\": 863,\\n \\"Y\\": 43\\n }\\n ]\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<RecognizePdfResponse>\\n <RequestId>CD9A9659-ABEE-4A7D-837F-9FDF40879A97</RequestId>\\n <Data>\\n <WordsInfo>\\n <Word>天津增值税</Word>\\n <Angle>-88</Angle>\\n <X>514</X>\\n <Positions>\\n <X>397</X>\\n <Y>45</Y>\\n </Positions>\\n <Positions>\\n <X>662</X>\\n <Y>52</Y>\\n </Positions>\\n <Positions>\\n <X>661</X>\\n <Y>82</Y>\\n </Positions>\\n <Positions>\\n <X>396</X>\\n <Y>75</Y>\\n </Positions>\\n <Y>-69</Y>\\n <Height>265</Height>\\n <Width>29</Width>\\n </WordsInfo>\\n <WordsInfo>\\n <Word>普通发票</Word>\\n <Angle>0</Angle>\\n <X>678</X>\\n <Positions>\\n <X>678</X>\\n <Y>48</Y>\\n </Positions>\\n <Positions>\\n <X>824</X>\\n <Y>47</Y>\\n </Positions>\\n <Positions>\\n <X>824</X>\\n <Y>76</Y>\\n </Positions>\\n <Positions>\\n <X>678</X>\\n <Y>77</Y>\\n </Positions>\\n <Y>48</Y>\\n <Height>29</Height>\\n <Width>146</Width>\\n </WordsInfo>\\n <WordsInfo>\\n <Word>发票代码:012002000211</Word>\\n <Angle>0</Angle>\\n <X>863</X>\\n <Positions>\\n <X>863</X>\\n <Y>46</Y>\\n </Positions>\\n <Positions>\\n <X>1068</X>\\n <Y>46</Y>\\n </Positions>\\n <Positions>\\n <X>1068</X>\\n <Y>62</Y>\\n </Positions>\\n <Positions>\\n <X>863</X>\\n <Y>62</Y>\\n </Positions>\\n <Y>46</Y>\\n <Height>16</Height>\\n <Width>205</Width>\\n </WordsInfo>\\n <OrgWidth>610</OrgWidth>\\n <Angle>0</Angle>\\n <OrgHeight>394</OrgHeight>\\n <Height>788</Height>\\n <PageIndex>1</PageIndex>\\n <Width>1220</Width>\\n </Data>\\n</RecognizePdfResponse>","errorExample":""}]',
+ 'createdAt' => '2023-12-06T02:12:47.000Z',
+ 'description' => '',
],
- 'RecognizeTicketInvoice' => [
- 'summary' => '增值税发票卷票',
- 'methods' => [
- 'post',
+ [
+ 'apis' => [
+ ['description' => 'Request parameters changed', 'api' => 'RecognizeVATInvoice'],
],
- 'schemes' => [
- 'http',
- 'https',
+ 'createdAt' => '2023-09-14T08:06:09.000Z',
+ 'description' => '',
+ ],
+ [
+ 'apis' => [
+ ['description' => 'Request parameters changed', 'api' => 'RecognizeQrCode'],
],
- 'security' => [
- [
- 'AK' => [],
- ],
+ 'createdAt' => '2022-11-10T08:52:54.000Z',
+ 'description' => '更新支持多url本地文件上传',
+ ],
+ [
+ 'apis' => [
+ ['description' => 'Response parameters changed', 'api' => 'RecognizeVideoCharacter'],
+ ['description' => 'Response parameters changed', 'api' => 'TrimDocument'],
],
- 'deprecated' => false,
- 'systemTags' => [],
- 'parameters' => [
- [
- 'name' => 'ImageURL',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeTicketInvoice/RecognizeTicketInvoice1.png',
- 'isFileTransferUrl' => true,
- 'required' => true,
- 'title' => 'A short description of struct',
- 'type' => 'string',
- ],
- ],
+ 'createdAt' => '2022-10-17T02:02:46.000Z',
+ 'description' => '修改异步任务Message为可见',
+ ],
+ [
+ 'apis' => [
+ ['description' => 'Response parameters changed', 'api' => 'RecognizeVATInvoice'],
],
- 'responses' => [
- 200 => [
- 'schema' => [
- 'description' => 'Schema of Response',
- 'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'example' => '063C0178-7EA3-4754-96FB-C0C9AE6B9AAE',
- 'title' => 'Id of the request',
- 'type' => 'string',
- ],
- 'Data' => [
- 'description' => '',
- 'properties' => [
- 'Count' => [
- 'description' => '',
- 'example' => '1',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'Height' => [
- 'description' => '',
- 'example' => '594',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'Width' => [
- 'description' => '',
- 'example' => '594',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'OrgHeight' => [
- 'description' => '',
- 'example' => '1417',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'OrgWidth' => [
- 'description' => '',
- 'example' => '1417',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'Results' => [
- 'description' => '',
- 'items' => [
- 'description' => '1',
- 'properties' => [
- 'Index' => [
- 'description' => '',
- 'example' => '1',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'Content' => [
- 'description' => '',
- 'properties' => [
- 'InvoiceCode' => [
- 'description' => '',
- 'example' => '044031860107',
- 'type' => 'string',
- ],
- 'InvoiceNumber' => [
- 'description' => '',
- 'example' => '09267581',
- 'type' => 'string',
- ],
- 'InvoiceDate' => [
- 'description' => '',
- 'example' => '2018-09-20',
- 'type' => 'string',
- ],
- 'AntiFakeCode' => [
- 'description' => '',
- 'example' => '81931914902643039780',
- 'type' => 'string',
- ],
- 'PayeeName' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'PayeeRegisterNo' => [
- 'description' => '',
- 'example' => '914403002794492693',
- 'type' => 'string',
- ],
- 'PayerName' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'PayerRegisterNo' => [
- 'description' => '',
- 'example' => '91440300MA5EXWHW6F',
- 'type' => 'string',
- ],
- 'SumAmount' => [
- 'description' => '',
- 'example' => '¥220.00',
- 'type' => 'string',
- ],
- ],
- 'type' => 'object',
- ],
- 'Type' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'KeyValueInfos' => [
- 'description' => '',
- 'items' => [
- 'description' => '1',
- 'properties' => [
- 'Key' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'Value' => [
- 'description' => '',
- 'example' => '044031860107',
- 'type' => 'string',
- ],
- 'ValuePositions' => [
- 'description' => '',
- 'items' => [
- 'description' => '1',
- 'properties' => [
- 'X' => [
- 'description' => '',
- 'example' => '586',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'Y' => [
- 'description' => '',
- 'example' => '16',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- ],
- 'type' => 'object',
- ],
- 'type' => 'array',
- ],
- 'ValueScore' => [
- 'description' => '',
- 'example' => '100',
- 'format' => 'float',
- 'type' => 'number',
- ],
- ],
- 'type' => 'object',
- ],
- 'type' => 'array',
- ],
- 'SliceRectangle' => [
- 'description' => '',
- 'items' => [
- 'description' => '1',
- 'properties' => [
- 'X' => [
- 'description' => '',
- 'example' => '586',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'Y' => [
- 'description' => '',
- 'example' => '16',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- ],
- 'type' => 'object',
- ],
- 'type' => 'array',
- ],
- ],
- 'type' => 'object',
- ],
- 'type' => 'array',
- ],
- ],
- 'type' => 'object',
- ],
- ],
- 'title' => 'Schema of Response',
- 'type' => 'object',
- ],
- ],
+ 'createdAt' => '2022-09-30T07:17:11.000Z',
+ 'description' => '新增出参参数',
+ ],
+ [
+ 'apis' => [
+ ['description' => 'Response parameters changed', 'api' => 'RecognizeLicensePlate'],
+ ['description' => 'Response parameters changed', 'api' => 'RecognizePdf'],
+ ['description' => 'Response parameters changed', 'api' => 'RecognizeQuotaInvoice'],
+ ['description' => 'Response parameters changed', 'api' => 'RecognizeTicketInvoice'],
+ ],
+ 'createdAt' => '2022-09-27T09:39:41.000Z',
+ 'description' => '修改obj为可见',
+ ],
+ [
+ 'apis' => [
+ ['description' => 'Response parameters changed', 'api' => 'RecognizeTurkeyIdentityCard'],
],
- 'errorCodes' => [
- 400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
- ],
- 403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
- ],
- 408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
- ],
- 503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
- ],
- ],
+ 'createdAt' => '2022-05-25T09:45:00.000Z',
+ 'description' => '设置code和message为不可见',
+ ],
+ [
+ 'apis' => [
+ ['description' => 'OpenAPI offline', 'api' => 'RecognizeIndonesiaIdentityCard'],
+ ['description' => 'OpenAPI offline', 'api' => 'RecognizeMalaysiaIdentityCard'],
+ ['description' => 'OpenAPI offline', 'api' => 'RecognizeRussiaIdentityCard'],
+ ['description' => 'OpenAPI offline', 'api' => 'RecognizeTurkeyIdentityCard'],
+ ['description' => 'OpenAPI offline', 'api' => 'RecognizeVietnamIdentityCard'],
+ ],
+ 'createdAt' => '2022-05-23T09:20:44.000Z',
+ 'description' => '第一次发布上线',
+ ],
+ [
+ 'apis' => [
+ ['description' => 'OpenAPI offline', 'api' => 'RecognizeUkraineIdentityCard'],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"063C0178-7EA3-4754-96FB-C0C9AE6B9AAE\\",\\n \\"Data\\": {\\n \\"Count\\": 1,\\n \\"Height\\": 594,\\n \\"Width\\": 594,\\n \\"OrgHeight\\": 1417,\\n \\"OrgWidth\\": 1417,\\n \\"Results\\": [\\n {\\n \\"Index\\": 1,\\n \\"Content\\": {\\n \\"InvoiceCode\\": \\"044031860107\\",\\n \\"InvoiceNumber\\": \\"09267581\\",\\n \\"InvoiceDate\\": \\"2018-09-20\\",\\n \\"AntiFakeCode\\": \\"81931914902643039780\\",\\n \\"PayeeName\\": \\"深圳市xxxx有限公司\\",\\n \\"PayeeRegisterNo\\": \\"914403002794492693\\",\\n \\"PayerName\\": \\"深圳市xxxx有限公司\\",\\n \\"PayerRegisterNo\\": \\"91440300MA5EXWHW6F\\",\\n \\"SumAmount\\": \\"¥220.00\\"\\n },\\n \\"Type\\": \\"卷票\\",\\n \\"KeyValueInfos\\": [\\n {\\n \\"Key\\": \\"发票代码\\",\\n \\"Value\\": \\"044031860107\\",\\n \\"ValuePositions\\": [\\n {\\n \\"X\\": 586,\\n \\"Y\\": 16\\n }\\n ],\\n \\"ValueScore\\": 100\\n }\\n ],\\n \\"SliceRectangle\\": [\\n {\\n \\"X\\": 586,\\n \\"Y\\": 16\\n }\\n ]\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<RecognizeTicketInvoiceResponse>\\n <RequestId>063C0178-7EA3-4754-96FB-C0C9AE6B9AAE</RequestId>\\n <Data>\\n <OrgWidth>594</OrgWidth>\\n <Results>\\n <Type>卷票</Type>\\n <SliceRectangle>\\n <X>2</X>\\n <Y>19</Y>\\n </SliceRectangle>\\n <SliceRectangle>\\n <X>586</X>\\n <Y>16</Y>\\n </SliceRectangle>\\n <SliceRectangle>\\n <X>580</X>\\n <Y>1408</Y>\\n </SliceRectangle>\\n <SliceRectangle>\\n <X>0</X>\\n <Y>1410</Y>\\n </SliceRectangle>\\n <KeyValueInfos>\\n <Value>44031860107</Value>\\n <ValueScore>100</ValueScore>\\n <Key>发票代码</Key>\\n </KeyValueInfos>\\n <KeyValueInfos>\\n <Value>9267581</Value>\\n <ValueScore>100</ValueScore>\\n <Key>发票号码</Key>\\n </KeyValueInfos>\\n <KeyValueInfos>\\n <Value>2018-09-20</Value>\\n <ValueScore>100</ValueScore>\\n <Key>开票日期</Key>\\n </KeyValueInfos>\\n <KeyValueInfos>\\n <Value>81931914902643030000</Value>\\n <ValueScore>100</ValueScore>\\n <Key>校验码</Key>\\n </KeyValueInfos>\\n <KeyValueInfos>\\n <Value>深圳市xxxx有限公司</Value>\\n <ValueScore>100</ValueScore>\\n <Key>销售方名称</Key>\\n </KeyValueInfos>\\n <KeyValueInfos>\\n <Value>914403002794492700</Value>\\n <ValueScore>100</ValueScore>\\n <Key>销售方税号</Key>\\n </KeyValueInfos>\\n <KeyValueInfos>\\n <Value>深圳市xxxx有限公司</Value>\\n <ValueScore>100</ValueScore>\\n <Key>购买方名称</Key>\\n </KeyValueInfos>\\n <KeyValueInfos>\\n <Value>91440300MA5EXWHW6F</Value>\\n <ValueScore>99</ValueScore>\\n <Key>购买方税号</Key>\\n </KeyValueInfos>\\n <KeyValueInfos>\\n <Value>¥220.00</Value>\\n <ValueScore>99</ValueScore>\\n <Key>总价</Key>\\n </KeyValueInfos>\\n <Content>\\n <PayeeName>深圳市xxxx有限公司</PayeeName>\\n <AntiFakeCode>81931914902643030000</AntiFakeCode>\\n <InvoiceCode>44031860107</InvoiceCode>\\n <PayeeRegisterNo>914403002794492700</PayeeRegisterNo>\\n <PayerRegisterNo>91440300MA5EXWHW6F</PayerRegisterNo>\\n <InvoiceNumber>9267581</InvoiceNumber>\\n <InvoiceDate>2018-09-20</InvoiceDate>\\n <PayerName>深圳市xxxx有限公司</PayerName>\\n <SumAmount>¥220.00</SumAmount>\\n </Content>\\n <Index>1</Index>\\n </Results>\\n <OrgHeight>1417</OrgHeight>\\n <Height>1417</Height>\\n <Count>1</Count>\\n <Width>594</Width>\\n </Data>\\n</RecognizeTicketInvoiceResponse>","errorExample":""}]',
+ 'createdAt' => '2022-05-05T03:05:45.000Z',
+ 'description' => '首次发布',
],
- 'RecognizeQuotaInvoice' => [
- 'summary' => '定额发票识别',
- 'methods' => [
- 'post',
+ [
+ 'apis' => [
+ ['description' => 'Error codes changed', 'api' => 'GetAsyncJobResult'],
],
- 'schemes' => [
- 'http',
- 'https',
+ 'createdAt' => '2022-04-24T08:15:53.000Z',
+ 'description' => '调整GetAsyncJobResult单用户调用频率',
+ ],
+ [
+ 'apis' => [
+ ['description' => 'Error codes changed', 'api' => 'RecognizeAccountPage'],
+ ['description' => 'Error codes changed', 'api' => 'RecognizeBusinessCard'],
+ ['description' => 'Error codes changed', 'api' => 'RecognizeChinapassport'],
+ ['description' => 'Error codes changed', 'api' => 'RecognizePassportMRZ'],
+ ['description' => 'Error codes changed', 'api' => 'RecognizeStamp'],
+ ['description' => 'Error codes changed', 'api' => 'RecognizeTable'],
+ ['description' => 'Error codes changed', 'api' => 'RecognizeTakeoutOrder'],
+ ['description' => 'Error codes changed', 'api' => 'RecognizeTaxiInvoice'],
+ ],
+ 'createdAt' => '2022-03-30T09:08:14.000Z',
+ 'description' => '调整用户调用频率',
+ ],
+ [
+ 'apis' => [
+ ['description' => 'Error codes changed', 'api' => 'TrimDocument'],
],
- 'security' => [
- [
- 'AK' => [],
- ],
+ 'createdAt' => '2022-03-30T09:07:36.000Z',
+ 'description' => '调整用户调用频率',
+ ],
+ [
+ 'apis' => [
+ ['description' => 'Response parameters changed', 'api' => 'RecognizeVideoCastCrewList'],
],
- 'deprecated' => false,
- 'systemTags' => [],
- 'parameters' => [
- [
- 'name' => 'ImageURL',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeQuotaInvoice/RecognizeQuotaInvoice1.jpg',
- 'isFileTransferUrl' => true,
- 'required' => true,
- 'type' => 'string',
- ],
- ],
+ 'createdAt' => '2022-03-10T06:25:42.000Z',
+ 'description' => '修改参数信息',
+ ],
+ [
+ 'apis' => [
+ ['description' => 'OpenAPI offline', 'api' => 'RecognizeVideoCastCrewList'],
],
- 'responses' => [
- 200 => [
- 'schema' => [
- 'description' => 'Schema of Response',
- 'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'example' => 'BC4C12D0-7FD3-419A-B997-A91212DF6D82',
- 'title' => 'Id of the request',
- 'type' => 'string',
- ],
- 'Data' => [
- 'description' => '',
- 'properties' => [
- 'Angle' => [
- 'description' => '',
- 'example' => '1',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'Height' => [
- 'description' => '',
- 'example' => '624',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'Width' => [
- 'description' => '',
- 'example' => '865',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'OrgHeight' => [
- 'description' => '',
- 'example' => '610',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'OrgWidth' => [
- 'description' => '',
- 'example' => '855',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'Content' => [
- 'description' => '',
- 'properties' => [
- 'SumAmount' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'InvoiceCode' => [
- 'description' => '',
- 'example' => '144031800103',
- 'type' => 'string',
- ],
- 'InvoiceNo' => [
- 'description' => '',
- 'example' => '40637706',
- 'type' => 'string',
- ],
- 'InvoiceAmount' => [
- 'description' => '',
- 'example' => '10',
- 'type' => 'string',
- ],
- 'InvoiceDetails' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- ],
- 'type' => 'object',
- ],
- 'KeyValueInfos' => [
- 'description' => '',
- 'items' => [
- 'description' => '1',
- 'properties' => [
- 'Key' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'Value' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'ValuePositions' => [
- 'description' => '',
- 'items' => [
- 'description' => '1',
- 'properties' => [
- 'X' => [
- 'description' => '',
- 'example' => '544',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'Y' => [
- 'description' => '',
- 'example' => '387',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- ],
- 'type' => 'object',
- ],
- 'type' => 'array',
- ],
- 'ValueScore' => [
- 'description' => '',
- 'example' => '100',
- 'format' => 'float',
- 'type' => 'number',
- ],
- ],
- 'type' => 'object',
- ],
- 'type' => 'array',
- ],
- ],
- 'type' => 'object',
- ],
- ],
- 'title' => 'Schema of Response',
- 'type' => 'object',
- ],
- ],
+ 'createdAt' => '2022-03-03T12:08:55.000Z',
+ 'description' => '第一版上线',
+ ],
+ [
+ 'apis' => [
+ ['description' => 'Response parameters changed', 'api' => 'RecognizeVideoCharacter'],
],
- 'errorCodes' => [
- 400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
- ],
- 403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
- ],
- 408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
- ],
- 503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
- ],
- ],
+ 'createdAt' => '2021-12-15T03:45:44.000Z',
+ 'description' => '新增出参inputFile',
+ ],
+ [
+ 'apis' => [
+ ['description' => 'OpenAPI offline', 'api' => 'RecognizeVideoCharacter'],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"BC4C12D0-7FD3-419A-B997-A91212DF6D82\\",\\n \\"Data\\": {\\n \\"Angle\\": 1,\\n \\"Height\\": 624,\\n \\"Width\\": 865,\\n \\"OrgHeight\\": 610,\\n \\"OrgWidth\\": 855,\\n \\"Content\\": {\\n \\"SumAmount\\": \\"壹拾元整\\",\\n \\"InvoiceCode\\": \\"144031800103\\",\\n \\"InvoiceNo\\": \\"40637706\\",\\n \\"InvoiceAmount\\": \\"10\\",\\n \\"InvoiceDetails\\": \\"税务局代码:国税,行政区划代码:深圳市,年份:2018,发票行业代码:None,发票类别代码:None,金额版:万元版,批次号:03\\"\\n },\\n \\"KeyValueInfos\\": [\\n {\\n \\"Key\\": \\"大写金额\\",\\n \\"Value\\": \\"壹拾元整\\",\\n \\"ValuePositions\\": [\\n {\\n \\"X\\": 544,\\n \\"Y\\": 387\\n }\\n ],\\n \\"ValueScore\\": 100\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<RecognizeQuotaInvoiceResponse>\\n <RequestId>BC4C12D0-7FD3-419A-B997-A91212DF6D82</RequestId>\\n <Data>\\n <OrgWidth>855</OrgWidth>\\n <Angle>1</Angle>\\n <KeyValueInfos>\\n <ValuePositions>\\n <X>544</X>\\n <Y>387</Y>\\n </ValuePositions>\\n <ValuePositions>\\n <X>544</X>\\n <Y>443</Y>\\n </ValuePositions>\\n <ValuePositions>\\n <X>308</X>\\n <Y>443</Y>\\n </ValuePositions>\\n <ValuePositions>\\n <X>308</X>\\n <Y>387</Y>\\n </ValuePositions>\\n <Value>壹拾元整</Value>\\n <ValueScore>100</ValueScore>\\n <Key>大写金额</Key>\\n </KeyValueInfos>\\n <KeyValueInfos>\\n <ValuePositions>\\n <X>310</X>\\n <Y>237</Y>\\n </ValuePositions>\\n <ValuePositions>\\n <X>575</X>\\n <Y>234</Y>\\n </ValuePositions>\\n <ValuePositions>\\n <X>576</X>\\n <Y>259</Y>\\n </ValuePositions>\\n <ValuePositions>\\n <X>311</X>\\n <Y>262</Y>\\n </ValuePositions>\\n <Value>144031800103</Value>\\n <ValueScore>100</ValueScore>\\n <Key>发票代码</Key>\\n </KeyValueInfos>\\n <KeyValueInfos>\\n <ValuePositions>\\n <X>480</X>\\n <Y>298</Y>\\n </ValuePositions>\\n <ValuePositions>\\n <X>480</X>\\n <Y>321</Y>\\n </ValuePositions>\\n <ValuePositions>\\n <X>309</X>\\n <Y>321</Y>\\n </ValuePositions>\\n <ValuePositions>\\n <X>309</X>\\n <Y>298</Y>\\n </ValuePositions>\\n <Value>40637706</Value>\\n <ValueScore>100</ValueScore>\\n <Key>发票号码</Key>\\n </KeyValueInfos>\\n <KeyValueInfos>\\n <Value/>\\n <ValueScore>100</ValueScore>\\n <Key>小写金额</Key>\\n </KeyValueInfos>\\n <KeyValueInfos>\\n <ValuePositions>\\n <X>310</X>\\n <Y>237</Y>\\n </ValuePositions>\\n <ValuePositions>\\n <X>575</X>\\n <Y>234</Y>\\n </ValuePositions>\\n <ValuePositions>\\n <X>576</X>\\n <Y>259</Y>\\n </ValuePositions>\\n <ValuePositions>\\n <X>311</X>\\n <Y>262</Y>\\n </ValuePositions>\\n <Value>税务局代码:国税,行政区划代码:深圳市,年份:2018,发票行业代码:None,发票类别代码:None,金额版:万元版,批次号:03</Value>\\n <ValueScore>100</ValueScore>\\n <Key>发票代码解析</Key>\\n </KeyValueInfos>\\n <Content>\\n <InvoiceDetails>{\\"批次号\\":\\"03\\",\\"年份\\":\\"2018\\",\\"税务局代码\\":\\"国税\\",\\"发票行业代码\\":\\"None\\",\\"金额版\\":\\"万元版\\",\\"行政区划代码\\":\\"深圳市\\",\\"发票类别代码\\":\\"None\\"}</InvoiceDetails>\\n <InvoiceCode>144031800103</InvoiceCode>\\n <InvoiceNo>40637706</InvoiceNo>\\n <InvoiceAmount/>\\n <SumAmount>壹拾元整</SumAmount>\\n </Content>\\n <OrgHeight>610</OrgHeight>\\n <Height>624</Height>\\n <Width>865</Width>\\n </Data>\\n</RecognizeQuotaInvoiceResponse>","errorExample":""}]',
+ 'createdAt' => '2021-11-01T03:16:57.000Z',
+ 'description' => '新增 视频通用文字识别',
],
- 'RecognizeVideoCharacter' => [
- 'summary' => '通用视频文字识别',
- 'methods' => [
- 'post',
+ [
+ 'apis' => [
+ ['description' => 'OpenAPI offline', 'api' => 'RecognizePdf'],
+ ['description' => 'OpenAPI offline', 'api' => 'RecognizeQuotaInvoice'],
+ ['description' => 'OpenAPI offline', 'api' => 'RecognizeTicketInvoice'],
],
- 'schemes' => [
- 'http',
- 'https',
+ 'createdAt' => '2021-07-01T01:39:42.000Z',
+ 'description' => '首次发布',
+ ],
+ [
+ 'apis' => [
+ ['description' => 'OpenAPI offline', 'api' => 'RecognizeDriverLicense'],
+ ['description' => 'OpenAPI offline', 'api' => 'RecognizeLicensePlate'],
],
- 'security' => [
- [
- 'AK' => [],
+ 'createdAt' => '2021-05-10T07:33:32.000Z',
+ 'description' => '新增出参参数',
+ ],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeDrivingLicense'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeVideoCharacter'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeTable'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeIdentityCard'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizePdf'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeBusinessLicense'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeBankCard'],
+ ['threshold' => '200', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeCharacter'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetAsyncJobResult'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeDriverLicense'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeLicensePlate'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeTaxiInvoice'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeVATInvoice'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeQuotaInvoice'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeTicketInvoice'],
+ ['threshold' => '18', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeTrainTicket'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeQrCode'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeVINCode'],
+ ],
+ ],
+ 'ram' => [
+ 'productCode' => 'VisualIntelligenceAPI',
+ 'productName' => 'Visual Intelligence API',
+ 'ramCodes' => ['viapi-imageseg', 'viapi-imageaudit', 'viapi-ocr', 'viapi-objectdet', 'viapi-imageenhan', 'viapi-videorecog', 'viapi-imageprocess', 'viapi', 'viapi-ekyc', 'viapi-imgsearch', 'viapi-goodstech', 'viapi-facebody', 'viapi-threedvision', 'viapi-videoenhan', 'viapi-imagerecog', 'viapi-videoseg', 'viapi-regen', 'viapi-aigen'],
+ 'ramLevel' => 'SERVICE',
+ 'ramConditions' => [],
+ 'ramActions' => [
+ [
+ 'apiName' => 'RecognizeTable',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeTable',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'RecognizeVATInvoice',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeVATInvoice',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'RecognizeQuotaInvoice',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeQuotaInvoice',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'RecognizeVINCode',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeVINCode',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'RecognizeTrainTicket',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeTrainTicket',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'RecognizeDriverLicense',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeDriverLicense',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'RecognizeLicensePlate',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeLicensePlate',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'RecognizeDrivingLicense',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeDrivingLicense',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'RecognizeBankCard',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeBankCard',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'RecognizeIdentityCard',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeIdentityCard',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'RecognizeVideoCharacter',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeVideoCharacter',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'GetAsyncJobResult',
+ 'description' => '',
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:GetAsyncJobResult',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
- 'deprecated' => false,
- 'systemTags' => [],
- 'parameters' => [
- [
- 'name' => 'VideoURL',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/videoenhan/RecognizeVideoCharacter/xxxx.mp4',
- 'required' => true,
- 'title' => '视频文件地址',
- 'type' => 'string',
- 'isFileTransferUrl' => true,
+ [
+ 'apiName' => 'RecognizePdf',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizePdf',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
- 'responses' => [
- 200 => [
- 'schema' => [
- 'description' => '1',
- 'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'example' => 'D3F5BA69-79C4-46A4-B02B-58C4EEBC4C33',
- 'title' => 'Id of the request',
- 'type' => 'string',
- ],
- 'Data' => [
- 'description' => '',
- 'properties' => [
- 'Width' => [
- 'description' => '',
- 'example' => '1920',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'Height' => [
- 'description' => '',
- 'example' => '1080',
- 'format' => 'int64',
- 'type' => 'integer',
- ],
- 'Frames' => [
- 'description' => '',
- 'items' => [
- 'properties' => [
- 'Timestamp' => [
- 'description' => '',
- 'example' => '6124533574',
- 'format' => 'int64',
- 'title' => '帧时间戳时间戳,单位秒。',
- 'type' => 'integer',
- ],
- 'Elements' => [
- 'items' => [
- 'properties' => [
- 'Score' => [
- 'description' => '',
- 'example' => '0.99',
- 'format' => 'float',
- 'title' => '文字区域概率,概率值的范围为[0.0, 1.0]',
- 'type' => 'number',
- ],
- 'Text' => [
- 'description' => '',
- 'example' => '',
- 'title' => '文字内容',
- 'type' => 'string',
- ],
- 'TextRectangles' => [
- 'description' => '',
- 'items' => [
- 'properties' => [
- 'Angle' => [
- 'description' => '',
- 'example' => '-90',
- 'format' => 'int64',
- 'title' => '文字区域角度,角度范围[0, 360]',
- 'type' => 'integer',
- ],
- 'Left' => [
- 'description' => '',
- 'example' => '213',
- 'format' => 'int64',
- 'title' => '文字区域左上角x坐标',
- 'type' => 'integer',
- ],
- 'Top' => [
- 'description' => '',
- 'example' => '98',
- 'format' => 'int64',
- 'title' => '文字区域左上角y坐标',
- 'type' => 'integer',
- ],
- 'Width' => [
- 'description' => '',
- 'example' => '46',
- 'format' => 'int64',
- 'title' => '文字区域宽度',
- 'type' => 'integer',
- ],
- 'Height' => [
- 'description' => '',
- 'example' => '213',
- 'format' => 'int64',
- 'title' => '文字区域高度',
- 'type' => 'integer',
- ],
- ],
- 'type' => 'object',
- ],
- 'type' => 'array',
- ],
- ],
- 'type' => 'object',
- ],
- 'type' => 'array',
- ],
- ],
- 'type' => 'object',
- ],
- 'title' => '视频帧的集合,空信息的帧不列出。',
- 'type' => 'array',
- ],
- 'InputFile' => [
- 'description' => '',
- 'example' => 'oss://my-bucket/a/b/c.mp4',
- 'title' => '对应的输入OSS文件 (格式oss://{bucketName}/{object})',
- 'type' => 'string',
- ],
- ],
- 'type' => 'object',
- ],
- 'Message' => [
- 'type' => 'string',
- ],
- ],
- 'title' => 'Schema of Response',
- 'type' => 'object',
+ [
+ 'apiName' => 'RecognizeQrCode',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeQrCode',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
- 'errorCodes' => [
- 400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
+ [
+ 'apiName' => 'RecognizeCharacter',
+ 'description' => '',
+ 'operationType' => 'none',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeCharacter',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
- 403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
+ ],
+ [
+ 'apiName' => 'RecognizeBusinessLicense',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeBusinessLicense',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
- 408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
+ ],
+ [
+ 'apiName' => 'RecognizeTaxiInvoice',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeTaxiInvoice',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
- 503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ],
+ [
+ 'apiName' => 'RecognizeTicketInvoice',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-ocr:RecognizeTicketInvoice',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"D3F5BA69-79C4-46A4-B02B-58C4EEBC4C33\\",\\n \\"Data\\": {\\n \\"Width\\": 1920,\\n \\"Height\\": 1080,\\n \\"Frames\\": [\\n {\\n \\"Timestamp\\": 6124533574,\\n \\"Elements\\": [\\n {\\n \\"Score\\": 0.99,\\n \\"Text\\": \\"在桃花盛开的地方\\",\\n \\"TextRectangles\\": [\\n {\\n \\"Angle\\": -90,\\n \\"Left\\": 213,\\n \\"Top\\": 98,\\n \\"Width\\": 46,\\n \\"Height\\": 213\\n }\\n ]\\n }\\n ]\\n }\\n ],\\n \\"InputFile\\": \\"oss://my-bucket/a/b/c.mp4\\"\\n },\\n \\"Message\\": \\"该调用为异步调用,任务已提交成功,请以requestId的值作为jobId参数调用同类目下GetAsyncJobResult接口查询任务执行状态和结果。\\"\\n}","errorExample":""},{"type":"xml","example":"<RecognizeVideoCharacterResponse>\\n <RequestId>D3F5BA69-79C4-46A4-B02B-58C4EEBC4C33</RequestId>\\n <Message>该调用为异步调用,任务已提交成功,请以requestId的值作为jobId参数调用同类目下GetAsyncJobResult接口查询任务执行状态和结果。</Message>\\n</RecognizeVideoCharacterResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
- 'responseParamsDescription' => ' ',
- ],
- ],
- 'endpoints' => [
- [
- 'regionId' => 'cn-shanghai',
- 'endpoint' => 'ocr.cn-shanghai.aliyuncs.com',
],
+ 'resourceTypes' => [],
],
];