Uploading encoded documents to an entity
Instead of using a verification link, use this endpoint to upload documents directly via API.
This endpoint allows you to upload base64 encoded entity documents directly via API, instead of using a URL. You may want to do this to fully customise the look and feel of the verification process within your website or application.
Note: You don't need to use this endpoint if you're verifying entities using a verification link.
Each call can only receive one document. Make sure to send the necessary data in the docSubType parameter.
Upload documents to your applicant
POST /api-entity-document-upload-encoded
Upload a base64 encoded document to an entity, ready for processing.
Content-Type
multipart/form-data
Authorization
Bearer YOUR_TOKEN
Body
applicantId
string
Unique applicantId generated on applicant creation (required)
docSubType
string
The corporate document type - see next page for the different types.(optional)
fileName
string
The name of the file, including the extension (.jpg, .jpeg, .png, and .pdf) (required)
Request
curl -X POST https://enterprise.personr.co/api/1.1/wf/api-entity-document-upload-encoded \
-H "Content-Type: multipart/form-data" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-F "applicantId=4242424242424x424242424242424242" \
-F "docSubType=Certificate of incorporation" \
-F "fileName=document.pdf" \
-F "docFile=/9j/4AAQSkZJRgABAQAAAQABAAD..." \const axios = require('axios');
const FormData = require('form-data');
const formData = new FormData();
const base64FileContent = '/9j/4AAQSkZJRgABAQAAAQABAAD...';
formData.append('applicantId', '4242424242424x424242424242424242');
formData.append('docSubType', 'Certificate of incorporation');
formData.append('fileName', 'document.pdf');
formData.append('docFile', base64FileContent);
const config = {
method: 'post',
url: 'https://enterprise.personr.co/api/1.1/wf/api-entity-document-upload-encoded',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
...formData.getHeaders(),
},
data: formData,
maxBodyLength: Infinity,
maxContentLength: Infinity,
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.error(error);
});Response
Once all required documents have been uploaded, head toRequesting to start the verification processto confirm everything has been uploaded, and to start the verification check.
Last updated
Was this helpful?