# Verifying entity information

With database verification, you only need to use this endpoint. Entities are created and submitted for processing automatically.

Make sure you pass the correct `country` when calling this endpoint. This tells us the relevant registry and sources to check within the country.

***

## Verify identity data

<mark style="color:green;">`POST`</mark> `/api-entity-database-verification`

Create the entity, match and verify the entity data, and request verification.

| Name          | Value                 |
| ------------- | --------------------- |
| Content-Type  | `multipart/form-data` |
| Authorization | `Bearer YOUR_TOKEN`   |

**Body**

<table><thead><tr><th>Name</th><th width="165">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>flowName</code></td><td>string</td><td><p>The name of the flow your Account Manager has provided</p><p><mark style="color:red;">(required)</mark></p></td></tr><tr><td><code>companyName</code></td><td>string</td><td>The entity's legal name <mark style="color:red;">(required)</mark></td></tr><tr><td><code>registrationNumber</code></td><td>string</td><td>The entity's registration number <mark style="color:red;">(required)</mark></td></tr><tr><td><code>country</code></td><td>string</td><td>The entity's registration country, in alpha-3 format <mark style="color:red;">(required)</mark></td></tr><tr><td><code>sourceKey</code></td><td>string</td><td>An internal unique identifier, or source, that you can use to identify where the entity came from, which is returned in all responses <mark style="color:orange;">(optional)</mark></td></tr><tr><td><code>externalUserId</code></td><td>list</td><td>External identifiers that are returned in all responses <mark style="color:orange;">(optional)</mark></td></tr></tbody></table>

{% hint style="info" %}
Use **ISO 3166-1 A3** format for`country.` See [here](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes) for country codes.
{% endhint %}

#### Request

{% tabs %}
{% tab title="cURL" %}

```sh
curl --location 'https://enterprise.personr.co/api/1.1/wf/api-entity-database-verification' \
--form 'flowName="KYB Basic"' \
--form 'companyName="Personr Pty Ltd"' \
--form 'registrationNumber="123456789"' \
--form 'country="AUS"'
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
var axios = require('axios');
var FormData = require('form-data');
var data = new FormData();

data.append('flowName', 'KYB Basic');
data.append('companyName', 'Personr Pty Ltd');
data.append('registrationNumber', '123456789');
data.append('country', 'AUS');

var config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://enterprise.personr.co/api/1.1/wf/api-entity-database-verification',
  headers: { 
    ...data.getHeaders()
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
var form = new FormData();
form.append('flowName', 'KYB Basic');
form.append('companyName', 'Personr Pty Ltd');
form.append('registrationNumber', '123456789');
form.append('country', 'AUS');

var settings = {
  "url": "https://enterprise.personr.co/api/1.1/wf/api-entity-database-verification",
  "method": "POST",
  "timeout": 0,
  "processData": false,
  "mimeType": "multipart/form-data",
  "contentType": false,
  "data": form
};

$.ajax(settings).done(function (response) {
  console.log(response);
}).fail(function (error) {
  console.error(error);
});
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require "uri"
require "net/http"

url = URI("https://enterprise.personr.co/api/1.1/wf/api-entity-database-verification")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
form_data = [
  ['flowName', 'KYB Basic'],
  ['companyName', 'Personr Pty Ltd'],
  ['registrationNumber', '123456789'],
  ['country', 'AUS']
]
request.set_form form_data, 'multipart/form-data'

response = https.request(request)
puts response.read_body
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://enterprise.personr.co/api/1.1/wf/api-entity-database-verification"

payload = {
    'flowName': 'KYB Basic',
    'companyName': 'Personr Pty Ltd',
    'registrationNumber': '123456789',
    'country': 'AUS'
}

response = requests.post(url, data=payload)

print(response.text)
```

{% endtab %}
{% endtabs %}

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
    "status": "success",
    "response": {
        "applicantId": "4242424242424242x42424242424242",
        "flow": "KYB Basic",
        "status": "Pending"
    }
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "statusCode": 400,
    "message": "Error: incorrect flowName provided"
}
```

{% endtab %}
{% endtabs %}
