> For the complete documentation index, see [llms.txt](https://api2-ekycportal.innov8tif.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api2-ekycportal.innov8tif.com/experimental-space/emas-ekyc-portal/centralized-okayface/version-1.md).

# Version 1

### Centralized OkayFace Version 1-1 *(Recommended)*

<mark style="color:green;">`POST`</mark> `https://ekycportaldemo.innov8tif.com/api/ekyc/okayface/v1-1`

#### Headers

| Name         | Type   | Description                                                                                                                                                                                                        |
| ------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| livenessMeta | String | <p>The environment the image was taken in. Possible values are <code>IOS</code>, <code>ANDROID</code>, <code>DESKTOP</code> or <code>UNKNOWN</code> (the default).</p><p>e.g. </p><p><em>{"OS":"Desktop"}</em></p> |

#### Request Body

| Name                                           | Type    | Description                                                  |
| ---------------------------------------------- | ------- | ------------------------------------------------------------ |
| imageIdCardBase64                              | string  | Uncheck 'imageIdCard' to enable this parameter to be working |
| imageBestBase64                                | string  | Uncheck 'imageBest' to enable this parameter to be working   |
| livenessDetection                              | boolean | Set to True - return liveness score                          |
| imageIdCard <mark style="color:red;">\*</mark> | object  | Face Image from ID card                                      |
| imageBest <mark style="color:red;">\*</mark>   | object  | Selfie photo                                                 |
| journeyId<mark style="color:red;">\*</mark>    | string  | Retrieve from 'Create JourneyID' API                         |

{% tabs %}
{% tab title="200 Successfully response to the user" %}
{% code title="Response Code Block" %}

```
{
    "status": "success",
    "messageCode": "api.success",
    "imageBestLiveness": {
        "probability": 0.9999331,
        "score": 9.612308,
        "quality": 0.6691686
    },
    "request_id": "1591169623008663I8E5268153513648",
    "result_idcard": {
        "confidence": 88.0169
    }
}
```

{% endcode %}
{% endtab %}

{% tab title="400: Bad Request Failed to response to the user " %}

```javascript
{
    status: "error"
}
```

{% endtab %}

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

```javascript
{
    status: "Internal Server Error"
}
```

{% endtab %}
{% endtabs %}

### Centralized OkayFace Version 1

<mark style="color:green;">`POST`</mark> `https://ekycportaldemo.innov8tif.com/api/ekyc/okayface`

#### Request Body

| Name                                           | Type    | Description                                                  |
| ---------------------------------------------- | ------- | ------------------------------------------------------------ |
| imageIdCardBase64                              | string  | Uncheck 'imageIdCard' to enable this parameter to be working |
| imageBestBase64                                | string  | Uncheck 'imageBest' to enable this parameter to be working   |
| livenessDetection                              | boolean | Set to True - return liveness score                          |
| imageIdCard <mark style="color:red;">\*</mark> | object  | Face Image from ID card                                      |
| imageBest <mark style="color:red;">\*</mark>   | object  | Selfie photo                                                 |
| journeyId<mark style="color:red;">\*</mark>    | string  | Retrieve from 'Create JourneyID' API                         |

{% tabs %}
{% tab title="200 Successfully responded to user" %}
{% code title="Response Code Block" %}

```
{
    "status": "success",
    "messageCode": "api.success",
    "imageBestLiveness": {
        "probability": 0.9999331,
        "score": 9.612308,
        "quality": 0.6691686
    },
    "request_id": "1591169623008663I8E5268153513648",
    "result_idcard": {
        "confidence": 88.0169
    }
}
```

{% endcode %}
{% endtab %}

{% tab title="400: Bad Request Failed to response to user" %}

```javascript
{
    "status": "error"
}
```

{% endtab %}

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

```javascript
{
    status:"Internal Server Error"
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
Kindly refer to the page below for the interpretation of the result.
{% endhint %}

{% content-ref url="/spaces/RYsITG7N76MNv67B20iW/pages/mFCL5ybACFd5dpNd2YEk" %}
[Interpretation of Result and Recommended Threshold](/emas-ekyc-portal/centralized-okayface/interpretation-of-result-and-recommended-threshold.md)
{% endcontent-ref %}

#### API Header - LivenessMeta

| Meta Key | Meta Value                                | Required                                              |
| -------- | ----------------------------------------- | ----------------------------------------------------- |
| OS       | "IOS", "ANDROID" or "DESKTOP" or "UNKOWN" | Optional *(Suggested to include for better accuracy)* |

### Input Example (OkayFace Version 1-1)

![Input using image file](/files/qq8sGHoaZw9RayEDoxa2)

![Input using base64 image string](/files/NbBR4jAcZrc6dcldIBhF)

{% hint style="info" %}
Users can either choose to activate livenessDetection by ticking the key or deactivate the livenessDetection by un-ticking the key
{% endhint %}

#### Postman Collection
