征信查询标准接口V1

征信查询标准接口V1


相关代码示例

<p>[TOC]</p> <h5>简要描述</h5> <ul> <li>批量上传征信授权文件</li> </ul> <h5>上传文件类型</h5> <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;">F1</td> <td style="text-align: left;"><strong>个人征信授权协议</strong></td> <td>pdf</td> </tr> <tr> <td style="text-align: left;">F2</td> <td style="text-align: left;">企业征信授权协议</td> <td>pdf</td> </tr> <tr> <td style="text-align: left;">F3</td> <td style="text-align: left;">个人信息授权协议</td> <td>pdf</td> </tr> <tr> <td style="text-align: left;">F4</td> <td style="text-align: left;"><strong>人脸照片</strong></td> <td>jpg/png/gif/bmp/pdf</td> </tr> <tr> <td style="text-align: left;">F5</td> <td style="text-align: left;"><strong>身份证正反面</strong></td> <td>jpg/png/gif/bmp/pdf</td> </tr> <tr> <td style="text-align: left;">F6</td> <td style="text-align: left;"><strong>担保协议</strong></td> <td>pdf</td> </tr> </tbody> </table> <p><strong>注意:查询个人征信时 个人征信授权协议、人脸照片、身份证正反面图片、担保协议 必传</strong></p> <h5>相关代码 示例</h5> <pre><code>//需要上传的文件 String sfz = &amp;quot;C:\\Users\\xiao\\Desktop\\身份证正反面.jpeg&amp;quot;; String face = &amp;quot;C:\\Users\\xiao\\Desktop\\人脸照片.jpg&amp;quot;; String pdf = &amp;quot;C:\\Users\\xiao\\Desktop\\个人征信授权协议.pdf&amp;quot;; File sfzFile = new File(sfz); File faceFile = new File(face); File pdfFile = new File(pdf); BatchUploadDto param = new BatchUploadDto(); param.setBusinessNum(&amp;quot;KAIXUAN20250320test110120119001&amp;quot;); List&amp;lt;BatchUploadDto.AttachmentInfo&amp;gt; attachmentInfos = new ArrayList&amp;lt;&amp;gt;(); //AttachmentInfo 填充 文件类型、文件md5值 BatchUploadDto.AttachmentInfo sfzInfo = new BatchUploadDto.AttachmentInfo(); sfzInfo.setFileType(&amp;quot;F5&amp;quot;); sfzInfo.setContentMD5(FileMd5Util.getFileContentMD5(sfzFile)); BatchUploadDto.AttachmentInfo faceInfo = new BatchUploadDto.AttachmentInfo(); faceInfo.setFileType(&amp;quot;F4&amp;quot;); faceInfo.setContentMD5(FileMd5Util.getFileContentMD5(faceFile)); BatchUploadDto.AttachmentInfo pdfInfo = new BatchUploadDto.AttachmentInfo(); pdfInfo.setFileType(&amp;quot;F1&amp;quot;); pdfInfo.setContentMD5(FileMd5Util.getFileContentMD5(pdfFile)); attachmentInfos.add(sfzInfo); attachmentInfos.add(faceInfo); attachmentInfos.add(pdfInfo); param.setAttachmentInfos(attachmentInfos); // 得到加密参数进行传递 // param 拼装的参数 // MD5_KEY 默认值 主要用于签名检验 (凯旋-提供) // PUBLIC_KEY 公钥 (凯旋-提供) // ORGCODE 机构代码 (凯旋-提供) String encryptParam = CreditCryptoUtils.encryption(JSON.toJSONString(param), MD5_KEY, PUBLIC_KEY, ORGCODE); </code></pre> <p>encryptParam 通过加密工具类得出的值 (参考)</p> <pre><code>{     &amp;quot;orgCode&amp;quot;: &amp;quot;maguo&amp;quot;,     &amp;quot;sign&amp;quot;: &amp;quot;1bc7f5b8ee6ccd6454200f8564e4ae53&amp;quot;,     &amp;quot;key&amp;quot;: &amp;quot;Emyxl6kPYeTjNhCC3wLlYHyfiI5p93XsnQVFKLspFJKtFJbx9z02AjwrGcmScuvpgq5u69nwOO2dOfyWv/UbQPpYuIiThN60bXUiyC5CChmXEBwMTKsMB4tTIDaZTNhtFTo1ztZT8464hRBMgQXygcACwUKiZ3lff3e3/QjwkpUX9MyQ+WS6xqx2dtrTgStBYvfuI9KGeREnRV9te1bvHunvDZGzm6BllSh7Rl4N1icp2PnmhhKHiZhY84QVbFo1AqlPRyQBI7NBx6wveMWck9nIAKqPjbcj6xVPb9sqi0QvKVPPKY/WGHv3ndfyLWuQIGlUj0gGoHJXfHJ+RLOlnw==&amp;quot;,     &amp;quot;content&amp;quot;: &amp;quot;BLiRSZiG8SdscxRrAwmbzKsTki6jvbA9UtXHoXjzu8YQLcobHiCcm7th9Mu9C1VYih777S36+HR87hYeSu2y5YtKW21IJAk0qgorrenaXsEaEURsubIeIAxt6qX37HeVt270/+btLl0LcTSYyPXc984pBDdWnu4tRMfgV+uvWM3OivXaenige2bGDtDnvMr7a29OERMMMnPK8cbwPVF8ntFs4Pu1Fq9CPX8ixWaL5hQ7KVJu9pcc4m7GJxD4ioJ1xG5b+a+8Ob3xU+LpovDjvbsXBLbesLN82bMHq5mpVKbsc+9ltQB9EfgObrxHllXRP0X/dDw0zNg/fTQPRkdRtA==&amp;quot;,     &amp;quot;timestamp&amp;quot;: &amp;quot;1742438857540&amp;quot; }</code></pre> <p>将加密后的数据 传输到对应接口即可</p> <hr /> <h5>【授权文件批量上传 发送 http请求 完整示例】</h5> <pre><code class="language-java">String sfz = &amp;quot;C:\\Users\\xiao\\Desktop\\sfz.jpeg&amp;quot;; String face = &amp;quot;C:\\Users\\xiao\\Desktop\\face.jpg&amp;quot;; String pdf = &amp;quot;C:\\Users\\xiao\\Desktop\\ca.pdf&amp;quot;; File sfzFile = new File(sfz); File faceFile = new File(face); File pdfFile = new File(pdf); // 组装请求参数 BatchUploadDto param = new BatchUploadDto(); param.setBusinessNum(&amp;quot;KAIXUAN20250325test110120119003&amp;quot;); List&amp;lt;BatchUploadDto.AttachmentInfo&amp;gt; attachmentInfos = new ArrayList&amp;lt;&amp;gt;(); BatchUploadDto.AttachmentInfo sfzInfo = new BatchUploadDto.AttachmentInfo(); sfzInfo.setFileType(&amp;quot;F5&amp;quot;); sfzInfo.setContentMD5(FileMd5Util.getFileContentMD5(sfzFile)); BatchUploadDto.AttachmentInfo faceInfo = new BatchUploadDto.AttachmentInfo(); faceInfo.setFileType(&amp;quot;F4&amp;quot;); faceInfo.setContentMD5(FileMd5Util.getFileContentMD5(faceFile)); BatchUploadDto.AttachmentInfo pdfInfo = new BatchUploadDto.AttachmentInfo(); pdfInfo.setFileType(&amp;quot;F1&amp;quot;); pdfInfo.setContentMD5(FileMd5Util.getFileContentMD5(pdfFile)); attachmentInfos.add(sfzInfo); attachmentInfos.add(faceInfo); attachmentInfos.add(pdfInfo); param.setAttachmentInfos(attachmentInfos); // 把组装好的参数进行加密 String encryptString1 = CreditCryptoUtils.encryption(JSON.toJSONString(param), MD5_KEY, PUBLIC_KEY, ORGCODE); log.info(&amp;quot;生成批量文件上传:{}&amp;quot;,encryptString1); // 发送http 请求 String url = &amp;quot;http://43.138.7.209:9999/cdqsc/v1/org/credit-query/auth/batch-upload&amp;quot;; // 创建 HTTP 客户端 try (CloseableHttpClient httpClient = HttpClients.createDefault()) { HttpPost post = new HttpPost(url); // 构建 Multipart 请求 MultipartEntityBuilder builder = MultipartEntityBuilder.create(); builder.addPart(&amp;quot;file&amp;quot;, new FileBody(sfzFile)); builder.addPart(&amp;quot;file&amp;quot;, new FileBody(faceFile)); builder.addPart(&amp;quot;file&amp;quot;, new FileBody(pdfFile)); // 传输加密参数 builder.addPart(&amp;quot;param&amp;quot;, new StringBody(encryptString1, ContentType.APPLICATION_JSON)); HttpEntity entity = builder.build(); post.setEntity(entity); // 发送请求 try (CloseableHttpResponse response = httpClient.execute(post)) { HttpEntity responseEntity = response.getEntity(); String responseString = EntityUtils.toString(responseEntity, &amp;quot;UTF-8&amp;quot;); System.out.println(&amp;quot;Response: &amp;quot; + responseString); } } catch (IOException e) { e.printStackTrace(); } </code></pre>

页面列表

ITEM_HTML