For the complete documentation index, see llms.txt. This page is also available as Markdown.

Document Integrity

Authentication Requirements:

  • Regular endpoints use OAuth2 authentication with base URL: https://api.us.prd.caf.io

  • For enhanced security, some endpoints may also support mTLS authentication with base URL: https://mtls.us.prd.caf.io

  • For information on implementing mTLS, access Using mTLS

Evaluates each image for quality issues (blur, glare, low resolution), physical damage, tampering, flash, and obstruction, plus a capture completeness check for the transaction, communicated through reasonCodes.

  • OCR completeness: completeness score of the fields extracted by OCR Sync, returned in the ocrCompletenessScore field.

Supported file formats: JPG, JPEG, PNG, BMP, PDF, HEIC. PDF and HEIC files are converted before processing.

Only signed URLs are accepted. Binary or base64 payloads are not supported. The host of the file URL must be previously approved by the Certta team.

Front and back images are required. This version accepts RG and CNH documents only.

Evaluate the integrity of an identity document (RG/CNH)

post
/

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.

Authorizations
AuthorizationstringRequired

JWT Authorization header using the Bearer scheme.

Body
Responses
200

Document evaluated successfully.

application/json
requestIdstringRequired

Unique request identifier generated by the service. Used for traceability and support correlation, and propagated to internal dependencies (OCR Sync and Quality Service).

Example: 550e8400-e29b-41d4-a716-446655440000
decisionstring · enumRequired

Public integrity outcome. APPROVED means the document passed the integrity policy. REPROVED means it failed.

Example: APPROVEDPossible values:
ocrCompletenessScorenumber · nullableOptional

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.

Example: 80.77
post/
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"
    }
  ]
}

Last updated