身份证二要素核验
<p><strong>简要描述:</strong> </p>
<ul>
<li>身份证二要素核验</li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>API地址: <a href="https://open-beta.56yzm.com:8443">https://open-beta.56yzm.com:8443</a> (不同的环境,不同的API地址)</li>
<li>请求地址:/open-api/ocr/ocrCheckIdCard</li>
</ul>
<p><strong>请求头数据 </strong></p>
<ul>
<li>Content-Type : application/json;charset=UTF-8 </li>
<li>Authorization: Bearer {your_access_token} </li>
</ul>
<p><strong>入参参数:</strong> </p>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
<th>示例</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">idcardImage1Url</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">String</td>
<td>身份证人像面图像数据,使用base64编码,要求base64编码后大小不超过4M。图像各边的像素大小在300到4000之间,支持JPG格式。</td>
<td><a href="https://baidu.com">https://baidu.com</a></td>
</tr>
<tr>
<td style="text-align: left;">idcardImage2Url</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">String</td>
<td>身份证国徽面图像数据,使用base64编码,要求base64编码后大小不超过4M。图像各边的像素大小在300到4000之间,支持JPG格式。</td>
<td><a href="https://baidu.com">https://baidu.com</a></td>
</tr>
</tbody>
</table>
<p><strong>入参示例</strong></p>
<pre><code> {
&quot;idcardImage1Url&quot;: &quot;string&quot;,
&quot;idcardImage2Url&quot;: &quot;string&quot;
}</code></pre>
<p><strong>返回参数说明</strong> </p>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">verificationResult</td>
<td style="text-align: left;">string</td>
<td>审核校验结果: "valid"表示身份审核通过; "invalid"表示身份审核不通过; "nonexistent"表示数据源没有该身份证号码,这种情况一般是被验证人正在办理户籍迁移,或者被验证人是军人或政要。</td>
</tr>
<tr>
<td style="text-align: left;">verificationMessage</td>
<td style="text-align: left;">string</td>
<td>1000 valid Successful certification 认证成功。2001 invalid Inconsistent identity information 认证信息不一致,即姓名与身份证号码不一致。<br><br>2002 invalid Inconsistent face information 人脸与身份证信息不符。<br><br>2003 invalid Face image quality or format problem 人脸图像质量或格式问题。<br><br>2004 invalid No face or more than one face in the image 未检测到人脸或检测到多张人脸。<br><br>2006 invalid Id card photo does not exist 证件照不存在,属于数据源问题(极少出现这种情况)。<br><br>3001 nonexistent Nonexistent identity information 认证中心数据源无此身份证信息,可能原因是被验证人正在办理户籍迁移,或者被验证人是军人或政要。</td>
</tr>
<tr>
<td style="text-align: left;">verificationCode</td>
<td style="text-align: left;">string</td>
<td>验证码</td>
</tr>
<tr>
<td style="text-align: left;">idcardResult</td>
<td style="text-align: left;">object</td>
<td>身份证图像的文字识别结果</td>
</tr>
</tbody>
</table>
<p><strong>idcardResult对象返参说明</strong> </p>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;">string</td>
<td>姓名</td>
</tr>
<tr>
<td style="text-align: left;">number</td>
<td style="text-align: left;">string</td>
<td>身份证号</td>
</tr>
<tr>
<td style="text-align: left;">sex</td>
<td style="text-align: left;">string</td>
<td>注册资本</td>
</tr>
<tr>
<td style="text-align: left;">birth</td>
<td style="text-align: left;">string</td>
<td>出生日期</td>
</tr>
<tr>
<td style="text-align: left;">ethnicity</td>
<td style="text-align: left;">string</td>
<td>民族</td>
</tr>
<tr>
<td style="text-align: left;">address</td>
<td style="text-align: left;">string</td>
<td>地址</td>
</tr>
<tr>
<td style="text-align: left;">issue</td>
<td style="text-align: left;">string</td>
<td>发证机关</td>
</tr>
<tr>
<td style="text-align: left;">valid_from</td>
<td style="text-align: left;">string</td>
<td>有效起始日期</td>
</tr>
<tr>
<td style="text-align: left;">valid_to</td>
<td style="text-align: left;">string</td>
<td>有效结束日期</td>
</tr>
</tbody>
</table>
<p><strong>出参示例</strong></p>
<pre><code>{
&quot;code&quot;: 0,
&quot;msg&quot;: &quot;string&quot;,
&quot;data&quot;: {
&quot;url&quot;: &quot;string&quot;,
&quot;serviceName&quot;: &quot;string&quot;,
&quot;data&quot;: {
&quot;verificationResult&quot;: &quot;string&quot;,
&quot;verificationMessage&quot;: &quot;string&quot;,
&quot;verificationCode&quot;: 0,
&quot;idcardResult&quot;: {
&quot;name&quot;: &quot;string&quot;,
&quot;number&quot;: &quot;string&quot;,
&quot;sex&quot;: &quot;string&quot;,
&quot;birth&quot;: &quot;string&quot;,
&quot;ethnicity&quot;: &quot;string&quot;,
&quot;address&quot;: &quot;string&quot;,
&quot;issue&quot;: &quot;string&quot;,
&quot;valid_from&quot;: &quot;string&quot;,
&quot;valid_to&quot;: &quot;string&quot;
}
}
}
}</code></pre>