# UAE Resident ID OCR

```markdown
This API provides Data Extraction for the UAE Resident ID
```

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

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

#### Headers

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

#### Request&#x20;

| Name                                             | Type   | Description                                                                                                                                                                       |
| ------------------------------------------------ | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| document\_type<mark style="color:red;">\*</mark> | string | uae\_resident\_id                                                                                                                                                                 |
| data<mark style="color:red;">\*</mark>           | object | <p>Request details</p><p><code>{</code> <br>  <code>img: \<base64 str>,</code><br>  <code>bundle\_key: \<str>,</code><br>  <code>lang: \<str></code><br><code>}</code></p><p></p> |

#### Status Codes

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

```python
{
  "result": {
    "type": "<string>",
    "country": "<string>",
    "number": "<string>",
    "date_of_birth": "<string>",
    "expiration_date": "<string>",
    "nationality": "<string>",
    "sex": "<string>",
    "name": "<string>",
    "surname": "<string>",
    "optional1": "<string>",
    "personal_number": "<string>",
    "validity": <int>,
    "serial_number": "<string>"
  },
  "transaction_id": "<string>",
  "trials_remaining": <int>
}
```

{% endtab %}

{% tab title="400 Missing input data" %}

```python
{
    "message": "Bad Request – invalid request received (e.g. missing Bundle key, required parameters or invalid json) | Make sure all the required parameters are included"
}
```

{% endtab %}

{% tab title="401 Invalid bundle key" %}

```python
{
    "message": "Unauthorized – your Bundle key is invalid"
}
```

{% endtab %}

{% tab title="403 Access token error" %}

```python
{
    "message": "Forbidden – specified access_token could not be found"
}
```

{% endtab %}

{% tab title="404 Check the endpoint" %}

```python
{
    "message": "Not Found"
}
```

{% endtab %}

{% tab title="415 The format should be base64" %}

```python
{
    "message": "Unsupported Media Type"
}
```

{% endtab %}

{% tab title="422 Check Valify error codes" %}

```python
{
    "message": "<error-description>",
    "error_code": <valify-error-code>
}
```

{% endtab %}

{% tab title="500: Internal Server Error" %}

```python
{
    "message": "Internal Server Error"
}
```

{% endtab %}

{% tab title="500 Contact us" %}

```python
{
    "message": "Internal Server Error"
}
```

{% endtab %}
{% endtabs %}
