# /kyc\_card

#### Endpoint

```http
https://be.progeny.tech/api/v3/services/kyc_card/
```

#### Purpose

Allows you to connect to the Liveness, Face Compare, and OCR\_Card services, using the providers configured in the **Progeny Console**, to extract an image from a driving license or ID and compare it to a selfie image.

{% hint style="info" %}
Please refer to the section on [images](/our-api/overview.md#a-quick-word-about-images) for guidance before posting.  For the best results, we recommend a maximum height of 1080px.
{% endhint %}

#### Sample request and response

## Get task Id

<mark style="color:green;">`POST`</mark> `https://be.progeny.tech/api/v3/services/kyc_card/`

#### Request Body

| Name                                            | Type   | Description                                                                                                                  |
| ----------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------- |
| selfie\_image<mark style="color:red;">\*</mark> | String | The file path to an image of the user's face in PNG, JPEG, or JPG file format                                                |
| front\_id<mark style="color:red;">\*</mark>     | String | Scanned Image of user's ID (front) in PNG, JPEG or JPG file format                                                           |
| back\_id<mark style="color:red;">\*</mark>      | String | Scanned Image of user's ID (back)  in PNG, JPEG, or JPG file format                                                          |
| extend\_data                                    | String | Set to true to retrieve the original response from the 3rd-party providers of Liveness, Face Compare, and OCR\_Card services |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "id": "08bcb59c-c01c-42b9-b666-44df639cff78"
}
```

{% endtab %}

{% tab title="400: Bad Request Image is missing or not in the correct format" %}

```javascript
{
    "selfie_image": [
        "No file was submitted."
    ],
    "front_id": [
        "No file was submitted."
    ],
    "back_id": [
        "No file was submitted."
    ],
    "extend_data": [
        "This field is required."
    ]
}
```

{% endtab %}
{% endtabs %}

## Extract an image from a driving license or ID and compare it to a selfie image

<mark style="color:blue;">`GET`</mark> `https://be.progeny.tech/api/v3/services/task/?id={{task_id}}`

#### Path Parameters

| Name | Type   | Description                                     |
| ---- | ------ | ----------------------------------------------- |
| id   | String | The task Id you obtained from your POST request |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "document": {
        "is_valid": true,
        "is_expired": false,
        "full_name": "ERIKA MUSTERMANN",
        "date_of_birth": "1983-08-12",
        "card_number": "L01XM00CH",
        "country": "Germany",
        "gender": "",
        "marital_status": "",
        "occupation": "",
        "religion": "",
        "portrait": "images/services/ocr_card/1795633768.jpg",
        "portrait_url": "https://be.progeny.tech/media/images/services/ocr_card/1795633768.jpg"
    },
    "compare": true,
    "liveness": true
}
```

{% endtab %}

{% tab title="400: Bad Request Image does not meet requirements" %}

```javascript
{
    "selfie_image": [
        "No file was submitted."
    ],
    "front_id": [
        "No file was submitted."
    ],
    "back_id": [
        "No file was submitted."
    ],
    "extend_data": [
        "This field is required."
    ]
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: 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:

```
GET https://docs.progeny.tech/our-api/kyc_card.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
