# Tunisian National ID

## <mark style="color:blue;">Tunisian National ID OCR</mark>

<mark style="color:green;">`POST`</mark> `https://www.valifystage.com/api/v1/ocr/`&#x20;

#### Headers

| Name           | Type   | Description            |
| -------------- | ------ | ---------------------- |
| Content-Type   | string | application/json       |
| Authentication | string | bearer \<access-token> |

#### Request Body

<table><thead><tr><th width="142.5999755859375">Name</th><th width="71.79998779296875">Type</th><th width="345.199951171875">Description</th><th>Notes</th></tr></thead><tbody><tr><td>document_type</td><td>string</td><td>tun_nid_ocr</td><td></td></tr><tr><td>data</td><td>object</td><td>Object containing the parameters below:<br><code>{</code> <br><code>"front_img": ,</code><br><code>"back_img": ,</code> <br><code>"bundle_key": ,</code><br><code>"lang": # optional default is "en"</code><br><code>}</code></td><td>Please note that <code>front_img,back_img</code> and <code>bundle_key</code> cannot be empty (i.e., missing or an empty string <code>""</code>).</td></tr></tbody></table>

**Status Codes**

{% tabs %}
{% tab title="✅200 Successful" %}

```python
{
    "result": {
        "nid": <string>,
        "last_name": <string>,
        "first_name": <string>,
        "father_name": <string>,
        "husband_name": <string>,
        "birthdate": <string>,
        "birthplace": <string>,
        "mother_name": <string>,
        "profession": <string>,
        "address": <string>,
        "issue_date": <string>,
        "thumbprint_code": <string>,
    },
    "transaction_id": <string>,
    "trials_remaining": <int>

```

{% endtab %}

{% tab title="5015 CONTACT\_SERVER\_ADMIN" %}

```python
{
    "message": "An error occurred. Please try again and if the error persists, please contact us at techsupport@valify.me",
    "error_code": 5015,
    "transaction_id": 1234,
    "trials_remaining": 0
}
```

{% endtab %}

{% tab title="5009 INVALID\_DATA " %}

```python
{
    "message": "An error occurred. Please try again and if the error persists, please contact us at techsupport@valify.me",
    "error_code": 5009,
    "transaction_id": "1234",
    "trials_remaining": 0
}
```

{% 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://valify.gitbook.io/documentation/kyc/kyc-documents/tunisian-national-id.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.
