Get Evidence Set
Returns the evidence bundle generated during the biometric capture — a package containing the captured images, metadata, and capture artefacts used to prove that liveness detection was performed under controlled conditions.
Only available for completed processes (state = PROCESS_STATE_FINISHED).
Endpoint
| Environment | URL |
|---|---|
| Production | GET https://api.idcloud.unico.app/client/v1/process/{processId}/evidenceset |
| Sandbox | GET https://api.idcloud.uat.unico.app/client/v1/process/{processId}/evidenceset |
Request
| Header | Value |
|---|---|
Authorization | Bearer <access_token> (see Authentication) |
| Parameter | Type | Required | Description |
|---|---|---|---|
processId | string (UUID) | yes | Process identifier returned by Create Process. |
Example
- cURL
- Node.js
curl -X GET https://api.idcloud.unico.app/client/v1/process/$PROCESS_ID/evidenceset \
-H "Authorization: Bearer $TOKEN" \
| jq -r .fileContents | base64 --decode > evidence-set.pdf
import { writeFile } from 'node:fs/promises';
async function getEvidenceSet(processId) {
const response = await fetch(
`https://api.idcloud.unico.app/client/v1/process/${processId}/evidenceset`,
{ headers: { Authorization: `Bearer ${accessToken}` } }
);
if (!response.ok) throw new Error(`Get Evidence Set failed with ${response.status}`);
const { fileContents } = await response.json();
// fileContents is the PDF file, base64-encoded
return Buffer.from(fileContents, 'base64');
}
// Save the PDF to disk
await writeFile(`evidence-set-${processId}.pdf`, await getEvidenceSet(processId));
// Or send it to the browser (Express)
app.get('/processes/:id/evidence-set', async (req, res) => {
const pdf = await getEvidenceSet(req.params.id);
res
.type('application/pdf') // don't forward contentType: the API returns "x-pdf"
.set('Content-Disposition', 'inline; filename="evidence-set.pdf"')
.send(pdf);
});
Responses
{
"fileContents": "JVBERi0xLjMNCi...",
"contentType": "x-pdf"
}
| Field | Type | Description |
|---|---|---|
fileContents | string (base64) | The evidence set PDF, base64-encoded. |
contentType | string | Currently returns x-pdf. |
x-pdf is not a valid MIME type, and browsers don't recognize it. Don't forward contentType to the browser. Decode fileContents from base64 and serve the bytes as application/pdf, as in the Node.js example above.
Error Codes
The API does not expose specific code or message values for this endpoint.
- 400 Bad Request
- 401 Unauthorized
- 404 Not Found
- 500 Internal Server Error
The processId path parameter is missing or malformed.
Bearer token missing, expired, or invalid. See Authentication.
Process not found, or the evidence set is not yet available (process not finished).
| Code | Message | Description |
|---|---|---|
99999 | Internal failure! Try again later | When there is an internal error. |
What's next
- For the full process result, see Get Process.
- For the captured selfie image, see Get Selfie.