> For the complete documentation index, see [llms.txt](https://api-old.innov8tif.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-old.innov8tif.com/okaydoc/data-consistency-check/passport-mrz-visual-consistency-check-and-mrz-validity.md).

# Passport MRZ-Visual Consistency Check and MRZ Validity

## Field Verification Result enum

| enum | Constant            | Description                              |
| ---- | ------------------- | ---------------------------------------- |
| 0    | RCF\_DISABLED       | comparison wasn't done, result undefined |
| 1    | RCF\_VERIFIED       | verification passed                      |
| 2    | RCF\_NOT\_VERIFIED  | verification failed                      |
| 3    | RCF\_Compare\_True  | positive comparison result               |
| 4    | RCF\_Compare\_False | negative comparison result               |

## Matrix In JSON Result

![Matrix Array](/files/-LvxyMdwDR_CWT9n8sLw)

## Interpretation of Matrix

For MRZ data validity, look at index 0; for MRZ-VISUAL consistency check, look at index 5.

| Index | Meaning                                                          |
| ----- | ---------------------------------------------------------------- |
| 0     | MRZ data verification result                                     |
| 1     | RFID-chip data verification result                               |
| 2     | document filling text fields data verification result            |
| 3     | bar-codes data verification result                               |
| 4     | MRZ and RFID-chip data comparing result                          |
| 5     | MRZ and document filling text fields data comparing result       |
| 6     | MRZ and bar-codes data comparing result                          |
| 7     | document filling text fields and RFID-chip data comparing result |
| 8     | document filling text fields and bar-codes data comparing result |
| 9     | RFID-chip and bar-codes data comparing result                    |

## Fields To Be Checked for Data Consistency

| FieldType | FieldName           |
| --------- | ------------------- |
| 0         | Document class code |
| 1         | Issuing state code  |
| 2         | Document #          |
| 3         | Date of expiry      |
| 5         | Date of birth       |
| 12        | Sex                 |

## Fields to be Checked for Data Validity

| FieldType | FieldName                       |
| --------- | ------------------------------- |
| 80        | Check digit for document number |
| 81        | Check digit for date of birth   |
| 82        | Check digit for date of expiry  |
| 84        | Final check digit               |

## Passport MRZ Interpretation

![](/files/-Mbit3KUjKpG-fN3aMyV)

| Positions | Length | Meaning                                                            |
| --------- | ------ | ------------------------------------------------------------------ |
| 1–9       | 9      | Passport number                                                    |
| 10        | 1      | Check digit over digits 1–9                                        |
| 11–13     | 3      | Nationality (ISO 3166-1 alpha-3 code with modifications)           |
| 14–19     | 6      | Date of birth (YYMMDD)                                             |
| 20        | 1      | Check digit over digits 14–19                                      |
| 21        | 1      | Sex (M, F or < for male, female or unspecified)                    |
| 22–27     | 6      | Expiration date of passport (YYMMDD)                               |
| 28        | 1      | Check digit over digits 22–27                                      |
| 29–42     | 14     | Personal number (may be used by the issuing country as it desires) |
| 43        | 1      | Check digit over digits 29–42 (may be < if all characters are <)   |
| 44        | 1      | Check digit over digits 1–10, 14–20, and 22–43                     |

{% hint style="info" %}
Download this document for details.
{% endhint %}

{% file src="/files/-Lvy0DQ9HD\_podIgZryh" %}
