# Full Verification

{% hint style="info" %}
This module only support verification for indonesian identity card (KTP)
{% endhint %}

![](https://2870805980-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-McrRQevDqT_jniFcAiY%2Fuploads%2FxwF1yATHbAn9KzAlR1Tu%2Fdukcapil_full.png?alt=media\&token=5849b4b5-ba33-4913-b89a-b8ce4fc1a11b)

## Endpoints

| Method | URL                                             |
| ------ | ----------------------------------------------- |
| POST   | `$synapses`**`/v1/identity/verification/full`** |

### Headers

| Header          | Value                                                                |
| --------------- | -------------------------------------------------------------------- |
| `Content-Type`  | `application/json`                                                   |
| `Authorization` | `Bearer` [`YOUR_API_KEY`](https://docs.kredibel.io/authentication-1) |

### **Request**

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

| Field                                                            | Type                                                                  | Description                     |
| ---------------------------------------------------------------- | --------------------------------------------------------------------- | ------------------------------- |
| <p>identityId</p><p><strong><code>(required)</code></strong></p> | <p><code>String</code><br><strong><code>(len: 16)</code></strong></p> | Nomor induk kependudukan (NIK). |
| <p>fullName</p><p><strong><code>(required)</code></strong>       |                                                                       |                                 |

</p>  | `String`                                                                         | Full name.                                                                                                                  |
| <p>birthPlace<br><strong><code>(required)</code></strong></p>    | `String`                                                                         | Birth Place.                                                                                                                |
| <p>birthDate<br><strong><code>(required)</code></strong></p>     | <p><code>String</code><br><strong><code>(format: yyyy-mm-dd)</code></strong></p> | Birth Date.                                                                                                                 |
| <p>address<br><strong><code>(required)</code></strong></p>       | `String`                                                                         | Address.                                                                                                                    |
| <p>faceImage </p><p><strong><code>(required)</code></strong></p> | `Base64`                                                                         | <p>Image binary encoded in base64 without &#x3C;data:image/png;>.<br>- Supports: JPG, JPEG, PNG, SVG<br>- Max Size: 1MB</p> |
| <p>threshold<br><strong><code>(optional)</code></strong></p>     | <p>Float<br><strong>(0-1)</strong></p>                                           | <p>Matched threshold for demography data (fullName, birthPlace, address)<br>- 0=0% match, 0.5=50% match, 1=100% match</p>   |
| <p>faceThreshold<br><strong><code>(optional)</code></strong></p> | **(0-1)**                                                                        | <p>Matched threshold for biometric data (face)<br>- 0=0% match, 0.5=50% match, 1=100% match</p>                             |
{% endtab %}

{% tab title="Example" %}

```
{
    "identityId": "1234567890123456",
    "fullName": "ASEP SUPRIYADI",
    "address": "JL SESAMA NO 123",
    "birthPlace": "JAKARTA",
    "birthDate": "1990-07-06",
    "faceImage": "<base64>"
}
```

{% endtab %}
{% endtabs %}

#### **Testing**

{% hint style="info" %}
In the sandbox environment, we only response api call with dummy data. To get valid response data, you can use our production environment instead.
{% endhint %}

{% tabs %}
{% tab title="All Match" %}
You can use identityId=`1234567890123456` to produce all-match result.

**Example:**

```
{
    "identityId": "1234567890123456",
    "fullName": "ASEP SUPRIYADI",
    "address": "JL SESAMA NO 123",
    "birthPlace": "JAKARTA",
    "birthDate": "1990-07-06",
    "faceImage": "<base64>"
}
```

```
{
    "message": "Identity full verification succeeded.",
    "data": {
        "id": "57746ec6-8b36-404c-890f-8a683f2372ef",
        "identityId": "1234567890123456",
        "isValid": true,
        "isActive": true,
        "response": {
            "fullName": true,
            "fullNameSimilarity": 1.0,
            "address": true,
            "addressSimilarity": 1.0,
            "birthPlace": true,
            "birthPlaceSimilarity": 1.0,
            "birthDate": true,
            "face": true,
            "face_similarity": 1.0
        }
    }
}
```

{% endtab %}

{% tab title="Wrong Identity" %}
You can use any identityId except `1234567890123456` to produce identity not valid result.

**Example:**

```
{
    "identityId": "1234567890123450",
    "fullName": "ASEP SUPRIYADI",
    "address": "JL SESAMA NO 123",
    "birthPlace": "JAKARTA",
    "birthDate": "1990-07-06",
    "faceImage": "<base64>"
}
```

```
{
    "message": "Identity full verification succeeded.",
    "data": {
        "id": "f9f66616-12f0-402f-93bf-5b7f165ab23d",
        "identityId": "1234567890123450",
        "isValid": false,
        "isActive": false,
        "response": {}
    }
}
```

{% endtab %}

{% tab title="Wrong Name" %}
You can use identityId =`1234567890123451` to produce full name is not valid.

**Example:**

```
{
    "identityId": "1234567890123451",
    "fullName": "ASEP SUPRIYADI",
    "address": "JL SESAMA NO 123",
    "birthPlace": "JAKARTA",
    "birthDate": "1990-07-06",
    "faceImage": "<base64>"
}
```

```
{
    "message": "Identity full verification succeeded.",
    "data": {
        "id": "df25614d-dce8-436e-9318-b3ac9bbda179",
        "identityId": "1234567890123451",
        "isValid": true,
        "isActive": true,
        "response": {
            "fullName": false,
            "fullNameSimilarity": 0.43,
            "address": true,
            "addressSimilarity": 1.0,
            "birthPlace": true,
            "birthPlaceSimilarity": 1.0,
            "birthDate": true,
            "face": false,
            "face_similarity": 0.12
        }
    }
}
```

{% endtab %}

{% tab title="Wrong Address" %}
You can use identityId=`234567890123452` to produce address is not valid.

**Example:**

```
{
    "identityId": "1234567890123452",
    "fullName": "ASEP SUPRIYADI",
    "address": "JL SESAMA NO 123",
    "birthPlace": "JAKARTA",
    "birthDate": "1990-07-06",
    "faceImage": "<base64>"
}
```

```
{
    "message": "Identity full verification succeeded.",
    "data": {
        "id": "b26ebc48-20fa-4f53-8bb4-652058def9b0",
        "identityId": "1234567890123452",
        "isValid": true,
        "isActive": true,
        "response": {
            "fullName": true,
            "fullNameSimilarity": 1.0,
            "address": true,
            "addressSimilarity": 0.58,
            "birthPlace": true,
            "birthPlaceSimilarity": 1.0,
            "birthDate": true,
            "face": false,
            "face_similarity": 0.73
        }
    }
}
```

{% endtab %}

{% tab title="Wrong Birthplace" %}
You can use identityId=`234567890123453` to produce birth place is not valid.

**Example:**

```
{
    "identityId": "1234567890123453",
    "fullName": "ASEP SUPRIYADI",
    "address": "JL SESAMA NO 123",
    "birthPlace": "JAKARTA",
    "birthDate": "1990-07-06",
    "faceImage": "<base64>"
}
```

```
{
    "message": "Identity full verification succeeded.",
    "data": {
        "id": "6fbf106c-ad7e-4371-8571-3e9615a9590d",
        "identityId": "1234567890123453",
        "isValid": true,
        "isActive": true,
        "response": {
            "fullName": true,
            "fullNameSimilarity": 1.0,
            "address": true,
            "addressSimilarity": 1.0,
            "birthPlace": false,
            "birthPlaceSimilarity": 0.23,
            "birthDate": true,
            "face": false,
            "face_similarity": 0.65
        }
    }
}
```

{% endtab %}

{% tab title="Wrong Birthdate" %}
You can use identityId=`234567890123454` to produce birth date is not valid.

**Example:**

```
{
    "identityId": "1234567890123454",
    "fullName": "ASEP SUPRIYADI",
    "address": "JL SESAMA NO 123",
    "birthPlace": "JAKARTA",
    "birthDate": "1990-07-06",
    "faceImage": "<base64>"
}
```

```
{
    "message": "Identity full verification succeeded.",
    "data": {
        "id": "84ede311-7eb7-462b-80ae-0795fafcf368",
        "identityId": "1234567890123454",
        "isValid": true,
        "isActive": true,
        "response": {
            "fullName": true,
            "fullNameSimilarity": 1.0,
            "address": true,
            "addressSimilarity": 1.0,
            "birthPlace": true,
            "birthPlaceSimilarity": 1.0,
            "birthDate": true,
            "face": false,
            "face_similarity": 0.46
        }
    }
}
```

{% endtab %}
{% endtabs %}

### **Response**

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

| Field                         | Type                                                             | Description                                                                                                      |
| ----------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| id                            | `String`                                                         | Unique identifier.                                                                                               |
| identityId                    | `String`                                                         | Nomor induk kependudukan (NIK).                                                                                  |
| isValid                       | `Boolean`                                                        | Return true if identityId is **exist** in the Dukcapil database.                                                 |
| isActive&#xD;                 | `Boolean`                                                        | Return true if identityId is **active** in the Dukcapil database.                                                |
| response:fullName             | `Boolean`                                                        | Return true if input fullName  match with the fullName in Dukcapil database.                                     |
| response:fullNameSimilarity   | <p><code>Float</code><br><strong><code>(0-1)</code></strong></p> | Similarity between the input fullName and the fullName in Dukcapil database.                                     |
| response:address              | `Boolean`                                                        | Return true if input birth date match with the birth date in Dukcapil database.                                  |
| response:addressSimilarity    | <p><code>Float</code><br><strong><code>(0-1)</code></strong></p> | Similarity between the input address and the address in Dukcapil database.                                       |
| response:birthPlace           | `Boolean`                                                        | Return true if input birth place match with the birth place in Dukcapil database.                                |
| response:birthPlaceSimilarity | <p><code>Float</code><br><strong><code>(0-1)</code></strong></p> | Similarity between the input birthPlace and the birthPlace in Dukcapil database.                                 |
| response:birthDate            | `Boolean`                                                        | Return true if input birth date match with the birth date in Dukcapil database.                                  |
| response:face                 | `Boolean`                                                        | <p>Return true if input face match with the face in dukcapil database.<br>- Default threshold: >= 0.75: True</p> |
| response:faceSimilarity       | <p><code>Float</code><br><strong><code>(0-1)</code></strong></p> | <p>Similarity between the input face and the face in Dukcapil database.<br>- Default threshold: >= 0.8: True</p> |

{% endtab %}

{% tab title="Example" %}

```
{
    "message": "Identity full verification succeeded.",
    "data": {
        "id": "68224a77-60f4-40f6-85ff-35801f4d6541",
        "identityId": "1234567890123451",
        "isValid": true,
        "isActive": true,
        "response": {
            "fullName": false,
            "fullNameSimilarity": 0.43,
            "address": true,
            "addressSimilarity": 1.0,
            "birthPlace": true,
            "birthPlaceSimilarity": 1.0,
            "birthDate": true,
            "face": true,
            "faceSimilarity": 0.81
        }
    }
}
```

{% endtab %}
{% endtabs %}

### **Errors**

{% hint style="info" %}
Please read this [page \<Responses & Errors>](https://docs.kredibel.io/responses-and-errors) to know more about response.
{% endhint %}

**Error 4XX**

{% tabs %}
{% tab title="Error Type" %}

| Error Type                | Description                                                             | Is charged? |
| ------------------------- | ----------------------------------------------------------------------- | ----------- |
| invalid\_base64\_encoding | Invalid base64 encoding.                                                | False       |
| image\_too\_large         | Input image is greater than the maximum size allowed.                   | False       |
| no\_face\_detected        | No face was detected from the input image or the input image is blurry. | True        |
| request\_error            | Cannot get response from Dukcapil server.                               | False       |
| {% endtab %}              |                                                                         |             |

{% tab title="Structure" %}

```
{
   "errors":{
      "errorId": <log_id:uuid>,
      "errorType": <error_type:str>
   },
   "message": <message:str>
}
```

{% endtab %}
{% endtabs %}

**Error 5XX**

**F**or every 5XX http code response, there will be no charge.
