Uploading documents to an applicant
Instead of using a verification link, use this endpoint to upload document images directly via API.
Last updated
Was this helpful?
Was this helpful?
curl --location 'https://enterprise.personr.co/api/1.1/wf/api-document-upload' \
--data '{
"applicantId": "4242424242424x424242424242424242",
"docType": "ID_CARD",
"docSubType": "FRONT_SIDE", // Remove this when docType is SELFIE
"docCountryISO": "AUS",
"docFile": {
"filename": "idcard_australia.jpg",
"contents": "/9j/4AAQSkZJRgABAQAAAQABAAD..."
}
}'var axios = require('axios');
var data = '{\r\n\t"applicantId": "4242424242424x424242424242424242",\r\n\t"docType": "ID_CARD",\r\n "docSubType": "FRONT_SIDE",\r\n\t"docCountryISO": "AUS",\r\n\t"docFile": {\r\n "filename": "idcard_australia.jpg",\r\n "contents": "/9j/4AAQSkZJRgABAQAAAQABAAD..."\r\n }\r\n}';
var config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://enterprise.personr.co/api/1.1/wf/api-document-upload',
headers: { },
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});const url = "https://enterprise.personr.co/api/1.1/wf/api-document-upload";
const payload = {
"applicantId": "4242424242424x424242424242424242",
"docType": "ID_CARD",
"docSubType": "FRONT_SIDE",
"docCountryISO": "AUS",
"docFile": {
"filename": "idcard_australia.jpg",
"contents": "/9j/4AAQSkZJRgABAQAAAQABAAD..."
}
};require "uri"
require "net/http"
url = URI("https://enterprise.personr.co/api/1.1/wf/api-document-upload")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request.body = "{\r\n\t\"applicantId\": \"4242424242424x424242424242424242\",\r\n\t\"docType\": \"ID_CARD\",\r\n \"docSubType\": \"FRONT_SIDE\",\r\n\t\"docCountryISO\": \"AUS\",\r\n\t\"docFile\": {\r\n \"filename\": \"idcard_australia.jpg\",\r\n \"contents\": \"/9j/4AAQSkZJRgABAQAAAQABAAD...\"\r\n }\r\n}"
response = https.request(request)
puts response.read_bodyimport requests
url = "https://enterprise.personr.co/api/1.1/wf/api-document-upload"
payload = "{\r\n\t\"applicantId\": \"4242424242424x424242424242424242\",\r\n\t\"docType\": \"ID_CARD\",\r\n \"docSubType\": \"FRONT_SIDE\",\r\n\t\"docCountryISO\": \"AUS\",\r\n\t\"docFile\": {\r\n \"filename\": \"idcard_australia.jpg\",\r\n \"contents\": \"/9j/4AAQSkZJRgABAQAAAQABAAD...\"\r\n }\r\n}"
headers = {}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text){
"applicantId": "4242424242424x424242424242424242",
"documentType": "ID_CARD",
"documentSubType": "FRONT_SIDE",
"country": "AUS",
"errors": [],
"warnings": []
}{
"statusCode": 400,
"message": "Error: Cannot read docSets - invalid docType provided."
}