LogoLogo
Useful links
  • Home
  • Product guides
  • API
  • SDKs
  • Overview
  • CORE API
    • Authentication
    • Available resources
      • Transaction
      • Onboarding
      • Profile
      • Synchronous services
        • OCR Sync
        • Basic Data Sync (Individual)
    • Transaction details
      • Services
        • Document OCR
        • Documentscopy
        • Face Liveness
        • Facematch
        • Facial Biometrics
        • Private Faceset
        • Shared Faceset
        • Document Liveness
      • Background check
        • Data structure
        • KYC
          • Driver
          • Financial
          • Labor
          • Register data
          • Relationships
          • Risk
        • KYB
          • Financial
          • Labor
          • Register data
          • Risk
        • Vehicle
          • Register data
      • Validation rules
      • Manual reprovals
    • Webhooks
      • Transaction
      • Profile
      • Face authentication
  • MOBILE API
    • Authentication
    • Available resources
      • Face liveness (deprecated)
      • Face registration (deprecated)
      • Face authentication (deprecated)
    • Response signature
  • GLOBAL API
    • Authentication
    • Available resources
      • Services
        • Company search
        • Company record
        • Basic Data Sync (Individual)
        • Sanctions
      • Orchestrations
        • Transactions
          • Services
            • KYB
              • Credit Report
              • Business Identity
            • KYC
              • Adverse Media
              • PEPs
              • Sanctions
              • Warnings
              • Global identity verification
              • Global identity double verification
            • DOC ID
              • Global Document Verification
      • Onboardings
        • Links
    • Webhooks
  • SMART AUTH API
    • Authentication
    • Available resources
      • Authentications
      • Create identity
  • Joint resolution 6 API
    • Authentication
    • Available resources
      • Suspected fraud creation
      • Suspected fraud query
      • Suspected fraud update
      • Suspected fraud deletion
    • Using mTLS
    • Changelog
LogoLogo

2025 © Caf. - All rights reserved

On this page
  1. CORE API
  2. Transaction details
  3. Services

Document OCR

Optical Character Recognition - extraction of data from submitted documents.

Section: ocr

Required files: any document images

Specific attributes (RG)

Attribute
Type
Description

federativeUnit

String

State

rg

String

RG

via

String

issueDate

String

Date of Issue

name

String

Name

fatherName

String

Father's name

motherName

String

Mother's name

birthPlace

String

Place of birth

birthDate

String

Date of birth

referenceDocument

String

Document Source

cpf

String

CPF

issueState

String

State of Issue

issuingAuthority

String

Issuing Agency

rgIssuingAuthority

String

RG Issuing Agency

rgIssueState

String

State of RG Issue

department

String

Department

documentTypeRgFront

String

Document Type

footerRgBack

String

Footer RG back

graphicName

String

Graphic Name

headerRgFront

String

Header RG front

institute

String

Institute

issuingAuthorityHeader

String

Issuing Authority Header

lawRgBack

String

Law Rg back

parentsSeparator

String

ParentsSeparator

{
  "ocr": {
    "federativeUnit": "ESTADO DA BAHIA",
    "rg": "00.000.000-00",
    "via": "",
    "issueDate": "13/04/2015",
    "name": "JANE DOE",
    "fatherName": "JOHN DOE",
    "motherName": "MARIA DOE",
    "birthPlace": "JAGUAQUARA BA",
    "birthDate": "25/02/1952",
    "referenceDocument": "C.NAS. CM JAGUAQUARA BA",
    "cpf": "00000000000",
    "issueState": "BA",
    "issuingAuthority": "SSP",
    "rgIssuingAuthority": "SSP",
    "rgIssueState": "BA",
    "department": "SPTC / DEPARTAMENTO DE IDENTIFICACAO",
    "documentTypeRgFront": "CARTEIRA DE IDENTIDADE",
    "footerRgBack": "",
    "graphicName": "THOMAS GREG & SONS",
    "headerRgFront": "REPUBLICA FEDERATIVA DO BRASIL",
    "institute": "POLICIA CIVIL",
    "issuingAuthorityHeader": "SECRETARIA DE ESTADO DE SEGURANCA PUBLICA",
    "lawRgBack": "LEI NO 7.116 DE 29/08/83",
    "parentsSeparator": "E"
  }
}
Rule
Description

is_readable

Checks that the documents are legible

is_cnh

Verifies if the document sent is a CNH

has_cpf

Checks whether the transaction has a CPF (read by the OCR or entered manually)

cnh_has_valid_date

Checks that the expiry date of the CNH is not expired

valid_issue_date

Checks that the document's issue date is valid.

valid_cpf_number

Verifies if the CPF number is valid

valid_rg_number

Check that the ID number is valid.

valid_cnh_registration_number

Check that the CNH registration number is valid.

valid_rg_issue_authority

Check that the issuing body of the ID card is valid.

valid_issue_state

Checks that the UF of the body issuing the document is valid.

parameters_and_document_are_equal

Checks for discrepancies between the data in the document and that entered manually.

ocr_equals_parameters

The rule will be invalid if the information provided in the parameters and read by the OCR are different.

rg_issue_less_than_25

The rule will be invalid if the RG document type was issued more than 25 years ago.

is_literate

The rule will be invalid if the OCR identifies that the document belongs to a non-literate person.

rg_has_cpf

The rule will be invalid if the RG document type does not have the CPF field filled.

company_qsa_data_compatibility

The rule will be invalid if the name and CPF of the partners sent in the PJ onboarding are different from those in the PF onboarding.

data_and_document_are_equal

The rule will be invalid if there is a discrepancy between the parameter information and the OCR.

has_cnh_for_more_than_three_years

The rule will be invalid if the driver has less than 3 years of licensing.

has_definitive_cnh

The rule will be invalid if the driver does not have a permanent license.

document_issue_less_than_10

The rule will be invalid if the document was issued more than 10 years ago.

issued_over_16_years

Checks that the difference between the date of birth and the issue of the ID document is greater than or equal to 16 years.

first_and_last_name_similarity

Checks the similarity between the union of the first and last name sent in the parameters compared to the union of the first name and each surname in the source.

is_passport

The rule will be invalid if the document is not a passport.

is_not_passport

The rule will be invalid if the document is a passport.

is_not_ctps

The rule will be invalid if the document is not a work permit.

document_is_known

The rule will be invalid if the document is categorized as "others", "null", or "invalid".

parameters_and_document_undefined_or_equal

Checks for non-existence or divergence between document data and manually entered data.

invalid_range_ages

Checks that the CPF holder is within the configured age range.

Specific attributes (CNH)

Attribute
Type
Description

birthDate

String

Date of birth

cpf

String

CPF

name

String

Name

motherName

String

Mother's Name

fatherName

String

Father's Name

issueDate

String

Date of issue

rg

String

RG

rgIssueState

String

RG Issuing State

rgIssuingAuthority

String

RG issuing agency

acc

String

Moped Permit

category

String

Driver's license category

firstDriverLicenseDate

String

Date of your first driver's license

placeOfIssue

String

Place where CNH was issued

mirrorNumber

String

CNH mirror number

registrationNumber

String

CNH registration number

renachNumber

String

RENACH number

securityNumber

String

Security number

notes

String

Observations

expirationDate

String

Expiration date

cnhIssueState

String

CNH issue state

{
  "ocr": {
    "name": "JANE DOE",
    "rg": "00XXXXXXX99",
    "rgIssuingAuthority": "SSP",
    "rgIssueState": "RS",
    "cpf": "00000000000",
    "birthDate": "08/05/1999",
    "fatherName": "JOHN DOE",
    "motherName": "MARIA DOE",
    "acc": "",
    "category": "AB",
    "registrationNumber": "06XXXXXXX02",
    "expirationDate": "07/05/2032",
    "firstDriverLicenseDate": "26/07/2017",
    "mirrorNumber": "23XXXXXX51",
    "notes": "",
    "placeOfIssue": "PORTO ALEGRE, RS",
    "issueDate": "07/05/2022",
    "securityNumber": "02XXXXXXX60",
    "renachNumber": "RSXXXXXX070",
    "cnhIssueState": "RS"
  }
}

Specific attributes (CRLV)

Attribute
Type
Description

issueState

String

Issue state

crlvNumber

String

CRLV number

via

String

Via

renavamCode

String

Renavam code

rntrc

String

rntrc

assignmentYear

String

Assignment year

name

String

Name

cpf

String

CPF

cnpj

String

CNPJ

plate

String

Plate

previousPlateAndState

String

Previous plate and state

chassis

String

Chassis

type

String

Type

fuel

String

Fuel

brandAndMovel

String

Brand and Movel

manufactureYear

String

Manufacture Year

modelYear

String

Model year

capacityPowerCylinders

String

Capacity power cylinders

category

String

Category

predominantColor

String

PredominantColor

issueDate

String

Issue date

{
  "ocr": {
    "issueState": "SC",
    "crlvNumber": "00000000000000",
    "via": "",
    "renavamCode": "00000000000",
    "rntrc": "",
    "assignmentYear": "2017",
    "name": "CAF",
    "cpf": "",
    "cnpj": "0000000000000000",
    "plate": "00000",
    "previousPlateAndState": "000000",
    "chassis": "000000000000000000000000",
    "type": "PAS/AUTOMOVEL",
    "fuel": "",
    "brandAndModel": "VW/VOYAGE CL MB",
    "manufactureYear": "2014",
    "modelYear": "2015",
    "capacityPowerCylinders": "5P/104CV",
    "category": "ALCO/GASOL OFICIAL",
    "predominantColor": "PRATA",
    "issueDate": "20/07/2017"
  }
}

Specific attributes (CTPS)

Attribute
Type
Description

pisPasep

String

Pis Pasep

documentNumber

String

Document Number

documentSeries

String

Document Series

federativeUnit

String

Federative Unit

name

String

Name

motherName

String

Mother name

fatherName

String

Father name

birthDate

String

Birth date

maritalStatus

String

Marital Status

referenceDocument

String

Reference Document

cpf

String

CPF

issuePlace

String

Issue Place

issueDate

String

Issue Date

{
  "ocr": {
    "pisPasep": "0000000000000",
    "documentNumber": "00000000",
    "documentSeries": "0000",
    "federativeUnit": "MG",
    "name": "JANE DOE",
    "motherName": "JOHN DOE",
    "fatherName": "MARIA DOE",
    "birthDate": "02/08/1979",
    "maritalStatus": "SOLTEIRO",
    "birthPlace": "BELO HORIZONTE - MG",
    "referenceDocument": "C. I. MG 000000 19/11/2004 PC MG",
    "cpf": "00000000000000",
    "issuePlace": "SRTE/MG -",
    "issueDate": "18/05/2015"
  }
}

Specific attributes (RNE)

Attribute
Type
Description

birthDate

String

Birth Date

classification

String

Classification

entryDate

String

Entry date

fatherName

String

Father name

gender

String

Gender

issueDate

String

Issue date

issuingAuthority

String

Issuing Authority

legalProtection

String

Legal protection

motherName

String

Mother name

mrz

String

MRZ

name

String

Name

nationality

String

Nationality

nativeCountry

String

Native Country

rne

String

RNE

validity

String

Validity

via

String

Via

{
  "ocr": {
    "birthDate": "01/11/1988",
    "classification": "PERMANENTE",
    "entryDate": "31/08/2011",
    "fatherName": "JOHN DOE",
    "gender": "M",
    "issueDate": "17/11/2017",
    "issuingAuthority": "CGPI/DIREX/DPF",
    "legalProtection": "",
    "motherName": "MARIE DOE",
    "mrz": "",
    "name": "JAMES DEE",
    "nationality": "ANGOLANA",
    "nativeCountry": "ANGOLA",
    "rne": "0000000",
    "validity": "06/11/2026",
    "via": "1"
  }
}

Specific attributes (RNM)

Attribute
Type
Description

birthDate

String

Birth Date

classification

String

Classification

cpf

String

CPF

fatherName

String

Father name

gender

String

Gender

issueDate

String

Issue date

issuingAuthority

String

Issuing Authority

legalProtection

String

Legal protection

motherName

String

Mother name

mrz

String

MRZ

name

String

Name

nationality

String

Nationality

protocol

String

Protocol

residenceTerm

String

Resident Term

rnm

String

RNM

validity

String

Validity

{
  "ocr": {
    "birthDate": "30/05/1989",
    "classification": "TEMPORARIO",
    "cpf": "0000000000",
    "fatherName": "MARIE DEE",
    "gender": "M",
    "issueDate": "22/01/2019",
    "issuingAuthority": "CGPI/DIREX/PF",
    "legalProtection": "ART. 14. I. LETRA C DA LEI 13.445/2017.",
    "motherName": "ROSEMOND DEE",
    "mrz": "<<<<<<<<< 000 <<<<<<<<<< 0 000",
    "name": "JEAN DEE",
    "nationality": "HAITI",
    "protocol": "",
    "residenceTerm": "22/10/2020",
    "rnm": "000000000",
    "validity": "22/10/2020"
  }
}

Specific attributes (PASSPORT)

Attribute
Type
Description

birthDate

String

Birth Date

expirationDate

String

Expiration date

frontNumber

String

Front number

gender

String

Gender

issueDate

String

Issue date

issuingAuthority

String

Issuing authority

issuingCountry

String

Issuing country

motherName

String

Mother name

mrz

String

MRZ

name

String

Name

nationality

String

Nationality

naturality

String

Nationality

number

String

Number

type

String

Type

{
  "ocr": {
    "birthDate": "23/07/1982",
    "expirationDate": "05/06/2027",
    "fatherName": "JOSE DEE",
    "front_number": "000000",
    "gender": "M",
    "issueDate": "06/06/2017",
    "issuingAuthority": "DPF/CAS/SP",
    "issuingCountry": "BRA",
    "motherName": "MARIA DEE",
    "mrz": "0<000<000<000 << 000<000 <<<<<<<<<<<<<< 00000<000000 <<<<<<<<<<<<<< 00",
    "name": "JOSE DEE JUNIOR",
    "nationality": "BRASILEIRO(A)",
    "naturality": "MARILIA/SP",
    "number": "00000",
    "type": "P"
  }
}

Specific attributes (NEW CRLV)

Attribute
Type
Description

assignmentYear

String

Assignment year

axles

String

Axles

body

String

Body

brandAndModel

String

Brand and Model

capacityInPeople

String

Capacity in people

capacityInWeight

String

Capacity in Weight

capacityPowerCylinders

String

Capacity power cylinders

cat

String

Cat

category

String

Category

chassis

String

Chassis

claSecurityNumber

String

Cla security number

cmt

String

CMT

cnpj

String

CNPJ

cpf

String

CPF

cpfMask

String

CPF mask

crlvNumber

String

CRLV number

crvNumber

String

CRV number

fuel

String

Fuel

issueAuthority

String

Issue authority

issueDate

String

Issue date

issuePlace

String

Issue place

issueState

String

Issue state

manufactureYear

String

Manufacture Year

modelYear

String

Model year

motor

String

Motor

name

String

Name

plate

String

Plate

predominantColor

String

Predominant color

previousPlateAndState

String

Previous plate and state

renavamCode

String

Renavam code

type

String

Type

vehicleObservations

String

Vehicle observations

{
  "ocr": {
    "assignmentYear": "",
    "axles": "3",
    "body": "NAO APLICAVEL CARROCERIA ABERTA",
    "brandAndModel": "SR/RANDON SR CA",
    "capacityInPeople": "00P",
    "capacityInWeight": "26.0",
    "capacityPowerCylinders": "0CV/****",
    "cat": "",
    "category": "BRANCA",
    "chassis": "00000000000000",
    "claSecurityNumber": "",
    "cmt": "*.*",
    "cnpj": "00000000000000",
    "cpf": "",
    "cpfMask": "",
    "crlvNumber": "",
    "crvNumber": "",
    "fuel": "",
    "issueAuthority": "DETRAN-GO",
    "issueDate": "06/04/2020",
    "issuePlace": "RIO VERDE GO",
    "issueState": "GO",
    "manufactureYear": "",
    "modelYear": "",
    "motor": "0000000000000",
    "name": "CAF",
    "plate": "",
    "predominantColor": "",
    "previousPlateAndState": "00000/MT",
    "renavamCode": "",
    "type": "SEMI-REBOQUE",
    "vehicleObservations": ""
  }
}

Specific attributes (NEW CNH)

Attribute
Type
Description

name

String

Name

firstDriverLicenseDate

String

First driver license date

birthDate

String

Birth date

birthPlace

String

Birth place

birthState

String

Birth state

birthDateCityState

String

Birth date, city and state

issueDate

String

Issue date

expirationDate

String

Expiration date

acc

String

Acc

definitiveOrPermissionary

String

Definitive or permissionary

rg

String

RG

rgMask

String

RG mask

rgIssuingAuthority

String

RG issuingAuthority

rgIssueState

String

RG issue state

rgNumberAuthorityState

String

RG number authority state

cpf

String

CPF

cpfMask

String

CPF mask

registrationNumber

String

Registration number

category

String

Category

nationality

String

Nationality

fatherName

String

Father name

motherName

String

Mother name

mirrorNumber

String

Mirror number

notes

String

Notes

placeOfIssue

String

Place of issue

securityNumber

String

Security number

renachNumber

String

Renach number

cnhIssueState

String

CNH issue state

{
  "ocr": {
    "name": "EDIO DEE",
    "firstDriverLicenseDate": "24/04/1985",
    "birthDate": "27/09/1966",
    "birthPlace": "BLUMENAU",
    "birthState": "SC",
    "birthDateCityState": "27/09/1966 BLUMENAU/SC",
    "issueDate": "30/06/2022",
    "expirationDate": "09/06/2027",
    "acc": "",
    "definitiveOrPermissionary": "D",
    "rg": "00000000",
    "rgMask": "9999999",
    "rgIssuingAuthority": "SSP",
    "rgIssueState": "SC",
    "rgNumberAuthorityState": "000000 SSP SC",
    "cpf": "00000000000",
    "cpfMask": "999.999.999-99",
    "registrationNumber": "0000000000000",
    "category": "AB",
    "nationality": "BRASILEIRO",
    "fatherName": "WALTER DEE",
    "motherName": "INGELORE DEE",
    "mirrorNumber": "000000000000000",
    "notes": "",
    "placeOfIssue": "FLORIANOPOLIS, SC",
    "securityNumber": "000000000000",
    "renachNumber": "SC00000000",
    "cnhIssueState": "SC"
  }
}

Specific attributes (NEW RG)

Attribute
Type
Description

birthDate

String

Birth date

birthPlace

String

Birth place

cpf

String

CPF

cpfMask

String

CPF mask

department

String

Department

documentTypeRgFront

String

Document type RG front

expirationDate

String

Expiration date

fatherName

String

Father name

federativeUnit

String

Federative Unit

footerRgBack

String

Footer RG Back

graphicName

String

Graphic Name

headerRgFront

String

Header RG front

institute

String

Institute

issueDate

String

Issue date

issueState

String

Issue state

issuingAuthority

String

Issuing Authority

issuingAuthorityHeader

String

Issuing Authority Header

lawRgBack

String

Law RG back

motherName

String

Mother name

name

String

Name

parentsSeparator

String

Parents separator

referenceDocument

String

Reference Document

rg

String

RG

rgIssueState

String

RG issue state

rgIssuingAuthority

String

RG issue authority

rgMask

String

RG mask

via

String

Via

{
  "ocr": {
    "birthDate": "27/07/1978",
    "birthPlace": "GUARULHOS - SP",
    "cpf": "00000000000",
    "cpfMask": "999999999/99",
    "department": "",
    "documentTypeRgFront": "CARTEIRA DE IDENTIDADE",
    "expirationDate": "01/01/2030",
    "fatherName": "JOHN DEE",
    "federativeUnit": "ESTADO DE SAO PAULO",
    "footerRgBack": "VAL",
    "graphicName": "VALI5",
    "headerRgFront": "REPUBLICA FEDERATIVA DO BRASIL",
    "institute": "INSTITUTO DE IDENTIFICACAO 'RICARDO GUMBLETON DAUNT'",
    "issueDate": "06/01/2020",
    "issueState": "SP",
    "issuingAuthority": "SSP-SP",
    "issuingAuthorityHeader": "SIPA SECRETARIA DA SEGURANCA PUBLICA",
    "lawRgBack": "LEINO 7.116, DE 29 DE AGOSTO DE 1983",
    "motherName": "MARIA DEE",
    "name": "REIS DEE",
    "parentsSeparator": "",
    "referenceDocument": "GUARULHOS - SP 1.SUBDISTRITO CC:LV.0000/0000 /N.00000",
    "rg": "0000000000",
    "rgIssueState": "SP",
    "rgIssuingAuthority": "SSP-SP",
    "rgMask": "99.999.999-9",
    "via": "2 via"
  }
}

Last updated 14 days ago