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.
import axios from 'axios';
const options = {
method: 'GET',
url: '<https://api.verifik.co/v2/ocr/scan-prompt/templates>',
params: {
},
headers: {
Accept: 'application/json',
Authorization: 'jwt <tu_token>'
}
};
try {
notFou const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
{
"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"
]
}
]
}