# Version 1

## Insert Face Into Database

<mark style="color:green;">`POST`</mark> `http://okaydocdev.innov8tif.com/ekyc/api/innov-face/facequery/insert`

#### Request Body

| Name        | Type   | Description                                                                                                          |
| ----------- | ------ | -------------------------------------------------------------------------------------------------------------------- |
| userName    | string | Image name.                                                                                                          |
| groupName   | string | Image group name.                                                                                                    |
| imageFile   | object | Image object. Either use imageBase64 or imageFile, if both are filled in, baseBase64 will be used.                   |
| imageBase64 | string | Image in base64 encoded string. Either use imageBase64 or imageFile, if both are filled in, baseBase64 will be used. |
| apiKey      | string | To be assigned by Innov8tif.                                                                                         |

{% tabs %}
{% tab title="200 groupStatus indicates group existence in the database. (EXISTING/NEW)" %}

```
{
    "status": "success",
    "groupName": "celebrity",
    "groupStatus": "EXISTING",
    "name": "tom"
}
```

{% endtab %}
{% endtabs %}

### Example Input&#x20;

![](https://253651193-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpQle72tz7-gm8Gk4Bg%2F-M5dkDV9ONT9QTpWxfSJ%2F-M5doUkdgHBgj1k2Anqh%2FCapture.JPG?alt=media\&token=d5c6e989-e51c-459e-b39e-4643934e8fa0)

## Match Faces In Database

<mark style="color:green;">`POST`</mark> `http://okaydocdev.innov8tif.com/ekyc/api/innov-face/query`

#### Request Body

| Name        | Type   | Description                                                                                                          |
| ----------- | ------ | -------------------------------------------------------------------------------------------------------------------- |
| groupName   | string | Image group to be matched with.                                                                                      |
| imageFile   | object | Image object. Either use imageBase64 or imageFile, if both are filled in, baseBase64 will be used.                   |
| imageBase64 | string | Image in base64 encoded string. Either use imageBase64 or imageFile, if both are filled in, baseBase64 will be used. |
| apiKey      | string | To be assigned by Innov8tif.                                                                                         |

{% tabs %}
{% tab title="200 Image was found in the group" %}

```
{
    "status": "success",
    "resultFound": true,
    "groupFound": true,
    "name": "tom",
    "score": 1.0
}
```

{% endtab %}

{% tab title="302 Group exists but cannot find similar face" %}

```
{
    "status": "success",
    "resultFound": false,
    "groupFound": true
}
```

{% endtab %}

{% tab title="304 Group does not exist." %}

```
{
    "status": "success",
    "resultFound": false,
    "groupFound": false
}
```

{% endtab %}
{% endtabs %}

### Example Input

![](https://253651193-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpQle72tz7-gm8Gk4Bg%2F-M5ds7_mEK7x4RYN8fe-%2F-M5duEOBKo6o0-cXIpg_%2FCapture.JPG?alt=media\&token=c964e96a-b8f2-4d12-8b84-ee30556b7d3d)

{% file src="<https://253651193-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpQle72tz7-gm8Gk4Bg%2F-M5ds7_mEK7x4RYN8fe-%2F-M5dudSCaOVVs7-f7Y9K%2Fface%20verification(innov).postman_collection.json?alt=media&token=49c36719-9d5b-498d-9e31-da040fbf9413>" %}
Face Verification
{% endfile %}
