Document
Is this passport or ID card internally consistent, does it match what the applicant declared, and does the file show signs of editing? Ward checks the MRZ check digits, compares fields, inspects the file and screens the holder.
Type: document · Endpoint: POST /api/v1/documents/check · File (8 MB)
Request
curl https://api.mandatelabs.ai/api/v1/decide \
-H "X-API-Key: $WARD_API_KEY" -H "Content-Type: application/json" \
-d '{"type": "document", "input": {"file_base64": "'"$(base64 < passport.jpg)"'", "file_name": "passport.jpg",
"claimed": {"name": "Ana Maria Perez", "date_of_birth": "1990-05-01", "nationality": "PAN"}}}'
import base64
d = client.decide("document", {"file_base64": base64.b64encode(open("passport.jpg", "rb").read()).decode(),
"file_name": "passport.jpg",
"claimed": {"name": "Ana Maria Perez", "date_of_birth": "1990-05-01"}})
import { readFileSync } from "node:fs";
const d = await client.decide("document", { file_base64: readFileSync("passport.jpg").toString("base64"),
file_name: "passport.jpg", claimed: { name: "Ana Maria Perez", date_of_birth: "1990-05-01" } });
Input
| Field | Description |
|---|---|
mrz |
The 2 or 3 MRZ lines as printed (TD1 ID cards, TD3 passports) |
file_base64, file_name |
JPEG, PNG, HEIC or PDF, max 8 MB decoded. Without mrz, the MRZ is read from the image (OCR, on Mandate's servers) |
claimed |
What the applicant declared: name, date_of_birth, document_number, expiry, nationality |
screen_holder |
Screen the MRZ name (default true) |
At least one of mrz or file_base64 is required. The file is analysed in memory and discarded.
Result
| Field | Meaning |
|---|---|
verdict |
consistent, review, mismatch, altered, insufficient; not_an_id or profile when the file is something else |
alteration_score, alteration_band |
Heuristic score from published weights (editor software in metadata, PDF incremental updates, type mismatch, failed check digits, …) |
mrz |
Parsed fields, source (pasted / ocr) and confirmed (all check digits pass) |
expired |
The document has expired |
claimed_mismatch |
Declared data the document contradicts |
signals, notes |
Every signal with its weight; what could not be checked |
screening |
The holder's screening result |
Decision: consistent → APPROVE; review, mismatch, insufficient → STEP_UP; altered → DECLINE.
The check does not prove a physical document is genuine, nor match a face to it. Pair it with your liveness or selfie provider.