Integridade documental
Avalia cada imagem quanto a problemas de qualidade (borrão, reflexo, baixa resolução), dano físico, adulteração, flash e obstrução, além de uma verificação de completude da captura para a transação, comunicada por meio de reasonCodes.
Completude de OCR: pontuação de completude dos campos extraídos pelo OCR Sync, retornada no
ocrCompletenessScorecampo.
Formatos de arquivo compatíveis: JPG, JPEG, PNG, BMP, PDF, HEIC. Arquivos PDF e HEIC são convertidos antes do processamento.
Somente URLs assinadas são aceitas. Payloads binários ou em base64 não são suportados. O host da URL do arquivo deve ser previamente aprovado pela equipe da Certta.
Imagens da frente e do verso são obrigatórias. Esta versão aceita apenas documentos de RG e CNH.
Orchestrates OCR Sync and Quality Service (front and back) in parallel to evaluate the integrity of the submitted document. Only signed file URLs are accepted. Front and back are required in this version.
Supported formats: JPG, JPEG, PNG, BMP, PDF, HEIC. PDF and HEIC files are converted before processing.
The host of the file URL must be previously approved by the Certta team.
JWT Authorization header using the Bearer scheme.
Document evaluated successfully.
Unique request identifier generated by the service. Used for traceability and support correlation, and propagated to internal dependencies (OCR Sync and Quality Service).
550e8400-e29b-41d4-a716-446655440000Public integrity outcome. APPROVED means the document passed the integrity policy. REPROVED means it failed.
APPROVEDValores possíveis: OCR field-completeness score, rounded to two decimal places. Typical range is 0–100. Present only when OCR completeness is part of the assessment. null means the model did not produce a numeric completeness score for that request. Omitted when OCR completeness is not evaluated.
80.77Invalid request: malformed payload, unsupported file format, or missing front or back of the document.
Unauthorized (missing or invalid credentials).
Forbidden (no permission or tenant not enabled for the product).
Document not supported by the AI models (for example: selfie, random image, or incompatible front/back pair). The response body contains only message (without ocrCompletenessScore, capabilities, or reasonCodes).
Error or unavailability in the OCR Sync or Quality Service response, for requests with a valid and supported document.
POST /v1/document-integrity/ HTTP/1.1
Host: api.us.prd.caf.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 57
{
"files": [
{
"type": "FRONT",
"data": "https://example.com"
}
]
}{
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"decision": "REPROVED",
"capabilities": [
"quality",
"integrity"
],
"reasonCodes": [
{
"code": "MISSING_SIDE"
},
{
"code": "PARTIAL_CPF"
},
{
"code": "SHARP_IMAGE"
}
]
}Atualizado

