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. Available resources
  3. Synchronous services

OCR Sync

Last updated 2 months ago

This service performs the OCR on the sent document and returns the extracted data in the same request.

Run synchronous OCR

post

Send images of an individual's document to get the data extracted by OCR.

Header parameters
AuthorizationstringRequired

Customer access token. See more in the 'Authentication' topic of this section.

Example: Bearer your_token_here
Body
forceDocTypestringOptional

Force the use of a specific template and skip the document type identification step, improving the request's response time. This must be the same value returned by the Document Detector SDK. Allowed values: cnh, cnh_new, rg, rg_new, rne, rnm, ctps, passport, crlv, crlv_new, cin.

Example: rg
returnSelectedImagesbooleanOptional

Whether or not to return 'images.selectedFront' and/or 'images.selectedBack' attributes as URLs to download processed images.

Example: false
Responses
200
Success
application/json
400
Bad request
application/json
401
Unauthorized
application/json
500
Internal Server Error
application/json
post
POST /v1/transactions HTTP/1.1
Host: api.combateafraude.com
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 173

{
  "template": {
    "services": [
      "ocr_sync"
    ]
  },
  "files": [
    {
      "data": "https://my-image-name.jpg",
      "type": "FRONT",
      "mimeType": "image/jpeg"
    }
  ],
  "forceDocType": "rg",
  "returnSelectedImages": false
}
{
  "requestId": "6cb8093c-14ef-4fd1-810b-ee9fa5f9aae9",
  "id": "6021a21b3811c35ecb8dea20",
  "type": "rg",
  "data": {
    "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"
  }
}