签署后文件验签
接口说明
[!NOTE]
签署后的文件验签,也支持数据签验签。
http请求方式
[!NOTE]
POST application/x-www-form-urlencoded
http请求地址
[!NOTE]
$SERVICE_URL/v2/auth/validateContract #其中$SERVICE_URL为生产或测试的地址
http请求参数
参数 | 类型 | 是否必填 | 默认值 | 说明 |
---|---|---|---|---|
contractType | int | * | 合同类型0为普通合同1为数据签 | |
contractFile | file | * | 合同文件 | |
byteSignLogFile | file | + | 数据签日志文件 contractType为1必传 |
代码实现
JAVA实现
Map<String, Object> params = bodyParams;
String url = SERVICE_URL + "/v2/auth/validateContract";
params.put("contractType", "0");
params.put("contractFile", new File("d:\\唐\\委托签字.pdf"));
String str = HttpClientUtils.init().getPost(url, null, params, true);
System.out.println(str);
http返回参数
[!NOTE]
返回response为application/json的数据,其字段说明如下
参数 | 类型 | 是否必返回 | 说明 |
---|---|---|---|
success | bool | * | 成功true;异常false |
msg | string | ? | 异常时,返回异常原因 |
resultCode | string | * | 成功0,其它参考附录 |
data | object | ? | 返回业务内容 |
seqNo | string | ? | 数据签编号 |
hash | string | ? | 数据签原文哈希 |
contractSignatures | JSONArray | ? | ca信息列表 |
contractSignatures字段结构说明
参数 | 类型 | 是否必返回 | 说明 |
---|---|---|---|
signName | string | * | 证书标识信息/数据签签章人名称 |
idNo | string | ? | 数据签签章人证件号 |
signDate | long | ? | 签约盖章时间 |
signDateFormat | string | ? | 签约盖章时间格式化(yyyy-MM-dd HH:mm:ss.SS) |
validModify | boolean | ? | ca校验结果 |
contractCertificateInfos | JSONArray | * | ca证书列表 |
contractTimeStampInfo | Object | ? | 时间戳信息 |
contractCertificateInfos字段结构说明
参数 | 类型 | 是否必返回 | 说明 |
---|---|---|---|
certificateOwner | string | * | ca证书拥有者 |
certificateIssuer | string | ? | ca证书颁发者 |
certificateBeginTime | long | ? | ca证书有效期开始时间 |
ertificateBeginTimeFormat | string | ? | ca证书有效期开始时间格式化(yyyy-MM-dd HH:mm:ss.SS) |
certificateEndTime | long | ? | ca证书有效期结束时间 |
certificateEndTimeFormat | string | * | ca证书有效期结束时间格式化(yyyy-MM-dd HH:mm:ss.SS) |
sn | string | ? | ca证书序列号 |
contractTimeStampInfo字段结构说明
参数 | 类型 | 是否必返回 | 说明 |
---|---|---|---|
timeStamp | long | * | 时间戳 |
timeStampFormat | string | ? | 时间戳格式化(yyyy-MM-dd HH:mm:ss.SS) |
verified | boolean | ? | 时间戳校验结果 |
contractCertificateInfos | JSONArray | ? | 参照contractCertificateInfos字段结构说明 |
[!NOTE]
返回结果,参考:
//正确响应:
{"data":{"contractSignatures":[{"contractCertificateInfos":[{"certificateBeginTime":1726794725000,"certificateBeginTimeFormat":"2024-09-20 09:12:05.00","certificateEndTime":1758330725000,"certificateEndTimeFormat":"2025-09-20 09:12:05.00","certificateIssuer":"C=CN,O=MCSCA,OU=MCSCA,CN=MCSCA","certificateOwner":"C=CN,O=MCSCA,OU=junziqian,SERIALNUMBER=120108019224456,CN=1513411169224456@02@002","sn":"476b89afcbf59826b54d9c992d06003e"},{"certificateBeginTime":1587721786000,"certificateBeginTimeFormat":"2020-04-24 17:49:46.00","certificateEndTime":2532937786000,"certificateEndTimeFormat":"2050-04-07 17:49:46.00","certificateIssuer":"C=CN=MCSCA ROOT CA","certificateOwner":"C=CN,O=MCSCA,OU=MCSCA,CN=MCSCA","sn":"563b6ebc800b746fafd9c8c15de929b6"},{"certificateBeginTime":1587718984000,"certificateBeginTimeFormat":"2020-04-24 17:03:04.00","certificateEndTime":2533798984000,"certificateEndTimeFormat":"2050-04-17 17:03:04.00","certificateIssuer":"C=CN,O=MCSCA,CN=MCSCA ROOT CA","certificateOwner":"C=CN,O=MCSCA,CN=MCSCA ROOT CA","sn":"7a1efa02e0e96b21a78e5f87044bbe1e"}],"contractTimeStampInfo":{"contractCertificateInfos":[{"certificateBeginTime":1686900268000,"certificateBeginTimeFormat":"2023-06-16 15:24:28.00","certificateEndTime":1781508268000,"certificateEndTimeFormat":"2026-06-15 15:24:28.00","certificateIssuer":"C=CN,O=MCSCA,OU=MCSCA,CN=MCSCA","certificateOwner":"C=CN,O=MCSCA RSA,CN=MCSCATimestamp","sn":"56a02b41123ea238f4ae06c08f358f98"}],"timeStamp":1727335299000,"timeStampFormat":"2024-09-26 15:21:39.00","verified":true},"signDate":1727335299000,"signDateFormat":"2024-09-26 15:21:39.00","signName":"1513411165584338945@马普网络1&120108019224456@02@002","validModify":true},{"contractCertificateInfos":[{"certificateBeginTime":1696042834000,"certificateBeginTimeFormat":"2023-09-30 11:00:34.00","certificateEndTime":1727578834000,"certificateEndTimeFormat":"2024-09-29 11:00:34.00","certificateIssuer":"C=CN,O=MCSCA,OU=MCSCA,CN=MCSCA","certificateOwner":"C=CN,O=MCSCA,OU=junziqian,SERIALNUMBER=9581XR,CN=1513411180581XR@02@1244","sn":"7ab8b2b457f01cb91ae2d678aeb58eff"},{"certificateBeginTime":1587721786000,"certificateBeginTimeFormat":"2020-04-24 17:49:46.00","certificateEndTime":2532937786000,"certificateEndTimeFormat":"2050-04-07 17:49:46.00","certificateIssuer":"C=CN,O=MCSCA,CN=MCSCA ROOT CA","certificateOwner":"C=CN,O=MCSCA,OU=MCSCA,CN=MCSCA","sn":"563b6ebc800b746fafd9c8c15de929b6"},{"certificateBeginTime":1587718984000,"certificateBeginTimeFormat":"2020-04-24 17:03:04.00","certificateEndTime":2533798984000,"certificateEndTimeFormat":"2050-04-17 17:03:04.00","certificateIssuer":"C=CN,O=A ROOT CA","certificateOwner":"C=CN,O=MCSCA,CN=MCSCA ROOT CA","sn":"7a1efa02ee1e"}],"contractTimeStampInfo":{"contractCertificateInfos":[{"certificateBeginTime":1686900268000,"certificateBeginTimeFormat":"2023-06-16 15:24:28.00","certificateEndTime":1781508268000,"certificateEndTimeFormat":"2026-06-15 15:24:28.00","certificateIssuer":"C=CN,O=MCSCA,OU=MCSCA,CN=MCSCA","certificateOwner":"C=CN,O=MCSCA RSA,CN=MCSCATimestamp","sn":"56a02b41123ea238f4ae06c08f358f98"}],"timeStamp":1727335299000,"timeStampFormat":"2024-09-26 15:21:39.00","verified":true},"signDate":1727335299000,"signDateFormat":"2024-09-26 15:21:39.00","signName":"1511244","validModify":true}],"success":true},"success":true}
//错误响应:
{"msg":"app_secret不可用","resultCode":"HTTP_PARAM_ERROR","success":false}