साक्ष्य सेट प्राप्त करें
बायोमेट्रिक कैप्चर के दौरान उत्पन्न साक्ष्य बंडल लौटाता है — एक पैकेज जिसमें कैप्चर की गई छवियां, मेटाडेटा, और कैप्चर artifacts शामिल हैं जो यह साबित करने के लिए उपयोग किए जाते हैं कि liveness detection नियंत्रित परिस्थितियों में किया गया था।
केवल पूर्ण प्रक्रियाओं (state = PROCESS_STATE_FINISHED) के लिए उपलब्ध।
Endpoint
| वातावरण | 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 | मान |
|---|---|
Authorization | Bearer <access_token> (देखें Authentication) |
| Parameter | Type | Required | विवरण |
|---|---|---|---|
processId | string (UUID) | हाँ | Create Process द्वारा लौटाया गया प्रक्रिया identifier। |
उदाहरण
- 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 PDF फ़ाइल है, base64-एन्कोडेड
return Buffer.from(fileContents, 'base64');
}
// PDF को डिस्क पर सेव करें
await writeFile(`evidence-set-${processId}.pdf`, await getEvidenceSet(processId));
// या इसे ब्राउज़र पर भेजें (Express)
app.get('/processes/:id/evidence-set', async (req, res) => {
const pdf = await getEvidenceSet(req.params.id);
res
.type('application/pdf') // contentType को फॉरवर्ड न करें: API "x-pdf" रिटर्न करता है
.set('Content-Disposition', 'inline; filename="evidence-set.pdf"')
.send(pdf);
});
Responses
{
"fileContents": "JVBERi0xLjMNCi...",
"contentType": "x-pdf"
}
| Field | Type | विवरण |
|---|---|---|
fileContents | string (base64) | साक्ष्य सेट PDF, base64-encoded। |
contentType | string | वर्तमान में x-pdf रिटर्न करता है। |
x-pdf एक वैध MIME type नहीं है, और ब्राउज़र इसे पहचानते नहीं हैं। contentType को ब्राउज़र पर फॉरवर्ड न करें। fileContents को base64 से डिकोड करें और bytes को application/pdf के रूप में सर्व करें, जैसा ऊपर Node.js उदाहरण में दिखाया गया है।
Error Codes
इस endpoint के लिए API विशिष्ट code या message मान प्रकट नहीं करता।
- 400 Bad Request
- 401 Unauthorized
- 404 Not Found
- 500 Internal Server Error
processId path parameter गायब है या गलत रूप में है। नीचे Error Codes देखें।
Bearer token गायब, समाप्त, या अमान्य है। देखें Authentication।
प्रक्रिया नहीं मिली, या साक्ष्य सेट अभी उपलब्ध नहीं है (प्रक्रिया पूर्ण नहीं हुई)।
| Code | Message | विवरण |
|---|---|---|
99999 | Internal failure! Try again later | जब कोई internal error हो। |
आगे क्या है
- पूर्ण प्रक्रिया परिणाम के लिए, देखें Get Process।
- कैप्चर की गई selfie छवि के लिए, देखें Get Selfie।