curl --request PATCH \
--url https://api.sandbox.lead.bank/v0/entities/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"type": "individual",
"intended_roles": "Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided",
"individual_details": {
"first_name": "Lucy",
"preferred_first_name": "Lu",
"middle_name": "Reginald",
"last_name": "Collins",
"date_of_birth": "2002-02-15",
"occupation": "Author",
"contact_methods": [
{
"type": "email",
"email": "abc@gmail.com"
}
],
"address_details": {
"physical_address": {
"line_1": "<string>",
"line_2": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "<string>",
"country": "<string>"
},
"mailing_address": {
"line_1": "<string>",
"line_2": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "<string>",
"country": "<string>"
},
"other_addresses": [
{
"line_1": "123 Main St.",
"city": "Denver",
"country": "US",
"line_2": "Apt 25",
"postal_code": 80014,
"state": "CO"
}
]
},
"identification_details": {
"type": "us_entity",
"identification_documents": [
{
"identification_number": "<string>",
"issuing_country": "<string>",
"client_document_id": "<string>",
"description": "<string>",
"expiration_date": "2023-12-25",
"issuing_state": "<string>"
}
]
},
"additional_documents": [
{
"client_document_id": "<string>",
"description": "<string>"
}
]
},
"credit_details": [
{
"credit_pulled_at": "2023-11-07T05:31:56Z",
"credit_score": "<string>"
}
],
"metadata": {}
}
'import requests
url = "https://api.sandbox.lead.bank/v0/entities/{id}"
payload = {
"type": "individual",
"intended_roles": "Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided",
"individual_details": {
"first_name": "Lucy",
"preferred_first_name": "Lu",
"middle_name": "Reginald",
"last_name": "Collins",
"date_of_birth": "2002-02-15",
"occupation": "Author",
"contact_methods": [
{
"type": "email",
"email": "abc@gmail.com"
}
],
"address_details": {
"physical_address": {
"line_1": "<string>",
"line_2": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "<string>",
"country": "<string>"
},
"mailing_address": {
"line_1": "<string>",
"line_2": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "<string>",
"country": "<string>"
},
"other_addresses": [
{
"line_1": "123 Main St.",
"city": "Denver",
"country": "US",
"line_2": "Apt 25",
"postal_code": 80014,
"state": "CO"
}
]
},
"identification_details": {
"type": "us_entity",
"identification_documents": [
{
"identification_number": "<string>",
"issuing_country": "<string>",
"client_document_id": "<string>",
"description": "<string>",
"expiration_date": "2023-12-25",
"issuing_state": "<string>"
}
]
},
"additional_documents": [
{
"client_document_id": "<string>",
"description": "<string>"
}
]
},
"credit_details": [
{
"credit_pulled_at": "2023-11-07T05:31:56Z",
"credit_score": "<string>"
}
],
"metadata": {}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
type: 'individual',
intended_roles: 'Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided',
individual_details: {
first_name: 'Lucy',
preferred_first_name: 'Lu',
middle_name: 'Reginald',
last_name: 'Collins',
date_of_birth: '2002-02-15',
occupation: 'Author',
contact_methods: [{type: 'email', email: 'abc@gmail.com'}],
address_details: {
physical_address: {
line_1: '<string>',
line_2: '<string>',
city: '<string>',
postal_code: '<string>',
state: '<string>',
country: '<string>'
},
mailing_address: {
line_1: '<string>',
line_2: '<string>',
city: '<string>',
postal_code: '<string>',
state: '<string>',
country: '<string>'
},
other_addresses: [
{
line_1: '123 Main St.',
city: 'Denver',
country: 'US',
line_2: 'Apt 25',
postal_code: 80014,
state: 'CO'
}
]
},
identification_details: {
type: 'us_entity',
identification_documents: [
{
identification_number: '<string>',
issuing_country: '<string>',
client_document_id: '<string>',
description: '<string>',
expiration_date: '2023-12-25',
issuing_state: '<string>'
}
]
},
additional_documents: [{client_document_id: '<string>', description: '<string>'}]
},
credit_details: [{credit_pulled_at: '2023-11-07T05:31:56Z', credit_score: '<string>'}],
metadata: {}
})
};
fetch('https://api.sandbox.lead.bank/v0/entities/{id}', 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.sandbox.lead.bank/v0/entities/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'individual',
'intended_roles' => 'Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided',
'individual_details' => [
'first_name' => 'Lucy',
'preferred_first_name' => 'Lu',
'middle_name' => 'Reginald',
'last_name' => 'Collins',
'date_of_birth' => '2002-02-15',
'occupation' => 'Author',
'contact_methods' => [
[
'type' => 'email',
'email' => 'abc@gmail.com'
]
],
'address_details' => [
'physical_address' => [
'line_1' => '<string>',
'line_2' => '<string>',
'city' => '<string>',
'postal_code' => '<string>',
'state' => '<string>',
'country' => '<string>'
],
'mailing_address' => [
'line_1' => '<string>',
'line_2' => '<string>',
'city' => '<string>',
'postal_code' => '<string>',
'state' => '<string>',
'country' => '<string>'
],
'other_addresses' => [
[
'line_1' => '123 Main St.',
'city' => 'Denver',
'country' => 'US',
'line_2' => 'Apt 25',
'postal_code' => 80014,
'state' => 'CO'
]
]
],
'identification_details' => [
'type' => 'us_entity',
'identification_documents' => [
[
'identification_number' => '<string>',
'issuing_country' => '<string>',
'client_document_id' => '<string>',
'description' => '<string>',
'expiration_date' => '2023-12-25',
'issuing_state' => '<string>'
]
]
],
'additional_documents' => [
[
'client_document_id' => '<string>',
'description' => '<string>'
]
]
],
'credit_details' => [
[
'credit_pulled_at' => '2023-11-07T05:31:56Z',
'credit_score' => '<string>'
]
],
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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.sandbox.lead.bank/v0/entities/{id}"
payload := strings.NewReader("{\n \"type\": \"individual\",\n \"intended_roles\": \"Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided\",\n \"individual_details\": {\n \"first_name\": \"Lucy\",\n \"preferred_first_name\": \"Lu\",\n \"middle_name\": \"Reginald\",\n \"last_name\": \"Collins\",\n \"date_of_birth\": \"2002-02-15\",\n \"occupation\": \"Author\",\n \"contact_methods\": [\n {\n \"type\": \"email\",\n \"email\": \"abc@gmail.com\"\n }\n ],\n \"address_details\": {\n \"physical_address\": {\n \"line_1\": \"<string>\",\n \"line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"mailing_address\": {\n \"line_1\": \"<string>\",\n \"line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"other_addresses\": [\n {\n \"line_1\": \"123 Main St.\",\n \"city\": \"Denver\",\n \"country\": \"US\",\n \"line_2\": \"Apt 25\",\n \"postal_code\": 80014,\n \"state\": \"CO\"\n }\n ]\n },\n \"identification_details\": {\n \"type\": \"us_entity\",\n \"identification_documents\": [\n {\n \"identification_number\": \"<string>\",\n \"issuing_country\": \"<string>\",\n \"client_document_id\": \"<string>\",\n \"description\": \"<string>\",\n \"expiration_date\": \"2023-12-25\",\n \"issuing_state\": \"<string>\"\n }\n ]\n },\n \"additional_documents\": [\n {\n \"client_document_id\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n },\n \"credit_details\": [\n {\n \"credit_pulled_at\": \"2023-11-07T05:31:56Z\",\n \"credit_score\": \"<string>\"\n }\n ],\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.sandbox.lead.bank/v0/entities/{id}")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"individual\",\n \"intended_roles\": \"Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided\",\n \"individual_details\": {\n \"first_name\": \"Lucy\",\n \"preferred_first_name\": \"Lu\",\n \"middle_name\": \"Reginald\",\n \"last_name\": \"Collins\",\n \"date_of_birth\": \"2002-02-15\",\n \"occupation\": \"Author\",\n \"contact_methods\": [\n {\n \"type\": \"email\",\n \"email\": \"abc@gmail.com\"\n }\n ],\n \"address_details\": {\n \"physical_address\": {\n \"line_1\": \"<string>\",\n \"line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"mailing_address\": {\n \"line_1\": \"<string>\",\n \"line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"other_addresses\": [\n {\n \"line_1\": \"123 Main St.\",\n \"city\": \"Denver\",\n \"country\": \"US\",\n \"line_2\": \"Apt 25\",\n \"postal_code\": 80014,\n \"state\": \"CO\"\n }\n ]\n },\n \"identification_details\": {\n \"type\": \"us_entity\",\n \"identification_documents\": [\n {\n \"identification_number\": \"<string>\",\n \"issuing_country\": \"<string>\",\n \"client_document_id\": \"<string>\",\n \"description\": \"<string>\",\n \"expiration_date\": \"2023-12-25\",\n \"issuing_state\": \"<string>\"\n }\n ]\n },\n \"additional_documents\": [\n {\n \"client_document_id\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n },\n \"credit_details\": [\n {\n \"credit_pulled_at\": \"2023-11-07T05:31:56Z\",\n \"credit_score\": \"<string>\"\n }\n ],\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v0/entities/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"individual\",\n \"intended_roles\": \"Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided\",\n \"individual_details\": {\n \"first_name\": \"Lucy\",\n \"preferred_first_name\": \"Lu\",\n \"middle_name\": \"Reginald\",\n \"last_name\": \"Collins\",\n \"date_of_birth\": \"2002-02-15\",\n \"occupation\": \"Author\",\n \"contact_methods\": [\n {\n \"type\": \"email\",\n \"email\": \"abc@gmail.com\"\n }\n ],\n \"address_details\": {\n \"physical_address\": {\n \"line_1\": \"<string>\",\n \"line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"mailing_address\": {\n \"line_1\": \"<string>\",\n \"line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"other_addresses\": [\n {\n \"line_1\": \"123 Main St.\",\n \"city\": \"Denver\",\n \"country\": \"US\",\n \"line_2\": \"Apt 25\",\n \"postal_code\": 80014,\n \"state\": \"CO\"\n }\n ]\n },\n \"identification_details\": {\n \"type\": \"us_entity\",\n \"identification_documents\": [\n {\n \"identification_number\": \"<string>\",\n \"issuing_country\": \"<string>\",\n \"client_document_id\": \"<string>\",\n \"description\": \"<string>\",\n \"expiration_date\": \"2023-12-25\",\n \"issuing_state\": \"<string>\"\n }\n ]\n },\n \"additional_documents\": [\n {\n \"client_document_id\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n },\n \"credit_details\": [\n {\n \"credit_pulled_at\": \"2023-11-07T05:31:56Z\",\n \"credit_score\": \"<string>\"\n }\n ],\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"type": "individual",
"client_customer_id": "<string>",
"intended_roles": "Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided",
"individual_details": {
"first_name": "<string>",
"last_name": "<string>",
"identification_details": {
"type": "us_entity",
"tax_identification": {
"value": "<string>"
},
"identification_documents": [
{
"identification_number": "<string>",
"issuing_country": "<string>",
"client_document_id": "<string>",
"description": "<string>",
"expiration_date": "2023-12-25",
"issuing_state": "<string>"
}
]
},
"preferred_first_name": "<string>",
"middle_name": "<string>",
"date_of_birth": "2002-02-15",
"occupation": "<string>",
"contact_methods": [
{
"type": "email",
"email": "abc@gmail.com"
}
],
"address_details": {
"physical_address": {
"line_1": "123 Main St.",
"city": "Denver",
"country": "US",
"line_2": "Apt 25",
"postal_code": 80014,
"state": "CO"
},
"mailing_address": {
"line_1": "123 Main St.",
"city": "Denver",
"country": "US",
"line_2": "Apt 25",
"postal_code": 80014,
"state": "CO"
},
"other_addresses": [
{
"line_1": "123 Main St.",
"city": "Denver",
"country": "US",
"line_2": "Apt 25",
"postal_code": 80014,
"state": "CO"
}
]
},
"additional_documents": [
{
"client_document_id": "<string>",
"description": "<string>"
}
]
},
"rfi_details": {
"requested_at": "2023-11-07T05:31:56Z"
},
"ofac_details": {
"screened_at": "2023-11-07T05:31:56Z"
},
"kyc_details": {
"screened_at": "2023-11-07T05:31:56Z"
},
"credit_details": [
{
"credit_pulled_at": "2023-11-07T05:31:56Z",
"credit_score": "<string>"
}
],
"role_details": [
{
"status": "active",
"criteria_details": [
{
"failed_checks": [
"<string>"
],
"entity_id": "<string>"
}
]
}
],
"metadata": {}
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}Update an Entity
Certain updates on Entity trigger KYC re-screening, requiring an updated kyc_details.result and kyc_details.screened_at.
For individual entities, KYC re-screening is triggered by changes to: first name, last name, date of birth, tax ID (for US entities), existing identification document (for non-US entities), and switching between US vs. non-US entities.
For business and sole proprietorship entities, KYC re-screening is triggered by changes to: business name, business type, tax ID (US entities), and existing identification document (non-US entities).
Note: Business and sole proprietors cannot switch between US and non-US entities. A new entity must be created in such case.
curl --request PATCH \
--url https://api.sandbox.lead.bank/v0/entities/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"type": "individual",
"intended_roles": "Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided",
"individual_details": {
"first_name": "Lucy",
"preferred_first_name": "Lu",
"middle_name": "Reginald",
"last_name": "Collins",
"date_of_birth": "2002-02-15",
"occupation": "Author",
"contact_methods": [
{
"type": "email",
"email": "abc@gmail.com"
}
],
"address_details": {
"physical_address": {
"line_1": "<string>",
"line_2": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "<string>",
"country": "<string>"
},
"mailing_address": {
"line_1": "<string>",
"line_2": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "<string>",
"country": "<string>"
},
"other_addresses": [
{
"line_1": "123 Main St.",
"city": "Denver",
"country": "US",
"line_2": "Apt 25",
"postal_code": 80014,
"state": "CO"
}
]
},
"identification_details": {
"type": "us_entity",
"identification_documents": [
{
"identification_number": "<string>",
"issuing_country": "<string>",
"client_document_id": "<string>",
"description": "<string>",
"expiration_date": "2023-12-25",
"issuing_state": "<string>"
}
]
},
"additional_documents": [
{
"client_document_id": "<string>",
"description": "<string>"
}
]
},
"credit_details": [
{
"credit_pulled_at": "2023-11-07T05:31:56Z",
"credit_score": "<string>"
}
],
"metadata": {}
}
'import requests
url = "https://api.sandbox.lead.bank/v0/entities/{id}"
payload = {
"type": "individual",
"intended_roles": "Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided",
"individual_details": {
"first_name": "Lucy",
"preferred_first_name": "Lu",
"middle_name": "Reginald",
"last_name": "Collins",
"date_of_birth": "2002-02-15",
"occupation": "Author",
"contact_methods": [
{
"type": "email",
"email": "abc@gmail.com"
}
],
"address_details": {
"physical_address": {
"line_1": "<string>",
"line_2": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "<string>",
"country": "<string>"
},
"mailing_address": {
"line_1": "<string>",
"line_2": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "<string>",
"country": "<string>"
},
"other_addresses": [
{
"line_1": "123 Main St.",
"city": "Denver",
"country": "US",
"line_2": "Apt 25",
"postal_code": 80014,
"state": "CO"
}
]
},
"identification_details": {
"type": "us_entity",
"identification_documents": [
{
"identification_number": "<string>",
"issuing_country": "<string>",
"client_document_id": "<string>",
"description": "<string>",
"expiration_date": "2023-12-25",
"issuing_state": "<string>"
}
]
},
"additional_documents": [
{
"client_document_id": "<string>",
"description": "<string>"
}
]
},
"credit_details": [
{
"credit_pulled_at": "2023-11-07T05:31:56Z",
"credit_score": "<string>"
}
],
"metadata": {}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
type: 'individual',
intended_roles: 'Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided',
individual_details: {
first_name: 'Lucy',
preferred_first_name: 'Lu',
middle_name: 'Reginald',
last_name: 'Collins',
date_of_birth: '2002-02-15',
occupation: 'Author',
contact_methods: [{type: 'email', email: 'abc@gmail.com'}],
address_details: {
physical_address: {
line_1: '<string>',
line_2: '<string>',
city: '<string>',
postal_code: '<string>',
state: '<string>',
country: '<string>'
},
mailing_address: {
line_1: '<string>',
line_2: '<string>',
city: '<string>',
postal_code: '<string>',
state: '<string>',
country: '<string>'
},
other_addresses: [
{
line_1: '123 Main St.',
city: 'Denver',
country: 'US',
line_2: 'Apt 25',
postal_code: 80014,
state: 'CO'
}
]
},
identification_details: {
type: 'us_entity',
identification_documents: [
{
identification_number: '<string>',
issuing_country: '<string>',
client_document_id: '<string>',
description: '<string>',
expiration_date: '2023-12-25',
issuing_state: '<string>'
}
]
},
additional_documents: [{client_document_id: '<string>', description: '<string>'}]
},
credit_details: [{credit_pulled_at: '2023-11-07T05:31:56Z', credit_score: '<string>'}],
metadata: {}
})
};
fetch('https://api.sandbox.lead.bank/v0/entities/{id}', 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.sandbox.lead.bank/v0/entities/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'individual',
'intended_roles' => 'Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided',
'individual_details' => [
'first_name' => 'Lucy',
'preferred_first_name' => 'Lu',
'middle_name' => 'Reginald',
'last_name' => 'Collins',
'date_of_birth' => '2002-02-15',
'occupation' => 'Author',
'contact_methods' => [
[
'type' => 'email',
'email' => 'abc@gmail.com'
]
],
'address_details' => [
'physical_address' => [
'line_1' => '<string>',
'line_2' => '<string>',
'city' => '<string>',
'postal_code' => '<string>',
'state' => '<string>',
'country' => '<string>'
],
'mailing_address' => [
'line_1' => '<string>',
'line_2' => '<string>',
'city' => '<string>',
'postal_code' => '<string>',
'state' => '<string>',
'country' => '<string>'
],
'other_addresses' => [
[
'line_1' => '123 Main St.',
'city' => 'Denver',
'country' => 'US',
'line_2' => 'Apt 25',
'postal_code' => 80014,
'state' => 'CO'
]
]
],
'identification_details' => [
'type' => 'us_entity',
'identification_documents' => [
[
'identification_number' => '<string>',
'issuing_country' => '<string>',
'client_document_id' => '<string>',
'description' => '<string>',
'expiration_date' => '2023-12-25',
'issuing_state' => '<string>'
]
]
],
'additional_documents' => [
[
'client_document_id' => '<string>',
'description' => '<string>'
]
]
],
'credit_details' => [
[
'credit_pulled_at' => '2023-11-07T05:31:56Z',
'credit_score' => '<string>'
]
],
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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.sandbox.lead.bank/v0/entities/{id}"
payload := strings.NewReader("{\n \"type\": \"individual\",\n \"intended_roles\": \"Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided\",\n \"individual_details\": {\n \"first_name\": \"Lucy\",\n \"preferred_first_name\": \"Lu\",\n \"middle_name\": \"Reginald\",\n \"last_name\": \"Collins\",\n \"date_of_birth\": \"2002-02-15\",\n \"occupation\": \"Author\",\n \"contact_methods\": [\n {\n \"type\": \"email\",\n \"email\": \"abc@gmail.com\"\n }\n ],\n \"address_details\": {\n \"physical_address\": {\n \"line_1\": \"<string>\",\n \"line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"mailing_address\": {\n \"line_1\": \"<string>\",\n \"line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"other_addresses\": [\n {\n \"line_1\": \"123 Main St.\",\n \"city\": \"Denver\",\n \"country\": \"US\",\n \"line_2\": \"Apt 25\",\n \"postal_code\": 80014,\n \"state\": \"CO\"\n }\n ]\n },\n \"identification_details\": {\n \"type\": \"us_entity\",\n \"identification_documents\": [\n {\n \"identification_number\": \"<string>\",\n \"issuing_country\": \"<string>\",\n \"client_document_id\": \"<string>\",\n \"description\": \"<string>\",\n \"expiration_date\": \"2023-12-25\",\n \"issuing_state\": \"<string>\"\n }\n ]\n },\n \"additional_documents\": [\n {\n \"client_document_id\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n },\n \"credit_details\": [\n {\n \"credit_pulled_at\": \"2023-11-07T05:31:56Z\",\n \"credit_score\": \"<string>\"\n }\n ],\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.sandbox.lead.bank/v0/entities/{id}")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"individual\",\n \"intended_roles\": \"Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided\",\n \"individual_details\": {\n \"first_name\": \"Lucy\",\n \"preferred_first_name\": \"Lu\",\n \"middle_name\": \"Reginald\",\n \"last_name\": \"Collins\",\n \"date_of_birth\": \"2002-02-15\",\n \"occupation\": \"Author\",\n \"contact_methods\": [\n {\n \"type\": \"email\",\n \"email\": \"abc@gmail.com\"\n }\n ],\n \"address_details\": {\n \"physical_address\": {\n \"line_1\": \"<string>\",\n \"line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"mailing_address\": {\n \"line_1\": \"<string>\",\n \"line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"other_addresses\": [\n {\n \"line_1\": \"123 Main St.\",\n \"city\": \"Denver\",\n \"country\": \"US\",\n \"line_2\": \"Apt 25\",\n \"postal_code\": 80014,\n \"state\": \"CO\"\n }\n ]\n },\n \"identification_details\": {\n \"type\": \"us_entity\",\n \"identification_documents\": [\n {\n \"identification_number\": \"<string>\",\n \"issuing_country\": \"<string>\",\n \"client_document_id\": \"<string>\",\n \"description\": \"<string>\",\n \"expiration_date\": \"2023-12-25\",\n \"issuing_state\": \"<string>\"\n }\n ]\n },\n \"additional_documents\": [\n {\n \"client_document_id\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n },\n \"credit_details\": [\n {\n \"credit_pulled_at\": \"2023-11-07T05:31:56Z\",\n \"credit_score\": \"<string>\"\n }\n ],\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v0/entities/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"individual\",\n \"intended_roles\": \"Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided\",\n \"individual_details\": {\n \"first_name\": \"Lucy\",\n \"preferred_first_name\": \"Lu\",\n \"middle_name\": \"Reginald\",\n \"last_name\": \"Collins\",\n \"date_of_birth\": \"2002-02-15\",\n \"occupation\": \"Author\",\n \"contact_methods\": [\n {\n \"type\": \"email\",\n \"email\": \"abc@gmail.com\"\n }\n ],\n \"address_details\": {\n \"physical_address\": {\n \"line_1\": \"<string>\",\n \"line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"mailing_address\": {\n \"line_1\": \"<string>\",\n \"line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"other_addresses\": [\n {\n \"line_1\": \"123 Main St.\",\n \"city\": \"Denver\",\n \"country\": \"US\",\n \"line_2\": \"Apt 25\",\n \"postal_code\": 80014,\n \"state\": \"CO\"\n }\n ]\n },\n \"identification_details\": {\n \"type\": \"us_entity\",\n \"identification_documents\": [\n {\n \"identification_number\": \"<string>\",\n \"issuing_country\": \"<string>\",\n \"client_document_id\": \"<string>\",\n \"description\": \"<string>\",\n \"expiration_date\": \"2023-12-25\",\n \"issuing_state\": \"<string>\"\n }\n ]\n },\n \"additional_documents\": [\n {\n \"client_document_id\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n },\n \"credit_details\": [\n {\n \"credit_pulled_at\": \"2023-11-07T05:31:56Z\",\n \"credit_score\": \"<string>\"\n }\n ],\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"type": "individual",
"client_customer_id": "<string>",
"intended_roles": "Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided",
"individual_details": {
"first_name": "<string>",
"last_name": "<string>",
"identification_details": {
"type": "us_entity",
"tax_identification": {
"value": "<string>"
},
"identification_documents": [
{
"identification_number": "<string>",
"issuing_country": "<string>",
"client_document_id": "<string>",
"description": "<string>",
"expiration_date": "2023-12-25",
"issuing_state": "<string>"
}
]
},
"preferred_first_name": "<string>",
"middle_name": "<string>",
"date_of_birth": "2002-02-15",
"occupation": "<string>",
"contact_methods": [
{
"type": "email",
"email": "abc@gmail.com"
}
],
"address_details": {
"physical_address": {
"line_1": "123 Main St.",
"city": "Denver",
"country": "US",
"line_2": "Apt 25",
"postal_code": 80014,
"state": "CO"
},
"mailing_address": {
"line_1": "123 Main St.",
"city": "Denver",
"country": "US",
"line_2": "Apt 25",
"postal_code": 80014,
"state": "CO"
},
"other_addresses": [
{
"line_1": "123 Main St.",
"city": "Denver",
"country": "US",
"line_2": "Apt 25",
"postal_code": 80014,
"state": "CO"
}
]
},
"additional_documents": [
{
"client_document_id": "<string>",
"description": "<string>"
}
]
},
"rfi_details": {
"requested_at": "2023-11-07T05:31:56Z"
},
"ofac_details": {
"screened_at": "2023-11-07T05:31:56Z"
},
"kyc_details": {
"screened_at": "2023-11-07T05:31:56Z"
},
"credit_details": [
{
"credit_pulled_at": "2023-11-07T05:31:56Z",
"credit_score": "<string>"
}
],
"role_details": [
{
"status": "active",
"criteria_details": [
{
"failed_checks": [
"<string>"
],
"entity_id": "<string>"
}
]
}
],
"metadata": {}
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Idempotency key
255Path Parameters
Entity ID
Body
- Individual
- Business
- Sole Prop
Type of entity = individual.
^individual$The entity's intended role. Lead highly recommends using this field to confirm data requirements for different roles to minimize errors later. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. Lead currently supports:
authorized_user: Individual entity with restricted access to the account, without legal responsibility. Only applies to individual entity.authorized_signer: Individual entity allowed to sign on behalf of the account holder, without legal responsibility. Only applies to individual entity.account_holder: Entity with full control and legal responsibility for the account. Applies to all entity types.
authorized_user, authorized_signer, account_holder "Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided"
The entity's risk score, mapped to Lead by the client. Client should have provided risk score mapping to Lead.
low, medium, high Details for the individual entity
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Details on OFAC on the entity.
Show child attributes
Show child attributes
Details on KYC on the entity.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
A set of key-value pairs that can be used to store additional information related to this object.
Show child attributes
Show child attributes
Response
Entity object updated.
- Individual
- Business
- Sole Prop
Unique ID for the Entity object.
Timestamp at which the entity object is created.
Timestamp at which the entity object was last updated.
Type of entity = individual.
^individual$Client customer ID for the entity object. Limit of 64 characters.
64The entity's intended role. Lead highly recommends using this field to confirm data requirements for different roles to minimize errors later. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. Lead currently supports:
authorized_user: Individual entity with restricted access to the account, without legal responsibility. Only applies to individual entity.authorized_signer: Individual entity allowed to sign on behalf of the account holder, without legal responsibility. Only applies to individual entity.account_holder: Entity with full control and legal responsibility for the account. Applies to all entity types.
authorized_user, authorized_signer, account_holder "Possible values: authorized_user, authorized_signer, account_holder. In the event more than 1 role is passed in and at least 1 role doesn’t pass validation, the request will not succeed. It will be an all or nothing behavior. For type = business, sole_prop, only account_holder should be provided"
The entity's risk score, mapped to Lead by the client. Client should have provided risk score mapping to Lead.
low, medium, high Details for the individual entity
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Details on OFAC on the entity.
Show child attributes
Show child attributes
Details on KYC on the entity.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
A set of key-value pairs that can be used to store additional information related to this object.
Show child attributes
Show child attributes
Was this page helpful?

