curl --request POST \
--url https://api.lendflow.com/api/applications/{application_id}/document_verifications \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form service=persona \
--form verification=government-id \
--form personal_information_id=16 \
--form type=passport \
--form front_photo=@example-file \
--form back_photo=@example-file \
--form self_portrait=@example-file \
--form document=@example-fileimport requests
url = "https://api.lendflow.com/api/applications/{application_id}/document_verifications"
files = {
"front_photo": ("example-file", open("example-file", "rb")),
"back_photo": ("example-file", open("example-file", "rb")),
"self_portrait": ("example-file", open("example-file", "rb")),
"document": ("example-file", open("example-file", "rb"))
}
payload = {
"service": "persona",
"verification": "government-id",
"personal_information_id": "16",
"type": "passport"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('service', 'persona');
form.append('verification', 'government-id');
form.append('personal_information_id', '16');
form.append('type', 'passport');
form.append('front_photo', '<string>');
form.append('back_photo', '<string>');
form.append('self_portrait', '<string>');
form.append('document', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.lendflow.com/api/applications/{application_id}/document_verifications', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lendflow.com/api/applications/{application_id}/document_verifications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"service\"\r\n\r\npersona\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"verification\"\r\n\r\ngovernment-id\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"personal_information_id\"\r\n\r\n16\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\npassport\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"front_photo\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"back_photo\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"self_portrait\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lendflow.com/api/applications/{application_id}/document_verifications"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"service\"\r\n\r\npersona\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"verification\"\r\n\r\ngovernment-id\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"personal_information_id\"\r\n\r\n16\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\npassport\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"front_photo\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"back_photo\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"self_portrait\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.lendflow.com/api/applications/{application_id}/document_verifications")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"service\"\r\n\r\npersona\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"verification\"\r\n\r\ngovernment-id\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"personal_information_id\"\r\n\r\n16\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\npassport\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"front_photo\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"back_photo\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"self_portrait\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lendflow.com/api/applications/{application_id}/document_verifications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"service\"\r\n\r\npersona\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"verification\"\r\n\r\ngovernment-id\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"personal_information_id\"\r\n\r\n16\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\npassport\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"front_photo\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"back_photo\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"self_portrait\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"data": {
"id": null,
"service": "persona",
"verification": "government-id",
"created_at": null,
"updated_at": null,
"processed_at": null,
"submitted_at": null,
"received_at": null,
"passed_at": null,
"failed_at": null,
"has_passed": false,
"has_failed": false,
"errored_at": null,
"error": null,
"error_status_code": null,
"document_type": null
}
}Create Document Verification
Verify a document against a 3rd party service. Currently supports Persona’s government ID verification, Inscribe document verification and Socure’s government ID verification.
The service ("persona") and verification at that service ("government-id")
must be specified, along with all attributes needed to satisfy the verification.
For Persona’s Government ID verification the following additional request parameters are required:
verification=government-idtype(state_id/passport/drivers_license)front_photoback_photo(this is optional, but helps with verification)
For Inscribe document verification the following additional request parameters are required:
verification=documentdocumenttype(drivers_license/social_security_card/bank_statement/payslip/tax_form/invoice/utility_bill/check/business_filing/financial_statement/unknown)
For Socure’s Government ID verification the following additional request parameters are required:
verification=government-idtype(state_id/passport/drivers_license)front_photoback_photo(this is optional, but helps with verification)self_portrait(this is optional, but helps with verification)
curl --request POST \
--url https://api.lendflow.com/api/applications/{application_id}/document_verifications \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form service=persona \
--form verification=government-id \
--form personal_information_id=16 \
--form type=passport \
--form front_photo=@example-file \
--form back_photo=@example-file \
--form self_portrait=@example-file \
--form document=@example-fileimport requests
url = "https://api.lendflow.com/api/applications/{application_id}/document_verifications"
files = {
"front_photo": ("example-file", open("example-file", "rb")),
"back_photo": ("example-file", open("example-file", "rb")),
"self_portrait": ("example-file", open("example-file", "rb")),
"document": ("example-file", open("example-file", "rb"))
}
payload = {
"service": "persona",
"verification": "government-id",
"personal_information_id": "16",
"type": "passport"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('service', 'persona');
form.append('verification', 'government-id');
form.append('personal_information_id', '16');
form.append('type', 'passport');
form.append('front_photo', '<string>');
form.append('back_photo', '<string>');
form.append('self_portrait', '<string>');
form.append('document', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.lendflow.com/api/applications/{application_id}/document_verifications', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lendflow.com/api/applications/{application_id}/document_verifications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"service\"\r\n\r\npersona\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"verification\"\r\n\r\ngovernment-id\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"personal_information_id\"\r\n\r\n16\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\npassport\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"front_photo\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"back_photo\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"self_portrait\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lendflow.com/api/applications/{application_id}/document_verifications"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"service\"\r\n\r\npersona\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"verification\"\r\n\r\ngovernment-id\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"personal_information_id\"\r\n\r\n16\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\npassport\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"front_photo\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"back_photo\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"self_portrait\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.lendflow.com/api/applications/{application_id}/document_verifications")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"service\"\r\n\r\npersona\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"verification\"\r\n\r\ngovernment-id\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"personal_information_id\"\r\n\r\n16\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\npassport\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"front_photo\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"back_photo\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"self_portrait\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lendflow.com/api/applications/{application_id}/document_verifications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"service\"\r\n\r\npersona\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"verification\"\r\n\r\ngovernment-id\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"personal_information_id\"\r\n\r\n16\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\npassport\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"front_photo\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"back_photo\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"self_portrait\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"data": {
"id": null,
"service": "persona",
"verification": "government-id",
"created_at": null,
"updated_at": null,
"processed_at": null,
"submitted_at": null,
"received_at": null,
"passed_at": null,
"failed_at": null,
"has_passed": false,
"has_failed": false,
"errored_at": null,
"error": null,
"error_status_code": null,
"document_type": null
}
}Authorizations
You can register for a new Lendflow API key on our client portal in less than 60 seconds. The Bearer Token needs to be included in all API requests made to the API Service in the following form:
Path Parameters
The ID of the application.
Body
A supported verification service identifier.
"persona"
A verification to perform against the service.
"government-id"
The ID of the personal information record (business owner) the verification should be tied to.
16
The type of document to verify.
"passport"
A picture of the front of the ID (must be of type jpg, png, heic, bmp, gif or pdf) or an id of already uploaded file.
A picture of the back of the ID (must be of type jpg, png, heic, bmp, gif or pdf) or an id of already uploaded file.
A picture of the self portrait (must be of type jpg, png, heic, or pdf) or an id of already uploaded file.
A document to be verified (must be of type jpg, png, heic, or pdf) or an id of already uploaded file.
Response
Show child attributes
Show child attributes
Was this page helpful?