Result Codes

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:

StatusColourMeaning
ai_approved🟒 GreenThe document has been verified and is valid
verify🟑 YellowThe document could not be fully verified β€” manual review is needed
ai_rejectedπŸ”΄ RedThe document failed one or more checks

Result codes reference

Approved

CodeNameDescription
1.0ai_approvedThe document has been fully verified by the AI β€” it is valid and compliant

To review

CodeNameDescription
4.0toVerifyThe 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.

CodeNameDescription
2.0readabilityGeneral readability failure β€” the document could not be processed
2.1readabilityPartial text extraction failure
2.2readabilityCould not read textual information on the document
2.3readabilityLow document quality β€” the image is too degraded for analysis
2.4missingMRZThe MRZ (Machine Readable Zone) could not be found on the document
2.5missingPartOne side of the document is missing (e.g. only the front was submitted for a two-sided ID)
2.6noIdFoundCould not find any identity document in the submitted image

Rejected β€” Document validity issues (3.x)

CodeNameDescription
3.0expiredThe document has expired

Rejected β€” Fraud and authenticity (5.x)

CodeNameDescription
5.0suspiciousAt least one element on the document is suspected to be fraudulent

Rejected β€” Document type issues (6.x)

CodeNameDescription
6.0wrongDocTypeThe submitted document does not match the expected document type
6.1wrongDocTypeDocument type mismatch with the requested analysis
6.2wrongDocTypeUnsupported document type

Rejected β€” Identity mismatch (7.x)

CodeNameDescription
7.0ownerThe owner of the document does not match the user input (name, date of birth, etc.)

Rejected β€” Specimen detection (8.x)

CodeNameDescription
8.0specimenThe 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:

{
  "documents": [
    {
      "id": "67eeb0f48e593a00113f09a7",
      "code": "1.0",
      "type": "national_id_card_fr_2003",
      "status": "ai_approved",
      "extractedInformations": { ... },
      "controlCategories": { ... }
    }
  ]
}

Status from controls

When a document is analysed, the AI runs multiple controls (checks) on it. Each control returns one of three values:

Control valueMeaning
trueThe check passed
falseThe check failed
nullThe 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