Documents and MRZ
Read an identity document from a photo: what it is, every printed and MRZ field, the portrait, and whether it passes its checks.
Read a document#
documents.read is the full read. Send the front, and the back when the document has one.
curl -X POST https://verisec.dev/v1/idv/read \
-H "Authorization: Bearer $VERISEC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"image_front": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==",
"scenario": "FullProcess"
}'The answer holds everything the reader found: the document type, the printed and MRZ fields, the portrait, and the security and image-quality checks. When you only need one part, ask for that part:
documents.classify- What the document is: its name, category, issuing country and year, with a confidence.
documents.fields- Which fields were read and from where, whether each is valid, and whether the sources agree. Values are masked, so it's safe to log.
documents.mrz- The MRZ from the document photo: the lines, the parsed fields and every check digit recomputed.
documents.portrait- The face photo cut from the document, plus a one-time reference you can pass straight to face.verify as
image1. documents.authenticity- Each check as pass, fail or not checked, with one overall verdict. Expiry counts as a check.
Parse an MRZ#
The MRZ is the machine-readable block at the bottom of a passport or ID. mrz.parse takes the lines as text, with no image, and recomputes every check digit:
curl -X POST https://verisec.dev/v1/mrz/parse \
-H "Authorization: Bearer $VERISEC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"lines": [
"P<UTOERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<",
"L898902C36UTO7408122F1204159ZE184226B<<<<<10"
]
}'mrz.read finds the MRZ in a photo, reads it and parses it in one call, and mrz.recognize only reads the lines.
Proof of address#
proofOfAddress.analyze reads a utility bill, bank statement or letter and checks it against the name, address and country you expect, with a check that it's recent and hasn't been edited.
Every document and MRZ endpoint#
| Endpoint | What it does |
|---|---|
POST/v1/idv/read | Document Read |
POST/v1/idv/classify | Document Classify |
POST/v1/idv/mrz | Document MRZ |
POST/v1/idv/portrait | Document Portrait |
POST/v1/idv/authenticity | Document Authenticity |
POST/v1/idv/fields | Document Fields |
POST/v1/poa/analyze | Proof of Address |
POST/v1/mrz/read | MRZ Read |
POST/v1/mrz/recognize | MRZ Recognize |
POST/v1/mrz/parse | MRZ Parse |