北京列举网 > 商务服务 > 其他商务服务 > 营业执照识别API开发文档
北京
[切换城市]

营业执照识别API开发文档

更新时间:2020-12-29 14:15:02 浏览次数:33次
区域: 北京 > 朝阳 > 国贸
一、接口简介
1、版权说明:
未经翔云人工智能开放平台授权,不得擅自进行使用。
2、调用客户端运行环境
当客户端使用的编程语言为Java时,请使用1.5及以上版本JRE。
3、服务主要功能描述
翔云营业执照识别服务,可快速精准识别营业执照上的全部字段信息,支持三证合一版营业执照和五证合一版营业执照。
1) 通过https协议post方法上传各种营业执照图像文件,通过https接口进行识别;
2) 将识别结果以XML或json格式返回给用户;
4、服务调用约束
在调用营业执照识别接口前,请您确保客户端程序或设备网络连接通畅,要求图像文件大小在200KB左右,扫描图像建议分辨率为300DPI,图像小于3M。
二、前提准备
1、用户登录 https://ww***oc***/register.html注册,如图:
2、输入注册信息,确认无误后点击同意条款并注册,如图:

3、注册成功后点击右上角的名称-个人中心,进入管理页面:

4、点击“用户管理-基础信息”,查看OCRKey以及OCRSecret:

5、点击“服务列表”,查看服务次数及余额(每调用一次https接口消耗一次),可点击立即购买直接跳转到购买页面购买API服务次数:

6、购买成功后,会显示购买的总次数及剩余次数,例如下图所示:

7、设置剩余条数提醒,进入个人中心-用户管理-剩余条数提醒,设置提醒下线、通知手机号及服务类型,设置成功后到达用户设置的服务剩余条数下限,系统会发短息至预留手机号。

三、接口说明
接口地址,图片为base64流:https://netoc***/api/recoglenliu.do
图片为file格式:https://netoc***/api/recoglen.do
(注:调用图片为base64流接口时传参数img,调用图片为file格式接口传参数file)

接口调用方法:post
3、请求参数
名称      类型      必填      说明
img      String      是      上传的文件(图片的base64流)
file      MultipartFile      是      上传的文件(上传文件的字段名必须是“file”)
key      String      是      用户ocrKey
secret      String      是      用户ocrSecrert
typeId      Integer      是      识别类型:2008
outvalue      String      是      输出选项(0为全部返回)
识别结果字符串
<status/>标签显示了识别状态,大于等于“0”代表识别成功【“0”代表查询成功,“1”代表未查到数据,“2”代表查询失败】,小于“0”代表识别失败,失败的原因在<value/>中描述。
调用错误码
status值      描述
-1      用户已屏蔽
-2      用户key或secret验证错误
-3      服务次数不足
-4      用户未找到
-6      系统异常
-7      图片不可为空,参数不可为空
-8      类型错误
识别错误码1
status值      描述
-1      识别失败
识别错误码2
value值      描述
RecogBussinessLicense2      检测四边线失败
RecogBussinessLicense3      加载图像失败
RecogBussinessLicense4      装载模板文件失败
RecogBussinessLicense5      参数错误
RecogBussinessLicense6      图像预处理失败
RecogBussinessLicense7      内存不足
RecogBussinessLicense8      不支持的图像格式
RecogBussinessLicense9      版面分析错误
RecogBussinessLicense10      检线失败
RecogBussinessLicense11      字符切分失败
RecogBussinessLicense12      后处理失败
RecogBussinessLicense14      参数不支持些类型
RecogBussinessLicense15      索引越界
Exception For input string      调用参数传递有误
调用方式(java客户端基于httpclient4.3)
1.依赖库: \java客户端\httpClient4.3库\,如图:

2.示例程序代码详见: \java客户端\httpClientDemo\中的Client类,如图:

在main方法定义参数,并传入  doPost(url, file, key, secret, typeId,outvalue, format) 方法中。如图:

返回识别结果如下:
{
  "message":{
    "status":0,
    "value":"识别完成"
  },
  "cardsinfo":[
    {
        "type":"2008",
        "items":[
          {
            "nID":null,
            "index":null,
            "desc":"统一社会信用代码",
            "content":""
          },
          {
            "nID":null,
            "index":null,
            "desc":"组织机构代码",
            "content":""
          },
          {
            "nID":null,
            "index":null,
            "desc":"税务登记证号",
            "content":""
          },
          {
            "nID":null,
            "index":null,
            "desc":"社保登记号",
            "content":""
          },
          {
            "nID":null,
            "index":null,
            "desc":"统计证证号",
            "content":""
          },
          {
            "nID":null,
            "index":null,
            "desc":"名称",
            "content":""
          },
          {
            "nID":null,
            "index":null,
            "desc":"类型",
            "content":""
          },
          {
            "nID":null,
            "index":null,
            "desc":"住所",
            "content":""
          },
          {
            "nID":null,
            "index":null,
            "desc":"法定代表人",
            "content":""
          },
          {
            "nID":null,
            "index":null,
            "desc":"组成形式",
            "content":""
          },
          {
            "nID":null,
            "index":null,
            "desc":"注册资本",
            "content":""
          },
          {
            "nID":null,
            "index":null,
            "desc":"成立日期",
            "content":""
          },
          {
            "nID":null,
            "index":null,
            "desc":"营业期限",
            "content":""
          },
          {
            "nID":null,
            "index":null,
            "desc":"经营范围",
            "content":""
          },
          {
            "nID":null,
            "index":null,
            "desc":"登记机关",
            "content":""
          },
          {
            "nID":null,
            "index":null,
            "desc":"登记日期",
            "content":""
          },
          {
            "nID":null,
            "index":null,
            "desc":"二维码",
            "content":""
          },
          {
            "nID":null,
            "index":null,
            "desc":"副本",
            "content":""
          }]
    }]
}

剩余条数查询接口(所有产品类型)
接口地址:      https://netoc***/api/accountLift.do
接口调用方法:      post
接口接收参数:
String key:      用户ocrKey
String secret:      用户ocrSecret
String format:      返回格式(xml或者json),如果format为空,则默认返回xml
北京其他商务服务相关信息
5小时前
5小时前
12小时前
注册时间:2018年02月05日
UID:461318
---------- 认证信息 ----------
手机已认证
查看用户主页