Verifik
Verifik
Verifik
  • Documentation
  • Accounts
    • Authentication
      • Email Authentication
      • Phone Authentication
      • Renew your token (JWT)
      • Create new token & revoke previous tokens
    • Clients
      • Account information
  • Services
    • SmartCheck
      • App Query example
    • SmartAccess
      • Dashboard
    • Access
      • Email Access Example
      • Phone Access Example
      • Biometric Access Example
    • SmartEnroll
    • Enroll
      • Tutorial
    • Smart Scan
  • Biometrics API's
    • Liveness
      • Liveness Detection
    • Compare
      • Compare & Liveness detection
      • Compare 1:1
    • Search
      • Search 1:N | Live
      • Search 1:N
      • Search 1:N | Crop
      • Face Detect
      • Face Verify
  • Scan Docs API's
    • Scan Studio
      • Documents supported
      • 🇨🇴[Example] Tarjeta de propiedad
    • Scan Prompt
      • Documents supported
      • Scan Prompt templates
  • Resources
    • Projects
      • The Project object
      • Create a project
      • Update a project
      • Retrieve a project
      • List all projects
    • Project Flows
      • The ProjectFlow object
      • Create a project flow
        • Login settings
        • Onboarding settings
        • Security settings
      • Update a project flow
      • Retrieve a project flow
      • List all project flows
    • App Logins
      • The AppLogin object
      • Create an app login
      • Retrieve an app login
      • List all app logins
    • App Registrations
      • The AppRegistration object
      • Create an app registration
      • Sync app registration status
      • Retrieve an app registration
      • List all app registrations
    • Credits
      • The Credit object
      • Retrieve a credit record
      • List all credit records
    • Document Validations
      • The DocumentValidation object
      • Enroll - Create Document Validation
      • Retrieve a document validation
      • List all document validations
      • Delete a document validation
    • Email Validations
      • The Email Validation object
      • Create Email Validation
      • Validate an Email Validation
      • Retrieve an Email Validation
      • List of Email Validations
    • Phone Validations
      • The Phone Validation object
      • Create Phone Validation
      • Validate Phone Validation
      • Retrieve a Phone Validation
      • List of Phone Validations
    • Collections
      • The Collection object
      • Create a Collection
      • Retrieve a Collection
      • List all Collection
    • Persons
      • The Person object
      • Create a Person
      • Create a Person [With Liveness detection]
      • Update a Person
      • Delete a Person
      • Retrieve a Person
      • List all Persons
    • Webhooks
      • The Webhook object
      • Create a Webhook
      • Update a Webhook
      • Delete a Webhook
      • Retrieve a Webhook
      • List all Webhooks
      • Webhook integration
    • Biometric Validations
      • The Biometric Validation Object
      • Create Biometric Validation
      • Validate Biometric Validation
      • Retrieve a Biometric Validation
      • List all Biometric Validations
  • Plans & Pricings
    • Database Screening plans
    • Smart Access Plans
      • Free Plans
      • Active Users
      • Sessions
      • Extra Charges
      • Enterprise Plans
    • SmartEnroll Plans
    • Enroll Plans
    • SMS/WhatsApp Pricing
  • Identity validation
    • 🇦🇷Argentina
    • 🇧🇴Bolivia
    • 🇧🇷Brazil
    • 🇨🇦Canada
      • 🇨🇦Ontario Driver license
      • 🇨🇦Quebec Driver license
      • 🇨🇦British Columbia license
    • 🇨🇱Chile
      • 🇨🇱Chilean taxpayer information
    • 🇨🇴Colombia
      • 🇨🇴Colombian Citizen
      • 🇨🇴Colombian Citizen with Extra Data
      • 🇨🇴Colombian Politically Exposed Persons
      • 🇨🇴Special Stay Permit (PEP) ID
      • 🇨🇴Colombian Foreigner ID (CE)
    • 🇨🇷Costa Rica
    • 🇩🇴Dominican Republic
    • 🇪🇨Ecuador
    • 🇸🇻El Salvador
    • 🇬🇹Guatemala
    • 🇭🇳Honduras
    • 🇲🇽Mexican
    • 🇵🇦Panama
    • 🇵🇾Paraguay
    • 🇵🇪Peru
      • 🇵🇪[v3] Peruvian Citizen
      • 🇵🇪[v3] Full Peruvian Citizen
      • 🇵🇪Peruvian Citizen
      • 🇵🇪Peruvian Foreigner Resident
      • 🇵🇪Peruvian Citizen Information with Extra Data
    • 🇪🇸Spain Citizen
    • 🇺🇸United States
      • 🇺🇸SSN Verification (Social Security Number)
      • 🇺🇸Florida Driver License Validation
      • 🇺🇸Kansas Driver's License Verification
    • 🇺🇾Uruguay
    • 🇻🇪Venezuela
      • 🇻🇪Venezuelan Citizen Information
      • 🇻🇪Venezuelan Foreigner citizens
  • Vehicle Validation
    • 🇦🇷Argentina
    • 🇧🇴Bolivia
    • 🇧🇷Brazil
    • 🇨🇱Chile
      • 🇨🇱Vehicle Information
      • 🇨🇱Driver license
    • 🇨🇴Colombia
      • 🇨🇴Vehicle by Code - Fasecolda
      • 🇨🇴SIMIT Resolutions
      • 🇨🇴Complete vehicle with historical records by VIN - RUNT
      • 🇨🇴Information System for Drivers Transporting Dangerous Goods
      • 🇨🇴Vehicle's SOAT and RTM by Plate and Identification document
      • 🇨🇴General query of SIMIT by license plate
      • 🇨🇴Driver's License
      • 🇨🇴Vehicle by plate and identification card only
      • 🇨🇴Vehicle Values by Plate - Fasecolda
      • 🇨🇴Verifik Pico y Placa for Bogotá
      • 🇨🇴Complete vehicle with historical records by plate and identification document - RUNT
      • 🇨🇴SIMIT Agreements
      • 🇨🇴SIMIT Fines
      • 🇨🇴General query of SIMIT by Identification Document
      • 🇨🇴Sinister Verification - Fasecolda
      • 🇨🇴Vehicle Fines Check in Bogotá, Colombia
      • 🇨🇴Taxes in Bogota
      • 🇨🇴Vehicle accidentality in Bogota
    • 🇨🇷Costa Rica
    • 🇪🇨Ecuador
      • 🇪🇨Ecuador Vehicle Fines
      • 🇪🇨Vehicle Information Lookup
    • 🇲🇽Mexico
    • 🇵🇾Paraguay
    • 🇵🇪Peru
      • 🇵🇪Peruvian Vehicle
      • 🇵🇪Peruvian Vehicle Insurance
    • 🇺🇸United States
      • 🇺🇸Vehicle Information
      • 🇺🇸Vehicle Information by VIN
  • Business Validation
    • 🇦🇷Argentina
    • 🇧🇴Bolivia
    • 🇧🇷Brazil
    • 🇨🇦Canada
    • 🇨🇱Chilean
    • 🇨🇴Colombia
      • 🇨🇴Colombian Business Information - RUES
      • 🇨🇴Complete Business Registry - RUES
      • 🇨🇴Colombian Company DIAN Verification
      • 🇨🇴Verify Legal Invoicer in DIAN for Colombian Companies
    • 🇨🇷Costa Rica
    • 🇲🇽Mexico
    • 🇵🇦Panama
    • 🇵🇾Paraguay
    • 🇵🇪Peru
    • 🇪🇸Spain
    • 🇺🇸United States
  • Background Check
    • 🇧🇷Brazil
    • 🇨🇴Colombia
      • 🇨🇴Public Contracts
      • 🇨🇴Colombian Police Record Check
      • 🇨🇴Verify Police Compliance with Corrective Measures
      • 🇨🇴Comptroller Certificate
      • 🇨🇴Disciplinary Records in Colombia (attorney's office)
    • 🌎International
      • 🌎Interpol Background Check
      • 🌎OFAC Background Check
      • 🌎Europol Background Check
      • 🌎FBI Background Check
      • 🌎ONU Background Check
      • 🌎DEA Background Check
  • Military
    • 🇨🇴Colombia
  • Finance
    • 🇨🇴Delinquent debtors
  • Legal
    • 🇨🇴Lawyer Verification
    • 🇨🇴Colombian Legal Processes
    • 🇨🇴Retrieve Details of a Legal Process by Number
    • 🇨🇴Court Case Records Lookup
    • 🇨🇴Certificate of Validity for Legal Professionals
  • Certificates
    • 🇨🇴Registry Certificate
    • 🇨🇴High Altitude Job Eligibility
    • 🇨🇴SENA Certificates
  • Voting
    • 🇨🇴Retrieve Voting Information for Colombian Citizens
  • Health
    • 🇨🇴Colombian RETHUS Verification Data
    • 🇨🇴Verify Colombian Affiliations
  • Verifik LLC
    • Privacy Policy
    • Políticas de Privacidad
    • Términos y Condiciones
    • Terms and Conditions
    • Acuerdo de Niveles de Servicio
    • Service Level Agreement
    • Verifik for Enterprises HUB (Esp)
    • Verifik for Enterprises HUB (Eng)
    • SmartCheck Terms and Conditions of Use
Powered by GitBook
On this page
  • Get Templates (GET)
  • Create Template (POST)
  • Update Template (PUT)
  1. Scan Docs API's
  2. Scan Prompt

Scan Prompt templates

Services to consult, create and modify models trained for the Scan Prompt service.

Get Templates (GET)

GET - https://api.verifik.co/v2/ocr/scan-prompt/templates

The Retrieve ScanPromt Templates API allows you to retrieve information about Templates stored within Verifik Database.

The response contains an array of Templates objects, each representing an individual Template in the system. You can iterate through this array to access and utilize the information about each Template as needed for your application.

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Response

{
  "data": [
    {
      "__v": 2,
      "_id": "64cd7b5012b18c7901e3f451",
      "name": "Escaneo de licencias de conducir de Colombia",
      "active": true,
      "fields": [
        "firstName",
        "lastName",
        "fullName",
        "dateOfBirth",
        "documentNumber",
        "expeditionDate",
        "driverRestrictions",
        "bloodType"
      ],
      "prompt": "From the provided JSON input, extract the fields {{fields}}. The text can be in multiple languages and may contain minor distortions due to OCR. In Colombian culture, individuals may have two last names, both of which must be included. People also normally have 2 first names, like Juan Miguel or Jose Manuel, so when you see a 4 words name, extract it that way. For the driver restrictions, its usually like driver needs glasses or another detail about his/her negative observations  Please avoid translation, simply extract the information as provided. The output must be in a JSON format. Only consider fields with a confidence level of 0.5 or higher, disregard fields that do not have a confidence score.",
      "system": true,
      "deleted": false,
      "createdAt": "2023-08-03T15:54:41.178Z",
      "updatedAt": "2023-08-05T17:23:52.556Z",
      "description": "Prompt para extraer licencias de conducir de Colombia",
      "documentTypes": [
        "DLCO"
      ]
    },
    {
      "__v": 2,
      "_id": "64ce89a612b18c7901e3f453",
      "name": "Escaneo de cédulas de Colombia",
      "active": true,
      "fields": [
        "firstName",
        "lastName",
        "fullName",
        "documentNumber"
      ],
      "prompt": "From the provided JSON input, extract the fields {{fields}}. The text can be in multiple languages and may contain minor distortions due to OCR. In Colombian culture, individuals may have two last names, both of which must be included. People also normally have 2 first names, like Juan Miguel or Jose Manuel, so when you see a 4 words name, extract it that way. For the driver restrictions, its usually like driver needs glasses or another detail about his/her negative observations  Please avoid translation, simply extract the information as provided. The output must be in a JSON format. Only consider fields with a confidence level of 0.5 or higher, disregard fields that do not have a confidence score.",
      "system": true,
      "deleted": false,
      "createdAt": "2023-08-03T15:54:41.178Z",
      "updatedAt": "2023-08-05T17:23:52.556Z",
      "description": "Prompt para extraer cédulas de Colombia",
      "documentTypes": [
        "CC"
      ]
    },
    {
      "__v": 1,
      "_id": "64d12c1a12b18c7901e3f45c",
      "name": "Global Passport Scanning",
      "active": true,
      "fields": [
        "firstName",
        "lastName",
        "fullName",
        "documentNumber",
        "country",
        "dateOfBirth",
        "gender",
        "expirationDate",
        "personalNo"
      ],
      "prompt": "From the provided JSON input, extract the fields {{fields}}. The text may be in multiple languages and may contain special characters. Individuals might have one or two first names and one or two last names. The names must be extracted exactly as they appear, preserving special characters. In some cultures, individuals may have a middle name, which should also be considered. For any observations or special notes related to the passport holder, extract them as provided without translating. The output must be in JSON format. Only consider fields with a confidence level of 0.5 or higher, disregard fields that do not have a confidence score.",
      "system": true,
      "deleted": false,
      "createdAt": "2023-08-03T15:54:41.178Z",
      "updatedAt": "2023-08-05T17:23:52.556Z",
      "description": "Prompt to extract passport details from all countries",
      "documentTypes": [
        "PA"
      ]
    },
    {
      "__v": 1,
      "_id": "64d1329312b18c7901e3f45f",
      "name": "Escaneo de tarjetas INE de México",
      "active": true,
      "fields": [
        "firstName",
        "lastName",
        "fullName",
        "documentNumber",
        "CURP",
        "voterKey",
        "state",
        "municipality",
        "address",
        "gender",
        "birthDate",
        "expirationDate"
      ],
      "prompt": "From the provided JSON input, extract the following fields: {{fields}}. The JSON input may contain OCR data from documents in Spanish, such as a Mexican Voter ID card (Credencial para Votar), and may include special characters.\n\nIn extracting the full name, consider that individuals may have one or two first names and normally two last names. You must ensure proper extraction by identifying these components accurately. Specifically, you MUST find the first two letters of each part of the name (first name, middle name if applicable, and last names) inside the first 6-8 characters of the documentNumber before the numbers start (CLAVE DE ELECTOR). This means that the first two letters of the first name, followed by the first two letters of each part of the last name, must appear in the same sequence as they are in the documentNumber. If any part of the name does not have corresponding letters in the documentNumber, the extraction is considered incorrect.\n\nThe output must be in JSON format without any additional explanation, as it will be processed with JSON.parse(resultStringContent). Only consider data with a confidence level of 0.5 or higher, and disregard any fields that do not have a specified confidence score.\n",
      "system": true,
      "deleted": false,
      "createdAt": "2023-08-03T15:54:41.178Z",
      "updatedAt": "2023-08-05T17:23:52.556Z",
      "description": "Prompt to extract details from Mexican INE (Instituto Nacional Electoral) cards",
      "documentTypes": [
        "INE"
      ]
    },
    {
      "__v": 1,
      "_id": "64d1540e12b18c7901e3f461",
      "name": "Chilean ID Card Scanning",
      "active": true,
      "fields": [
        "firstName",
        "lastName",
        "fullName",
        "documentNumber",
        "nationality",
        "dateOfBirth",
        "gender",
        "expirationDate",
        "emissionDate",
        "RUT",
        "RUN"
      ],
      "prompt": "From the provided JSON input, extract the fields {{fields}}. The text can be in multiple languages and may contain minor distortions due to OCR. In Chilean culture, individuals may have two last names, both of which must be included. People also normally have 2 first names, like Juan Miguel or Jose Manuel, so when you see a 4 words name, extract it that way. For the driver restrictions, its usually like driver needs glasses or another detail about his/her negative observations  Please avoid translation, simply extract the information as provided. The output must be in a JSON format. Only consider fields with a confidence level of 0.5 or higher, disregard fields that do not have a confidence score.",
      "system": true,
      "deleted": false,
      "createdAt": "2023-08-03T15:54:41.178Z",
      "updatedAt": "2023-08-05T17:23:52.556Z",
      "description": "Prompt to extract Chilean ID card details",
      "documentTypes": [
        "RUT"
      ]
    },
    {
      "__v": 1,
      "_id": "653942aa27953fa62c752c83",
      "name": "CUI Peruvian ID Card Scanning",
      "active": true,
      "fields": [
        "firstName",
        "lastName",
        "secondLastName",
        "fullName",
        "documentNumber",
        "nationality",
        "dateOfBirth",
        "placeOfBirth",
        "dateOfIssue",
        "gender",
        "expirationDate",
        "maritalStatus"
      ],
      "format": "JSON",
      "prompt": "From the provided JSON input, extract the fields {{fields}}. The text can be in multiple languages and may contain minor distortions due to OCR. In Peruvian culture, individuals have up to 5 names in their ID, both of which must be included. Citizens also normally have 2 to 3 names, so when you see a 4 to 5 words name, extract it that way. Please avoid translation, simply extract the information as provided. The output must be in a JSON format. Only consider fields with a confidence level of 0.5 or higher, disregard fields that do not have a confidence score. Dates should be in format YYYY/MM/DD",
      "system": true,
      "deleted": false,
      "createdAt": "2023-08-03T15:54:41.178Z",
      "updatedAt": "2023-08-05T17:23:52.556Z",
      "description": "Prompt to extract the new Peruvian card details",
      "documentTypes": [
        "CUI"
      ]
    },
    {
      "__v": 1,
      "_id": "6539430227953fa62c752c87",
      "name": "Peruvian ID Card Scanning",
      "active": true,
      "fields": [
        "name1",
        "name2",
        "name3",
        "lastName",
        "secondLastName",
        "fullName",
        "documentNumber",
        "nationality",
        "dateOfBirth",
        "placeOfBirth",
        "dateOfIssue",
        "gender",
        "expirationDate",
        "maritalStatus"
      ],
      "format": "JSON",
      "prompt": "From the provided JSON input, extract the fields {{fields}}. The text can be in multiple languages and may contain minor distortions due to OCR. In Peruvian culture, recognize the division of names properly. Please avoid translation, simply extract the information as provided. The output must be in a JSON format. Only consider fields with a confidence level of 0.5 or higher, disregard fields that do not have a confidence score. Dates should be in format YYYY/MM/DD",
      "system": true,
      "deleted": false,
      "createdAt": "2023-08-03T15:54:41.178Z",
      "updatedAt": "2023-08-05T17:23:52.556Z",
      "description": "Prompt to extract Peruvian ID card details",
      "documentTypes": [
        "DNI"
      ]
    }
  ]
}

Create Template (POST)

POST - https://api.verifik.co/v2/ocr/scan-prompt/template

This API endpoint allows you to create new document information extraction templates for specific document types. Templates help in structuring the extraction of key data fields from documents, enabling you to capture the required information accurately. When creating a new template, it's important to emphasize the prompt parameter, which plays a crucial role in instructing the system on how to extract data from the provided documents.

By creating custom templates with detailed prompts, you can ensure that the API accurately extracts the required data from documents, even when dealing with multilingual, distorted, or culturally specific text.

Note: It's essential to tailor the prompt to the unique characteristics of the documents you're processing to achieve the best results.

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Prompt

Take a look at this prompt example:

{
  "prompt": "From the provided JSON input , extract the fields {{fields}}. The text can be in multiple languages and may contain minor distortions due to OCR. In Colombian culture, individuals may have two last names, both of which must be included. People also normally have 2 first names, like Juan Miguel or Jose Manuel, so when you see a 4 words name, extract it that way. For the driver restrictions, its usually like driver needs glasses or another detail about his/her negative observations  Please avoid translation, simply extract the information as provided. The output must be in a {{format}}. Only consider fields with a confidence level of 0.5 or higher, disregard fields that do not have a confidence score.",
}

Basically the prompt are a series of instructions and considerations about the document, you must define the most important aspects of it, in the body details there are more information of how to correctly create the prompt.

It's important that inside the prompt you add {{fields}} and {{format}}, this is to tell the AI what data extract and in which format return.

Body

Name
Type
Description

documentType

string

Image in Base64 encoded format or a URL where the image is hosted.

fields

string

name

string

format

string

prompt

string

description

string

Body Example

{
  "system": false,
  "documentTypes": [
    "CCVE"
  ],
  "fields": [
    "nombres (can be 1 or more Name)",
    "apellidos (can be 1 or more last Name)",
    "Numero de cedula (ID number always comes after this 'V.')",
    "fecha de nacimiento",
    "fecha de expedicion",
    "fecha de expiracion",
    "nacionalidad (the nationality is until the end of the text)",
    "age(fecha actual - fecha de nacimiento)"
  ],
  "name": "CCVE Verifik",
  "format": "json",
  "prompt": "This text was extracted from a Venezuelan ID card, it's in Spanish. I need you to provide me with the following data in {{format}}: {{fields}}. all fields are in uppercase, the order is document number, apellidos, nombres, sign (the sign sometimes can be letters) and Ignore the directors name this is located near to the right corner . This is the desired JSON format: firstName: Nombres, lastName: Apellidos, documentNumber: numero de cedula, dateOfBirth: fecha de nacimiento,civilStatus: estado civil, expeditionDate: fecha de expedicion, expireDate: fecha de expiracion,  nationality: nacionalidad ",
  "description": "Prompt for Venezuelan IDs for Verifik"
}

Response

{
  "data": {
    "__v": 0,
    "_id": "653bdcc2ff7de0cee3b0760a",
    "code": "unique_identifier",
    "name": "Escaneo de cédulas de Colombia",
    "active": true,
    "client": "623b6317fe5fd1774be9f566",
    "fields": [
      "firstName",
      "lastName",
      "fullName",
      "documentNumber"
    ],
    "format": "json",
    "prompt": "From the provided JSON input , extract the fields {{fields}}. The text can be in multiple languages and may contain minor distortions due to OCR. In Colombian culture, individuals may have two last names, both of which must be included. People also normally have 2 first names, like Juan Miguel or Jose Manuel, so when you see a 4 words name, extract it that way. For the driver restrictions, its usually like driver needs glasses or another detail about his/her negative observations  Please avoid translation, simply extract the information as provided. The output must be in a {{format}}. Only consider fields with a confidence level of 0.5 or higher, disregard fields that do not have a confidence score.",
    "system": false,
    "deleted": false,
    "createdAt": "2023-10-27T15:52:34.058Z",
    "updatedAt": "2023-10-27T15:52:34.058Z",
    "description": "Prompt para extraer cédulas de Colombia",
    "documentTypes": [
      "CC"
    ]
  }
}

Update Template (PUT)

PUT- https://api.verifik.co/v2/ocr/scan-prompt/template

This API endpoint allows you to update a specific OCR template. OCR templates are used to extract structured data from documents. When you update a template, you can modify its settings, such as the fields to extract and the document types it applies to.

This API endpoint is used for managing OCR templates, allowing you to tailor data extraction according to specific document types and requirements. By updating the templates, you can adapt them to changing needs, ensuring accurate data extraction from documents.

Note When updating templates, ensure that the changes align with your OCR data extraction requirements, and test the updated template with sample documents to confirm its effectiveness.

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description

image

string

Image in Base64 encoded format or a URL where the image is hosted.

Response

{
  "data": {
    "__v": 0,
    "_id": "653bdcc2ff7de0cee3b0760a",
    "code": "unique_identifier",
    "name": "Escaneo de cédulas de Colombia",
    "active": true,
    "client": "623b6317fe5fd1774be9f566",
    "fields": [
      "firstName",
      "lastName",
      "fullName",
      "documentNumber"
    ],
    "format": "json",
    "prompt": "From the provided JSON input , extract the fields {{fields}}. The text can be in multiple languages and may contain minor distortions due to OCR. In Colombian culture, individuals may have two last names, both of which must be included. People also normally have 2 first names, like Juan Miguel or Jose Manuel, so when you see a 4 words name, extract it that way. For the driver restrictions, its usually like driver needs glasses or another detail about his/her negative observations  Please avoid translation, simply extract the information as provided. The output must be in a {{format}}. Only consider fields with a confidence level of 0.5 or higher, disregard fields that do not have a confidence score.",
    "system": false,
    "deleted": false,
    "createdAt": "2023-10-27T15:52:34.058Z",
    "updatedAt": "2023-10-27T15:52:34.058Z",
    "description": "Prompt para extraer cédulas de Colombia",
    "documentTypes": [
      "CC"
    ]
  }
}
PreviousDocuments supportedNextProjects

Last updated 8 months ago