Returns the source document file that a certificate attests to
When to use this endpoint
- Use this endpoint to download a source document referenced by a certificate's
sourceDocumentsarray - The document is the artefact whose integrity the certificate preserves (for example the generated session data PDF)
- The
certificateIdandfileIdvalues must be obtained first from GET /v1/sessions//certificates - This endpoint is currently available as part of the Mexico - NOM-151 Certification solution
Getting the identifiers
- Call GET /v1/sessions//certificates to retrieve the session certificates
- Find the certificate
id(thecertificateId) and thesourceDocuments[].id(thefileId) of the document you want to download - Use both identifiers to download the file with this endpoint
Response data
- The endpoint returns a binary file with the
application/pdfContent-Type - The file is returned as binary data in the response body
Implementation notes
- This endpoint requires session-level HMAC signature authentication
- Set appropriate Content-Type handling in your HTTP client to receive binary data
- Always ensure that you use the correct API URL to send requests. See the API URL section for more info
- The order of parameters in the real API response can differ from the order you see in this documentation. This is expected and part of the Backwards compatible changes requirements
How to store response data to file?
import requests
file_url = 'https://example-base-url/v1/sessions/d69a07cf-4434-4d36-be6c-d22af7dc01fb/certificates/27d303bb-6a1f-4c2e-9b1d-2f3a4b5c6d7e/files/a6a27f7a-3c4d-4e5f-8a9b-0c1d2e3f4a5b'
headers = {
'X-AUTH-CLIENT': 'your-api-key',
'X-HMAC-SIGNATURE': '452bfca0e02f8ee0f56d97373cc6971067e43149f1b7e58b681d4e57353a2f6b',
'Content-Type': 'application/json',
}
response = requests.get(file_url, headers=headers)
with open('certificate_source_document.pdf', 'wb') as write_file:
write_file.write(response.content)
Your integration's API key (occasionally referred to as the "Token", "API public key" or "Publishable key"). Required for all API requests.
You can find your API key in the Veriff Customer Portal > Settings > API keys.
Session ID signed with the shared secret key. Required to authenticate the request sender.
Verification session ID.
Certificate ID, obtained from the session certificates list.
Source document ID, obtained from a certificate's sourceDocuments array.
Certificate source document file
Unauthorized
{
"status": "fail",
"code": "1101",
"message": "Mandatory X-AUTH-CLIENT header containing the API key is missing from the request."
}Certificate file not found
{
"status": "fail",
"code": "1101",
"message": "Certificate file not found"
}Internal server error
{
"status": "fail",
"code": "1101",
"message": "Something went wrong"
}Changelog
Date | Description |
|---|---|
Sep 4, 2026 | Documentation created |