> For the complete documentation index, see [llms.txt](https://cartoonmango-1.gitbook.io/vida-ekyc-integration/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cartoonmango-1.gitbook.io/vida-ekyc-integration/integration-methods/api/identity-verification/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 KYC 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)

## Identity Verification Data API

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

#### Path Parameters

| Name                                         | Type   | Description                                             |
| -------------------------------------------- | ------ | ------------------------------------------------------- |
| kycEventId<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><a href="broken://pages/GjuJMI0UxvVP7R0D3UYx#authentication-api"><strong>Get Access Token</strong></a> API</p> |
| Content-Type                                    | application/json | Format type of request body                                                                                                                                                     |

{% tabs %}
{% tab title="200: OK Description: The provided parameter values in the identity verification API are correct, therefore, the identity verification status is marked as “Completed”.  Identity verification status possible values:  INPROGRESS COMPLETED FAILED  The response will consist of a limited number of parameters details that are configured for the partner and sent in the identity verification API request body.  Selfie score: VIDA system checks if the provided selfie is live/real or hacked along with a few additional image checks and generates a selfie score. The selfie score ranges from 0 to 1. The score of 0 (zero) represents maximum liveness and the score of 1 represents minimum liveness of the selfie. However, the success and failure of the liveness check depend upon the liveness threshold score. The default threshold is a 0.95 score.  Face match score: The selfie is compared with authoritative source records, and a face match score is generated. The score shows the matching percentage of the selfie face with the authoritative source record image. The face match score ranges from 1 to 10. The score of 1 represents the minimum match and the score of 10 represents the maximum match of the selfie. However, the success and failure of the face match  depend upon the face match threshold score.  The default faceMatch threshold score is 8.0.  Face match score -100.0 Refer to the following list to know the detailed reason of the face match score -100.0  Face match quota is exhausted for the partner. Error response from the authoritative source Internal server error at VIDA Authoritative source is busy Gateway error The verification is requested outside access/operation hours The user selfie image is not found in authoritative source records. NIK is not found in the authoritative source records. The NIK is invalid or not registered in authoritative source. Issue at authoritative source, therefore, NIK cannot be processed. The provided NIK is inactive. Duplicate NIK entry found in authoritative source records. The user is deceased (dead). Slow response from authoritative source. Demographic verification quota is exhausted for the partner." %}

```javascript
{
   "data":{
      "fullName":"Foo bar",
      "emailId":"foo@bar.com",
      "mobile":"+62123456788",
      "dob":"1980-01-01",
      "govId":"3511000101806300",
      "govIdType":"KTP",
      "selfiePhoto":"/9j/4AAQSkZJ...",
      "idCardPhoto":"/9j/4AAQSkZJ...",
      "kycStatus":"COMPLETED",
      "selfieScore": 0.019347,
      "faceMatchScore": 9.0
   }
}
```

{% endtab %}

{% tab title="200: OK Description: Selfie face match verification with authoritative source record has been  failed.  Recommendation: The partner must send a clear selfie of the user whose NIK has been provided in the request." %}

```javascript
{
    "data": {
        "fullName": "UserGDA",
        "emailId": "bolafu@mailo.icu",
        "mobile": "+917000000006",
        "govId": "3579000101806300",
        "govIdType": "KTP",
        "kycStatus": "FAILED",
        "dob": "1980-01-03",
        "selfiePhoto": "/9j/AQ0...9k=",
        "selfieScore": 0.038055,
        "faceMatchScore": 7.0
    }
}
```

{% endtab %}

{% tab title="200: OK Description: Selfie has failed in liveness check. There has been no face in the submitted selfie. Therefore, demog and face-match verification is not performed. Also, selfie score and face match score will not be shared in the response.  Recommendation: The partner must send a live selfie of the user in the API request body." %}

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

{% endtab %}

{% tab title="200: OK Description: Selfie has failed in liveness check. 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 score will not be shared in the response.  Recommendation: The partner must send a live selfie of the user in the API request body." %}

```javascript
{
    "data": {
        "emailId": "bolafu@mailo.icu",
        "mobile": "+917000000006",
        "govId": "3579000101806300",
        "govIdType": "KTP",
        "kycStatus": "FAILED",
        "selfiePhoto": "/9j/AQ0...9k=",
        "selfieScore": 0.998055,
    }
}
```

{% endtab %}

{% tab title="405: Method Not Allowed Description: The provided API method is not allowed to run this endpoint.  Recommendation: Use only the “Get” method to call this API." %}

```javascript
{
    "timestamp": "2022-09-12T07:17:54.381+00:00",
    "status": 405,
    "error": "Method Not Allowed",
    "message": "",
    "path": "/v1/services/kyc/%227000000-cdb0-42f1-85c5-00000000/kycdata"
}
```

{% endtab %}
{% endtabs %}

#### Integration Code Snippet

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

```http
curl --location --request GET 'https://services-sandbox.vida.id/main/v1/services/kyc/50e09666-d8ef-4d9b-9a02-3de62e7f9b70/kycdata' \
--header 'Authorization: Bearer ml5OLUgbYg-sY6XRsg...'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://services-sandbox.vida.id/main/v1/services/kyc/50e09666-d8ef-4d9b-9a02-3de62e7f9b70/kycdata"

payload={}
headers = {
  'Authorization': 'Bearer eyJhbGciOiJSUzI1NiIsInR...'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

```

{% endtab %}

{% tab title="NodeJS" %}

```javascript
var axios = require('axios');

var config = {
  method: 'get',
  url: 'https://services-sandbox.vida.id/main/v1/services/kyc/50e09666-d8ef-4d9b-9a02-3de62e7f9b70/kycdata',
  headers: { 
    'Authorization': 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCIYzijQ...'
  }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

```

{% endtab %}

{% tab title="Java" %}

```java
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://services-sandbox.vida.id/main/v1/services/kyc/50e09666-d8ef-4d9b-9a02-3de62e7f9b70/kycdata")
  .method("GET", null)
  .addHeader("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsInR5cC...")
  .build();
Response response = client.newCall(request).execute();
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://services-sandbox.vida.id/main/v1/services/kyc/50e09666-d8ef-4d9b-9a02-3de62e7f9b70/kycdata',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiQG473YzijQ...'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}
{% endtabs %}
