Uploading documents to an applicant

Instead of using a verification link, use this endpoint to upload document images directly via API.

This endpoint allows you to upload document and selfie images 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 applicants using a verification link.

Each call can only receive one document. If you're uploading double-sided documents, make sure to send FRONT_SIDE and BACK_SIDE in the docSubType parameter. Verifications won't proceed until all required document images, sides and/or selfie images are uploaded - if applicable to your chosen flow.


Upload documents to your applicant

POST /api-document-upload

Upload documents in base64 format to your applicant, ready for processing.

Body

docFile fields

Request

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..."
    }
}'

You must upload all required documents for your chosen Flow, otherwise the verification won't proceed. For example, if your Flow requires one identity document and a selfie, you'll need to upload the FRONT_SIDE and BACK_SIDE of the identity document and a selfie image in three separate endpoint calls.

Response

{
    "applicantId": "4242424242424x424242424242424242",
    "documentType": "ID_CARD",
    "documentSubType": "FRONT_SIDE",
    "country": "AUS",
    "errors": [],
    "warnings": []
}

Once all required documents and selfie images have been uploaded for your chosen flow, head to Requesting to start the verification process to confirm everything has been uploaded, and to start the verification check.

Last updated