获取证据集
返回在生物特征采集过程中生成的证据包 — 该包含采集图像、元数据及采集工件,用于证明活体检测是在受控条件下进行的。
仅适用于已完成的流程(state = PROCESS_STATE_FINISHED)。
端点
| 环境 | URL |
|---|---|
| 生产环境 | GET https://api.idcloud.unico.app/client/v1/process/{processId}/evidenceset |
| 沙箱环境 | GET https://api.idcloud.uat.unico.app/client/v1/process/{processId}/evidenceset |
请求
请求 头
| 请求头 | 值 |
|---|---|
Authorization | Bearer <access_token>(参见身份验证) |
路径参数
| 参数 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
processId | string (UUID) | 是 | 由创建流程返回的流程标识符。 |
示例
- cURL
- Node.js
curl -X GET https://api.idcloud.unico.app/client/v1/process/$PROCESS_ID/evidenceset \
-H "Authorization: Bearer $TOKEN"
import fetch from 'node-fetch';
const res = await fetch(
`https://api.idcloud.unico.app/client/v1/process/${processId}/evidenceset`,
{ headers: { Authorization: `Bearer ${accessToken}` } }
);
const { fileContents, contentType } = await res.json();
// fileContents is a base64-encoded PDF bundle
响应
200 OK
{
"fileContents": "JVBERi0xLjMNCi...",
"contentType": "application/pdf"
}
| 字段 | 类型 | 描述 |
|---|---|---|
fileContents | string (base64) | base64 编码的证据包。 |
contentType | string | MIME 类型 — 通常为 application/pdf。 |
400 Bad Request
processId 路径参数缺失或格式错误。请参阅下方的错误代码。
401 Unauthorized
Bearer token 缺失、已过期或无效。请参阅身份验证。
404 Not Found
流程未找到,或证据集尚未可用 (流程未完成)。
错误代码
备注
该端点的 API 未公开具体的 code 或 message 值。
- 400 Bad Request
- 401 Unauthorized
- 404 Not Found
- 500 Internal Server Error
此状态码没有文档记录的具体 code 或 message 值。
此状态码没有文档记录的具体 code 或 message 值。
此状态码没有文档记录的具体 code 或 message 值。
| 代码 | 消息 | 描述 |
|---|---|---|
99999 | Internal failure! Try again later | 发生内部错误时。 |