# OCR01

## OCR

<mark style="color:green;">`POST`</mark> `https://biometrid.com/api/providers/custom/ocr01/ocr?processId={{processId}}`

This enpoint allows you to perform an OCR validation

#### Query Parameters

| Name      | Type   | Description                      |
| --------- | ------ | -------------------------------- |
| processId | String | ID of process to save the result |

#### Headers

| Name                                            | Type   | Description                          |
| ----------------------------------------------- | ------ | ------------------------------------ |
| Acccept-Language                                | String | en (default), pt                     |
| Content-type<mark style="color:red;">\*</mark>  | String | application/json                     |
| Authorization<mark style="color:red;">\*</mark> | String | Authentication account or user token |

#### Request Body

| Name                                      | Type   | Description               |
| ----------------------------------------- | ------ | ------------------------- |
| doctype<mark style="color:red;">\*</mark> | String | Options: idcard, passport |
| front<mark style="color:red;">\*</mark>   | String | Base64 string             |
| back                                      | String | Base64 string             |

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

```
{
  "data": {
    "fields": {
      "surnames": "string",
      "names": "string",
      "gender": "string",
      "height": "string",
      "nationality": "string",
      "birth_date": "string",
      "id_number": "string",
      "doc_number": "string",
      "expiry_date": "string",
      "parents": "string",
      "tax_number": "string",
      "social_security_number": "string",
      "health_number": "string",
      "mrz": {
        "line0": "string",
        "line1": "string",
        "line2": "string"
      },
      "origin": "string",
      "model": "string"
    },
    "images": {
      "front": "base64-string",
      "back": "base64-string",
      "signature": "base64-string",
      "photo": "base64-string"
    },
    "result": "GOOD",
    "validations": {
      "element_front_country": "GOOD",
      "element_front_title": "GOOD",
      "element_front_chip": "GOOD",
      "element_front_dovid": "GOOD",
      "element_front_mli": "GOOD",
      "element_front_coat_arms": "GOOD",
      "element_front_quina": "GOOD",
      "element_back_filet": "GOOD",
      "element_back_title": "GOOD",
      "element_back_armillary": "GOOD",
      "element_back_european": "GOOD",
      "element_back_text": "GOOD",
      "fake_front_value": "GOOD",
      "fake_back_value": "GOOD",
      "fake_front_ratio": 1,
      "fake_back_ratio": 1,
      "spoof_front_value": "GOOD",
      "spoof_back_value": "GOOD",
      "spoof_front_ratio": 1,
      "spoof_back_ratio": 1,
      "front_quality_ratio": 33.38,
      "front_quality_value": "BAD",
      "front_brightness": "VERY GOOD [83.92 %]",
      "front_blurring": "BAD [24.71 %]",
      "back_quality_ratio": 35.95,
      "back_quality_value": "BAD",
      "back_brightness": "GOOD [72.94 %]",
      "back_blurring": "BAD [29.82 %]",
      "integrity_id_number": "GOOD",
      "integrity_doc_number": "GOOD",
      "expiration_date": "GOOD",
      "match_doc_number": "GOOD",
      "integrity_tax_number": "GOOD",
      "integrity_birth_date": "GOOD",
      "integrity_expiry_date": "GOOD",
      "match_birth_date": "BAD",
      "match_name": "GOOD",
      "match_surname": "GOOD",
      "match_gender": "GOOD",
      "match_id_number": "GOOD",
      "match_nationality": "BAD",
      "match_expiry_date": "GOOD",
      "score": 96.12,
      "value": "GOOD"
    },
    "process": "6176b97741ad41fdd6c36713",
    "message": "DOCUMENT_VALIDATED_WITH_SUCCESS"
  },
  "meta": {
    "message": "Success."
  },
  "status": true
}
```

{% endtab %}
{% endtabs %}
