Documents belong to a submission.
Identify a document with country_code, document_type (a category such as formation), and document_subtype (such as acta_constitutiva or contrato_social). For photo identification and proof of address, you can omit the subtype and let Niva detect it. The country must match the submission's market, except that Mexican submissions accept photo identification from other issuing countries.
Niva validates a document when it is uploaded and extracts data from it according to its type.
Each document has a validation_status: valid when instant checks pass, warning for non-blocking issues, fail for blocking issues, or incomplete when an ID needs its other side. validating means checks are still pending; a blocking result can appear before all checks finish. validation_errors lists the problems and messages you can show to the applicant.