# Face Query

## API Method

## Query

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

This API enables the querying and match the facial image in database to check for existence

#### Request Body

| Name                                        | Type   | Description                                                       |
| ------------------------------------------- | ------ | ----------------------------------------------------------------- |
| apiKey<mark style="color:red;">\*</mark>    | string | To be assigned by Innov8tif                                       |
| imageBase64                                 | string | Selfie image or portrait image in base64                          |
| imageFile<mark style="color:red;">\*</mark> | string | Selfie image or portrait image                                    |
| groupName<mark style="color:red;">\*</mark> | string | Group name that existed in database that matches the facial image |

{% tabs %}
{% tab title="200 " %}
**When image is found in the group (database table):**

{% code title="Response Code Block" %}

```
{
    "status": "success",
    "resultFound": true,
    "groupFound": true,
    "name": "zhiyan",
    "score": 0.0}
```

{% endcode %}

**When group does exists but cannot find similar face:**

{% code title="Response Code Block" %}

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

{% endcode %}

**When group does not exist:**

{% code title="Response Code Block" %}

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

{% endcode %}

**When there is no face detected in the submitted image file:**

{% code title="Response Code Block" %}

```
{
    "status": "error",
    "message": "There is No Face Detected in Image",
    "resultFound": false,
    "groupFound": false
}
```

{% endcode %}
{% endtab %}

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

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

{% endtab %}

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

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

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api2-ekycapis.innov8tif.com/okayface/okayface-all/face-search-deprecated/face-query.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
