How to get the uploaded Identity verification document via API?

BoldSign allows you to fetch the document uploaded by the signer for identity verification via API. These images are available whether the verification process is successful or fails, and they can only be accessed by the sender.

To retrieve these images, you first need the image file ID associated with the signer-uploaded document. This file ID can be obtained through the Identity Verification Report API, which provides details about the verification process and the associated file IDs. Refer to this for verificaton report.

Once you have the file ID, you can make a request to the Identity Verification Image API to access the images. This ensures you can review and validate the documents submitted by the signer during the verification process.

Below are examples of how to get the uploaded verification document via API:

Code snippet

curl --location 'https://api.boldsign.com/v1-beta/identityVerification/image?documentId={document Id}' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: {your-api-key}' \
--data-raw '{
  "emailId": "alexgayle@cubeflakes.com",
  "order": 1,
  "fileId": "{file Id}"
}'
var apiClient = new ApiClient("https://api.boldsign.com", "{your-api-key}");
var idVerificationClient = new IdVerificationClient(apiClient);

var documentId = "{document Id}";

var verificationImageRequest = new VerificationImageRequest()
{
    EmailId = "alexgayle@cubeflakes.com",
    FileId = "{file Id}",
    Order = 1,
};

var idVerificationImage = idVerificationClient.GetImage(documentId, verificationImageRequest);

import requests
import json

url = "https://api.boldsign.com/v1-beta/identityVerification/image?documentId={document Id}"

payload = {
  "emailId": "alexgayle@cubeflakes.com",
  "order": 1,
  "fileId": "{file Id}"
}
headers = {
  'Content-Type': 'application/json',
  'X-API-KEY': '{your-api-key}'
}

response = requests.request("POST", url, headers=headers, data=json.dumps(payload))

print(response.text)

const axios = require('axios');

const url = "https://api.boldsign.com/v1-beta/identityVerification/image?documentId={document id}";

const payload = {
  emailId: "alexgayle@cubeflakes.com",
  order: 1,
  fileId: "{file Id}"
};

const headers = {
  'Content-Type': 'application/json',
  'X-API-KEY': '{your-api-key}'
};

axios.post(url, payload, { headers })
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    console.error('Error:', error.response.data);
  });
<?php

require 'vendor/autoload.php';

use GuzzleHttp\Client;

$url = 'https://api.boldsign.com/v1-beta/identityVerification/image?documentId={document id}';

$payload = [
    'emailId' => 'alexgayle@cubeflakes.com',
    'order' => 1,
    'fileId' => '{file id}'
];

$headers = [
    'Content-Type' => 'application/json',
    'X-API-KEY' => '{your-api-key}' 
];

$client = new GuzzleHttp\Client([ 'verify' => false, ]);

$response = $client->post($url, [
    'headers' => $headers,
    'json' => $payload
]);

echo $response->getBody()->getContents();
?>

In the provided code example, make sure to replace values for documentId with the ID of the document that you want to fetch the document from. Additionally, provide thefileId with the image file ID of the signer uploaded document, emailId value with the email address of the user for which the report is to be fetched. If signing order was enabled, you can specify the order value to differentiate which order you are getting the report from. Once the codes are executed, verification images will be compiled and downloaded in a zip file.