Status codes returned by the Document API for every processed document
Every document processed through the Document API receives a result code that indicates the outcome of the analysis. These codes are returned in the API response and are used to determine the document's status.
Code-to-status mapping
Each code maps to one of three statuses:
Status
Colour
Meaning
ai_approved
π’ Green
The document has been verified and is valid
verify
π‘ Yellow
The document could not be fully verified β manual review is needed
ai_rejected
π΄ Red
The document failed one or more checks
Result codes reference
Approved
Code
Name
Description
1.0
ai_approved
The document has been fully verified by the AI β it is valid and compliant
To review
Code
Name
Description
4.0
toVerify
The AI could not process all controls on the document β please review its authenticity manually
Rejected β Readability issues (2.x)
These codes indicate the document could not be properly read or processed.
Code
Name
Description
2.0
readability
General readability failure β the document could not be processed
2.1
readability
Partial text extraction failure
2.2
readability
Could not read textual information on the document
2.3
readability
Low document quality β the image is too degraded for analysis
2.4
missingMRZ
The MRZ (Machine Readable Zone) could not be found on the document
2.5
missingPart
One side of the document is missing (e.g. only the front was submitted for a two-sided ID)
2.6
noIdFound
Could not find any identity document in the submitted image
Rejected β Document validity issues (3.x)
Code
Name
Description
3.0
expired
The document has expired
Rejected β Fraud and authenticity (5.x)
Code
Name
Description
5.0
suspicious
At least one element on the document is suspected to be fraudulent
Rejected β Document type issues (6.x)
Code
Name
Description
6.0
wrongDocType
The submitted document does not match the expected document type
6.1
wrongDocType
Document type mismatch with the requested analysis
6.2
wrongDocType
Unsupported document type
Rejected β Identity mismatch (7.x)
Code
Name
Description
7.0
owner
The owner of the document does not match the user input (name, date of birth, etc.)
Rejected β Specimen detection (8.x)
Code
Name
Description
8.0
specimen
The document has been found in the specimen database β it is a sample or test document, not a real one
How codes are used
In the API response
The code is returned in the code field of the document object:
When a document is analysed, the AI runs multiple controls (checks) on it. Each control returns one of three values:
Control value
Meaning
true
The check passed
false
The check failed
null
The check was inconclusive
The document status is derived from these controls:
All controls true β ai_approved
Any control false β ai_rejected
Any control null (and none false) β verify
Fallback behaviour
If no code is returned by the analysis engine, the document defaults to verify (to review)
If a code is not recognised, the document defaults to verify
Codes starting with 1 β approved, codes starting with 4 β to review, all other codes β rejected
Tips
A code 2.x usually means the user should resubmit the document with a better quality photo
A code 5.0 warrants careful manual inspection β open the document detail view to see exactly which element was flagged
Code 7.0 (owner mismatch) can be a false positive if the user's name was entered differently from how it appears on the document (e.g. accented characters, maiden name vs. married name)
Code 8.0 (specimen) is a strong fraud indicator β the document matches a known sample document from the internet