# Tunisian National ID

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

<mark style="color:green;">`POST`</mark> `https://sandbox.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 %}
