Developers

Retrieve the OCR result

Processing is asynchronous. Poll the document until it leaves the processing state.

Fetch a document

curl https://api.mahadocr.com/v1/documents/DOC_831d6b45e154 \
  -H "X-MahadDoc-API-Key: mk_live_YOUR_KEY"

Status values

  • processing — still being read
  • verified — every required field confirmed by evidence
  • review — at least one field disputed, unreadable or missing; a person checks it
  • flagged — signs of editing or tampering were found; a person must check the document before you rely on it
  • failed — the document could not be read

Polling ends at verified, review, flagged or failed. After a human check a document may later change to verified or rejected, so read the status again before acting on a review or flagged result.

Response shape

{
  "status": "verified",
  "result": {
    "decision": "verified",
    "document_type": "passport",
    "values": { "surname": "ERIKSSON", "given_names": "ANNA MARIA", "document_number": "L898902C3", "date_of_birth": "1974-08-12", "expiry_date": "2027-04-15" },
    "field_evidence": { "surname": "corroborated", "document_number": "deterministic", "date_of_birth": "deterministic" },
    "review_reasons": []
  }
}