> For the complete documentation index, see [llms.txt](https://docs.kredibel.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kredibel.io/api-references/identity-verification/demography-verification.md).

# Demography Verification

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

![](/files/2ruXJEYyi11wQ4BHSaRZ)

## Endpoints

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

### Headers

| Header          | Value                                           |
| --------------- | ----------------------------------------------- |
| `Content-Type`  | `application/json`                              |
| `Authorization` | `Bearer` [`YOUR_API_KEY`](/authentication-1.md) |

### **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>(optional)</code></strong>       |                                                                       |                                 |

</p>  | `String`                                                                         | Full name.                                                                                                                |
| <p>birthPlace<br><strong><code>(optional)</code></strong></p>    | `String`                                                                         | Birth Place.                                                                                                              |
| <p>birthDate<br><strong><code>(optional)</code></strong></p>     | <p><code>String</code><br><strong><code>(format: yyyy-mm-dd)</code></strong></p> | Birth Date.                                                                                                               |
| <p>address<br><strong><code>(optional)</code></strong></p>       | `String`                                                                         | Address.                                                                                                                  |
| <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> |
{% endtab %}

{% tab title="Example" %}

```
{
    "identityId": "1234567890123456",
    "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 face not match result.

**Example:**

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

```
{
    "message": "Identity demography verification succeeded.",
    "data": {
        "id": "43ad6108-a5ce-452f-8603-d60d24c2ef3e",
        "identityId": "1234567890123456",
        "isValid": true,
        "isActive": true,
        "response": {
            "fullName": true,
            "fullNameSimilarity": 1.0,
            "address": true,
            "addressSimilarity": 1.0,
            "birthPlace": true,
            "birthPlaceSimilarity": 1.0,
            "birthDate": true
        }
    }
}
```

{% 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"
}
```

```
{
    "message": "Identity demography verification succeeded.",
    "data": {
        "id": "c1fa0289-b6ea-4ffe-9d05-10fd99143ad5",
        "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"
}
```

```
{
    "message": "Identity demography verification succeeded.",
    "data": {
        "id": "673a9284-87e9-4f08-bb08-b820844b6159",
        "identityId": "1234567890123451",
        "isValid": true,
        "isActive": true,
        "response": {
            "fullName": false,
            "fullNameSimilarity": 0.43,
            "address": true,
            "addressSimilarity": 1.0,
            "birthPlace": true,
            "birthPlaceSimilarity": 1.0,
            "birthDate": true
        }
    }
}
```

{% 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"
}
```

```
{
    "message": "Identity demography verification succeeded.",
    "data": {
        "id": "be99966d-597c-4da9-a475-83392ef899f4",
        "identityId": "1234567890123452",
        "isValid": true,
        "isActive": true,
        "response": {
            "fullName": true,
            "fullNameSimilarity": 1.0,
            "address": false,
            "addressSimilarity": 0.58,
            "birthPlace": true,
            "birthPlaceSimilarity": 1.0,
            "birthDate": true
        }
    }
}
```

{% 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"
}
```

```
{
    "message": "Identity demography verification succeeded.",
    "data": {
        "id": "4faf35f4-44a1-47b2-8a18-07d243174aba",
        "identityId": "1234567890123453",
        "isValid": true,
        "isActive": true,
        "response": {
            "fullName": true,
            "fullNameSimilarity": 1.0,
            "address": true,
            "addressSimilarity": 1.0,
            "birthPlace": false,
            "birthPlaceSimilarity": 0.23,
            "birthDate": true
        }
    }
}
```

{% 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"
}
```

```
{
    "message": "Identity demography verification succeeded.",
    "data": {
        "id": "41272ecf-b5e2-4897-a492-b89356fab0c2",
        "identityId": "1234567890123454",
        "isValid": true,
        "isActive": true,
        "response": {
            "fullName": true,
            "fullNameSimilarity": 1.0,
            "address": true,
            "addressSimilarity": 1.0,
            "birthPlace": true,
            "birthPlaceSimilarity": 1.0,
            "birthDate": false
        }
    }
}
```

{% 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.   |

{% endtab %}

{% tab title="Example" %}

```
{
    "message": "Identity demography verification succeeded.",
    "data": {
        "id": "948cc6f9-1662-4ae7-a578-fdaa50331507",
        "identityId": "1234567890123456",
        "isValid": true,
        "isActive": true,
        "response": {
            "fullName": true,
            "fullNameSimilarity": 1.0,
            "address": true,
            "addressSimilarity": 1.0,
            "birthPlace": true,
            "birthPlaceSimilarity": 1.0,
            "birthDate": true
        }
    }
}
```

{% endtab %}
{% endtabs %}

### **Errors**

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

**Error 4XX**

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

| Error Type     | Description                               | Is charged? |
| -------------- | ----------------------------------------- | ----------- |
| request\_error | Cannot get response from Dukcapil server. | False       |
| {% endtab %}   |                                           |             |

{% tab title="Structure" %}
In general, the error response structure is as belo&#x77;**:**

```
{
   "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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.kredibel.io/api-references/identity-verification/demography-verification.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
