Developer Centre
Platform LoginStatus
  • Getting started
    • Integration types
    • Generating an authentication token
    • Using basic authentication
  • Applicants
    • Creating an applicant
    • Generating a verification link
    • Uploading documents to an applicant
      • Supported Documents and Types
    • Requesting to start the verification process
  • Applicant Results
    • Retrieving applicant verification results
      • Understanding applicant rejection labels
      • Setting up a webhook
    • Downloading verified documents
  • Entities
    • Check types and coverage
    • Creating an entity
    • Generating a verification link
    • Uploading documents to an entity
      • Supported Documents and Types
    • Linking a UBO to an entity
    • Requesting to start the verification process
  • Entity Results
    • Retrieving entity verification results
      • Understanding entity rejection labels
      • Setting up a webhook
    • Retrieving entity ownership structures
    • Retrieving entity questionnaire answers
  • Anti-Money Laundering
    • Retrieving AML results
  • Database Verification
    • Applicants
      • Verifying applicant identity data
    • Entities
      • Verifying entity information
  • Pages
    • Overview
    • Creating a Page
    • Verifying with Pages
  • Domain Names
    • Overview
    • Linking your domain
  • Flow Logic
    • Overview
  • Workspaces
    • Switching Workspaces
  • Modules
Powered by GitBook
On this page

Was this helpful?

  1. Entities

Uploading 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 entity documents directly via API. 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

Upload a document to an entity, ready for processing.

Name
Value

Content-Type

multipart/form-data

Authorization

Bearer YOUR_TOKEN

Body

Name
Type
Description

applicantId

string

Unique applicantId generated on applicant creation (required)

docSubType

string

The corporate document type - see next page for the different types.(optional)

docFile

string

An accessible URL representing the file being uploaded. (required)

Request

curl -X POST https://enterprise.personr.co/api/1.1/wf/api-entity-document-upload \
    -H "Content-Type: multipart/form-data" \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
    -F "applicantId=4242424242424x424242424242424242" \
    -F "docSubType=Certificate of incorporation" \
    -F "docFile=https://your_document_url.pdf" \
var axios = require('axios');
var FormData = require('form-data');
var fs = require('fs');

var formData = new FormData();

formData.append('applicantId', '4242424242424x424242424242424242');
formData.append('docSubType', 'Certificate of incorporation');
formData.append('docFile', fs.createReadStream('/path/to/your/file.pdf'), 'your_document.pdf');

var config = {
  method: 'post',
  url: 'https://enterprise.personr.co/api/1.1/wf/api-entity-document-upload',
  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.log(error);
});
const url = "https://enterprise.personr.co/api/1.1/wf/api-entity-document-upload";

const payload = {
    applicantId: "4242424242424x424242424242424242",
    docSubType: "Certificate of incorporation",
    docFile: {
        filename: "/path/to/your/file.pdf",
    }
};

    method: "POST",
    headers: {
        "Content-Type": "application/json"
    },
    body: JSON.stringify(payload)
})
.then(response => response.text())
.then(text => console.log(text))
.catch(error => console.error('Error:', error));
require "uri"
require "net/http"

url = URI("https://enterprise.personr.co/api/1.1/wf/api-entity-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\"docSubType\": \"Certificate of incorporation\",\r\n\t\"docFile\": {\r\n\"filename\": \"/path/to/your/file.pdf\",\r\n  }\r\n}"

response = https.request(request)
puts response.read_body
import requests

url = "https://enterprise.personr.co/api/1.1/wf/api-entity-document-upload"

payload = "{\r\n\t\"applicantId\": \"4242424242424x424242424242424242\",\r\n\t\"docSubType\": \"Certificate of incorporation\",\r\n\t\"docFile\": {\r\n\"filename\": \"/path/to/your/file.pdf\",\r\n  }\r\n}"
headers = {}

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

print(response.text)

Response

{
    "applicantId": "4242424242424x424242424242424242",
    "documentSubType": "Certificate of incorporation"
}
{
    "statusCode": 400,
    "message": "Error: invalid applicantId"
}

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.

PreviousGenerating a verification linkNextSupported Documents and Types

Last updated 1 year ago

Was this helpful?