# Versions

## Version 2

## To search for business profile

<mark style="color:green;">`POST`</mark> `https://okaydbdemo.innov8tif.com/ekyc/api/aml/v2/business`

This operation will search for business profiles using the parameters provided.

#### Request Body

| Name                                        | Type    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| name<mark style="color:red;">\*</mark>      | string  | Searched business name. Example: IBM Corporation                                                                                                                                                                                                                                                                                                                                                                                                                   |
| threshold<mark style="color:red;">\*</mark> | integer | Minimum score to filter matched profiles. Minimum: 50 Maximum: 100 Default: 85                                                                                                                                                                                                                                                                                                                                                                                     |
| countries<mark style="color:red;">\*</mark> | string  | Searched country. Two-letter country code ISO-3166-2                                                                                                                                                                                                                                                                                                                                                                                                               |
| datasets<mark style="color:red;">\*</mark>  | string  | <p>Specifies which datasets will be searched: <br>PEP - Politically Exposed Persons <br>PEP-LINKED - Only linked PEPs <br>SAN - Sanctioned <br>SAN-CURRENT - Only current Sanctions <br>SAN-FORMER - Only former Sanctions <br>INS - Insolvency <br>RRE - Reputational Risk Exposure <br>POI - Profile of Interest <br>REL - Regulatory Enforcement List <br>SOE - State Owned Enterprises <br>SOE-CURRENT - Only current SOE <br>SOE-FORMER - Only former SOE</p> |
| countryRequired                             | boolean | Default: false                                                                                                                                                                                                                                                                                                                                                                                                                                                     |

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

```javascript
{
    "status": "success",
    "messageCode": null,
    "message": null,
    "matchCount": 1,
    "matches": [
        {
            "qrCode": "579097",
            "version": 1624863452516,
            "resourceUri": "/businesses/87de83780bd8a599f6ed55c629374cf60616f5fe47fec8c75e9b35aec5d36676",
            "resourceId": "87de83780bd8a599f6ed55c629374cf60616f5fe47fec8c75e9b35aec5d36676",
            "name": "Tesla, Inc.",
            "description": "Electric car manufacturer",
            "deletionReason": null,
            "aliases": [
                {
                    "firstName": null,
                    "middleName": null,
                    "lastName": null,
                    "type": "Name Spelling Variation",
                    "alias": "Tesla"
                },
                {
                    "firstName": null,
                    "middleName": null,
                    "lastName": null,
                    "type": "Name Spelling Variation",
                    "alias": "Tesla Inc"
                },
                {
                    "firstName": null,
                    "middleName": null,
                    "lastName": null,
                    "type": "Name Spelling Variation",
                    "alias": "Tesla Motors"
                },
                {
                    "firstName": null,
                    "middleName": null,
                    "lastName": null,
                    "type": "Name Spelling Variation",
                    "alias": "Tesla Incorporated"
                }
            ],
            ......
}
```

{% endtab %}
{% endtabs %}

## Version 1 *<mark style="color:orange;">(Deprecated)</mark>*

<mark style="color:green;">`POST`</mark> `https://okaydbdemo.innov8tif.com/ekyc/api/aml/v1/business`

#### Request Body

| Name                                           | Type   | Description                                                                                                                                                   |
| ---------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| BusinessName<mark style="color:red;">\*</mark> | string | Searched business name.                                                                                                                                       |
| apiKey<mark style="color:red;">\*</mark>       | string | To be assigned by Innov8tif.                                                                                                                                  |
| Threshold                                      | string | Minimum score to filter matched profiles.                                                                                                                     |
| PEP                                            | string | Return PEP profiles. If not provided, then default value is "false" and matched PEP profiles will not be returned.                                            |
| PreviousSanctions                              | string | Return previously sanctioned profiles. if not provided, then default value is "false" and matched profiles will not be returned.                              |
| CurrentSanctions                               | string | Return currently sanctioned profiles. If not provided, then default value is "false" and matched profiles will  not be returned.                              |
| LawEnforcement                                 | string | Return profiles from "Law Enforcement" dataset. If not provided, then default value s "false" and matched profiles will not be returned.                      |
| FinancialRegulator                             | string | Return profiles from "Financial regulator" dataset. If not provided, ten default value is "false" and matched profiles will not be returned.                  |
| Insolvency                                     | string | Return profiles from "Insolvency" dataset. If not provided, then default value is "false" and matched profiles will not be returned.                          |
| DisqualifiedDirector                           | string | Return profiles from "Disqualified Director" dataset. If not provided, then default value is "false" and matched disqualified directors will not be returned. |
| AdverseMedia                                   | string | Return profiles from "Adverse Media" dataset. If not provided, then default value is "false" and matched disqualified directors will not be returned.         |
| Address                                        | string | Searched address. This  field should not contain city, county/state/postcode/country name.                                                                    |
| City<mark style="color:red;">\*</mark>         | string | Searched city                                                                                                                                                 |
| County<mark style="color:red;">\*</mark>       | string | Searched county                                                                                                                                               |
| Postcode<mark style="color:red;">\*</mark>     | string | Searched postcode                                                                                                                                             |
| Country<mark style="color:red;">\*</mark>      | string | Searched country                                                                                                                                              |

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

```
{
  "recordsFound": 1,
  "matches": [
    {
      "score": 100,
      "business": {
        "id": 579097,
        "businessName": "Tesla, Inc.",
        "telephoneNumber": "+1 (650) 681-5100",
        "faxNumber": "+1 (650) 681-5101",
        "website": "https://www.tesla.com",
        "isPEP": true,
        "isSanctionsCurrent": false,
        "isSanctionsPrevious": false,
        "isLawEnforcement": true,
        "isFinancialregulator": false,
        "isDisqualifiedDirector": false,
        "isInsolvent": false,
        "isAdverseMedia": true,
        "addresses": [
          {
            "address1": "Tesla Headquarters",
            "address2": "3500 Deer Creek Road",
            "address3": "",
            "address4": "",
            "city": "Palo Alto",
            "county": "California",
            "postcode": "CA 94304",
            "country": {
              "name": "United States of America"
            }
          },
          {
            "address1": "901 Page Avenue",
            "address2": "",
            "address3": "",
            "address4": "",
            "city": "Freemont",
            "county": "California",
            "postcode": "94538",
            "country": {
              "name": "United States of America"
            }
          },
          {
            "address1": "45500 Fremont Boulevard",
            "address2": "",
            "address3": "",
            "address4": "",
            "city": "Fremont",
            "county": "California",
            "postcode": "94538",
            "country": {
              "name": "United States of America"
            }
          }
        ],
        ............
        
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="500: Internal Server Error " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}
