> For the complete documentation index, see [llms.txt](https://docs.vida.id/identity-stack/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vida.id/identity-stack/verify/indonesia-verification/integration/api/api-reference/verification-data.md).

# Verification Data

The Data API is another service provided by VIDA which is available after a successful response is received from the identity verification API. This API allows partners to retrieve certain collected data of the user, such as their name, date of birth, and other user information passed during the verification process, along with the Identity verification status, selfie score and face-match scores that are generated as part of the verification process. This API is useful for partners who need to access this information for various purposes like compliance, fraud detection, or record-keeping. The API provides the partners the flexibility to retrieve the collected data on-demand, and also allows to extract the information they need to update their records or make a decision.

[Verification User Data API Reference](https://vida-verify.readme.io/reference/getkycdatabyeventid)

## API Description

<mark style="color:blue;">`GET`</mark> `https://services-sandbox.vida.id/main/v3/services/kyc/{kycEventId}/kycdata`

#### Path Parameters

| Name                                      | Type   | Description                                             |
| ----------------------------------------- | ------ | ------------------------------------------------------- |
| eventId<mark style="color:red;">\*</mark> | String | Transaction ID that is produced on transaction request. |

#### Headers

| Name                                            | Type             | Description                                                                                                |
| ----------------------------------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String           | <p>OAuth access token. </p><p>Get the token by calling the</p><p><strong>Get Access Token</strong> API</p> |
| Content-Type                                    | application/json | Format type of request body                                                                                |

In the identity verification API, the provided parameter values are accurate, resulting in the certificate issued status being marked as 200.&#x20;

***Selfie Score (refer to liveness score)***: The VIDA system evaluates whether the provided selfie is genuine and unaltered, performing various additional image checks and generating a selfie score. This score ranges from `0 to 1`, with 0 signifying the highest level of authenticity and 1 indicating the lowest level of authenticity in the selfie.&#x20;

However, the determination of success or failure in the liveness check is contingent upon the liveness threshold score, which defaults to a score of 0.95.

HTTP Status Code: `200`

#### Sample Request

<details>

<summary>Sample Request</summary>

```json
{
   "data":{
      "fullName":"Foo bar",
      "emailId":"foo@bar.com",
      "mobile":"+62123456788",
      "dob":"1980-01-01",
      "govId":"3511000101806300",
      "govIdType":"KTP",
      "selfiePhoto":"/9j/4AAQSkZJ...",
      "idCardPhoto":"/9j/4AAQSkZJ...",
      "selfieScore": 0.019347,
      "imgManipulationScore": "0.098010", //Available only when imgManipulation is enabled
      "certificateIssued": 200
   }
}
```

</details>

### Success Response

#### Selfie or Demog verification has failed.

HTTP Status Code: `444`

{% hint style="info" %}
Recommendation: The partner must send a clear selfie of the user whose NIK has been provided in the request.
{% endhint %}

<details>

<summary>JSON Response</summary>

```json
{
	"data": {
		"fullName": "UserGDA",
		"emailId": "bolafu@mailo.icu",
		"mobile": "+917000000006",
		"govId": "3579000101806300",
		"govIdType": "KTP",
		"dob": "1980-01-03",
		"selfiePhoto": "/9j/AQ0...9k=",
		"selfieScore": 0.038055,
                "imgManipulationScore": "0.098010", //Available only when imgManipulation is enabled
		"certificateIssued": 444
	}
}
```

</details>

#### Selfie has failed in liveness check.&#x20;

HTTP Status Code: `444`

There has been no face in the submitted selfie. Therefore, demog and face-match verification is not performed. Also, selfie score and face match status will not be shared in the response.

{% hint style="info" %}
Recommendation: The partner must send a live selfie of the user in the API request body.
{% endhint %}

<details>

<summary>JSON Response</summary>

```json
{
    "data": {
        "emailId": "bolafu@mailo.icu",
        "mobile": "+917000000006",
        "govId": "3579000101806300",
        "govIdType": "KTP",
        "certificateIssued": 444,
        "selfiePhoto": "/9j/AQ0...9k="
    }
}
```

</details>

The submitted selfie score (liveness score) is more than the threshold score (0.95). Therefore, demog and face-match verification is not performed. Also, selfie score and face match status will not be shared in the response.&#x20;

{% hint style="info" %}
Recommendation: The partner must send a live selfie of the user in the API request body.
{% endhint %}

<details>

<summary>JSON Response</summary>

```json
{
    "data": {
        "emailId": "bolafu@mailo.icu",
        "mobile": "+917000000006",
        "govId": "3579000101806300",
        "govIdType": "KTP",
        "certificateIssued": 444,
        "selfiePhoto": "/9j/AQ0...9k=",
        "selfieScore": 0.998055,
        "imgManipulationScore": "0.098010", //Available only when imgManipulation is enabled
    }
}
```

</details>

#### Method Not Allowed Description

HTTP Status Code: `405`

The provided API method is not allowed to run this endpoint.&#x20;

{% hint style="info" %}
Recommendation: Use only the “GET” method to call this API.
{% endhint %}

<details>

<summary>JSON Response</summary>

```json
{
    "timestamp": "2022-09-12T07:17:54.381+00:00",
    "status": 405,
    "error": "Method Not Allowed",
    "message": "",
    "path": "/v3/services/kyc/{{kycEventId}}/kycdata"
}
```

</details>

#### Not Found&#x20;

HTTP Status Code: `404`

The API endpoint URL is not valid.&#x20;

{% hint style="info" %}
Recommendation: The partner must send a valid endpoint URL.
{% endhint %}

<details>

<summary>JSON Response</summary>

```json
{
    "timestamp": "2023-01-05T12:01:06.899+00:00",
    "status": 404,
    "error": "Not Found",
    "message": "",
    "path": "/v3/services/kyc/{{kycEventId}}/kycdata"
}
```

</details>
