接口文档· 更新于 2026-11-26
创建合合合同比对任务
POST
/openapi/qxb/external/enterprise/heheTec/cnt/comparison启信宝外部服务转发接口;上游原始路径:/enterprise/heheTec/cnt/comparison;来源 Controller:HeHeCntAndDocController
请求地址
生产环境
https://open.gch168.com/openapi/qxb/external/enterprise/heheTec/cnt/comparison- 请求方式
- POST
- 内容类型
- application/json
- 传输安全
- TLS 1.2 及以上
支持的鉴权方式
查看接入认证说明 →以下任一鉴权方式通过即可调用,签名细节与凭证获取请查看接入说明。
Header 签名(普通开放接口)API_KEY
通过 ApiKey、客户号或企业号识别租户,并对时间戳、随机串进行 MD5 签名校验,适用于绝大多数普通开放接口。
Sign = MD5(secretKey + timestamp + nonceStr),签名比较忽略大小写
请求头
公共请求头 →| 请求头 | 必填 | 类型 | 示例值 | 说明 |
|---|---|---|---|---|
| appKey | 必填 | string | 2cf51b5009db4d29b00b038c8cc3a6d6 | 调用方启信宝转发应用密钥 |
| timestamp | 必填 | string | 1716345600 | 请求时间戳,支持秒级或毫秒级 |
| sign | 必填 | string | md5-sign |
请求参数
| 参数名 | 位置 | 类型 | 必填 | 示例值 | 说明 |
|---|---|---|---|---|---|
creator | BODY | string | 选填 | creatorValue | 创建人 |
token_mode | BODY | integer | 选填 | 1001 | 是否启用预览令牌认证模式,1为启用 |
convert_arg | BODY | object | 选填 | {} | 文档处理所需参数 |
remove_comments | BODY | integer | 选填 | 1001 | 是否删除批注,1为删除,0不删除,只支持Word文档 |
remove_headerfooter | BODY | integer | 选填 | 1001 | 是否删除页眉页脚,1为删除,0不删除,只支持Word文档 |
remove_stamp | BODY | integer | 选填 | 1001 | 是否移除印章,1移除,0不移除 |
remove_symbol | BODY | integer | 选填 | 1001 | 是否忽略标点符号,1为忽略,0不忽略 |
merge_diff | BODY | integer | 选填 | 1001 | 是否合并差异,1为合并,0不合并,默认合并 |
ignored_symbols | BODY | string | 选填 | ignored_symbolsValue | remove_symbol为1时生效,指定需要忽略的符号 |
standard_doc | BODY | array | 必填 | [{}] | 标准文档,数组长度限制为1 |
filedata | BODY | string | 必填 | filedataValue | 文件base64或在线文件URL链接 |
filename | BODY | string | 必填 | filenameValue | 文件名,长度不得超过255个字符 |
compare_doc | BODY | array | 必填 | [{}] | 被比对文档,数组长度为n |
filedata | BODY | string | 必填 | filedataValue | 文件base64或在线文件URL链接 |
filename | BODY | string | 必填 | filenameValue | 文件名,长度不得超过255个字符 |
config | BODY | object | 选填 | {} | 解析文档配置 |
use_pdf_parser | BODY | string | 选填 | use_pdf_parserValue | 是否使用PDF解析,传\ |
remove_watermark | BODY | string | 选填 | remove_watermarkValue | 非电子档是否使用水印擦除引擎,默认\ |
响应参数
业务成功时返回 code = 200,其余状态码见下方接口状态码与全局状态码。
| 字段名 | 类型 | 示例值 | 说明 |
|---|---|---|---|
code | integer | 200 | TextIn 第三方响应码 |
msg | string | success | TextIn 第三方响应消息 |
data | object | {} | 合同比对创建任务结果 |
preview_url | string | https://example.com/preview | 浏览器预览页面地址 |
task_id | string | task-id-001 | 合同比对任务 ID |
diff_info_url | string | https://example.com/diff | 比对详情接口地址 |
similarity_url | string | https://example.com/similarity | 相似度接口地址 |
状态码
全局状态码 →| 状态码 | 说明 |
|---|---|
| 200 | 请求成功 |
| 5001 | 接口服务未开通、请求过期或用量校验失败 |
| 5002 | 启信宝转发鉴权参数或签名校验失败 |
请求与响应示例
请求示例
请求示例
{
"creator": "creatorValue",
"token_mode": 1001,
"convert_arg": {
"remove_comments": 1001,
"remove_headerfooter": 1001,
"remove_stamp": 1001,
"remove_symbol": 1001,
"merge_diff": 1001,
"ignored_symbols": "ignored_symbolsValue"
},
"standard_doc": [
{
"filedata": "filedataValue",
"filename": "filenameValue"
}
],
"compare_doc": [
{
"filedata": "filedataValue",
"filename": "filenameValue"
}
],
"config": {
"use_pdf_parser": "use_pdf_parserValue",
"remove_watermark": "remove_watermarkValue"
}
}响应示例
响应示例
{
"code": 200,
"msg": "success",
"data": {
"preview_url": "https://example.com/preview",
"task_id": "task-id-001",
"diff_info_url": "https://example.com/diff",
"similarity_url": "https://example.com/similarity"
}
}