OCR extraction API

Extract text and data from ID documents using Optical Character Recognition (OCR). This API supports Australian Driver’s Licenses and Passports (any country).

Looking for a ready-made solution? Use OneSDK’s OCR module to capture document details without building your own UI.

Prerequisites

Before using the OCR API, ensure you have:

  1. Created an entity in Frankie via Create New Entity
  2. Obtained user consent (can be added during entity creation or via update)
  3. A base64 encoded image of the ID document (front or back)

For more information about consent requirements, see About consent.

How It Works

  1. Send a single ID document image to the API
  2. The service performs OCR and creates a document object
  3. The document object is attached to the entity
  4. The API returns the updated entity with OCR results
  5. Check the status in the response to determine if additional images are needed

Response Statuses

OCR Data Comparison

The service automatically compares extracted OCR data with existing entity information. Any mismatches are reported in the ocr_scanned_mismatch field.

Compared Fields

  • First name
  • Last name
  • Date of birth
  • ID document number
  • State of ID document (configurable)
  • ID card number (configurable)

API Usage Example

1curl --request POST \
2 --url https://api.kycaml.uat.frankiefinancial.io/idv/v2/idvalidate/ocr \
3 --header 'accept: application/json' \
4 --header 'content-type: application/json' \
5 --data '
6{
7 "entity": {
8 "entityId": "09dc9c8a-0a83-4669-20cc-e3a108b4c54c"
9 },
10 "fileData": {
11 "scanFilename": "DL.jpeg",
12 "scanMIME": "image/jpeg",
13 "scanSide": "F", // F for Front, B for Back
14 "scanType": "PHOTO",
15 "scanData": "VGhpcyBpcyBzb21lIGV4YW1wbGUgZGF0YS4=" // Base64 encoded image data
16 }
17}
18'

The response includes accuracy scores for each extracted field. Use these scores to determine the reliability of the OCR results.

Built with