OCR Verification
This endpoint allows you to perform Optical Character Recognition (OCR) on images to extract text, tables, forms, and signatures.
Endpoint: POST {baseurl}/v1/api/verification/ocr
Request Body
Parameter | Type | Required | Description |
---|---|---|---|
country |
string |
Yes | The country code (e.g., "NGA" for Nigeria). |
reference |
string |
Yes | A unique reference for the verification request. |
verificationLevel |
string |
Yes | The level of verification to perform (e.g., "basic"). |
base64Image |
string |
Yes | A base64 encoded string of the image. |
customer |
string |
No | ID of the customer (optional). |
verificationGroup |
string |
No | ID of the verification group (optional). |
Sample Request
curl -X POST "https://your-domain.com/v1/api/verification/ocr" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"country": "NGA",
"reference": "1234567890",
"verificationLevel": "basic",
"base64Image": "data:image/jpeg;base64,/9j/4AAQSkZJRg...",
"customer": "6791457be570f7f292f1fe23",
"verificationGroup": "6791457be570f7f292f1fe23"
}'
Sample Response
{
"status": true,
"responseCode": "00",
"statusCode": "200",
"message": "Ocr verification successful",
"data": {
"message": "string",
"tableCount": 2,
"content": {
"lines": [
"Sample text line 1",
"Sample text line 2"
],
"tables": [
"Table content 1",
"Table content 2"
],
"forms": [
"Form field 1: value",
"Form field 2: value"
],
"signatures": [
"Signature detected in region 1",
"Signature detected in region 2"
]
}
},
"meta": {
"statusCode": "200",
"isValid": true,
"timeStamp": "Tue Jun 17 2025 23:45:49 GMT+0000 (Coordinated Universal Time)"
}
}
Response Data Structure
Field | Type | Description |
---|---|---|
message |
string |
A descriptive message about the OCR processing. |
tableCount |
number |
The number of tables detected in the image. |
content |
object |
The extracted content from the image. |
content.lines |
array |
Array of text lines extracted from the image. |
content.tables |
array |
Array of table content extracted from the image. |
content.forms |
array |
Array of form fields and values extracted. |
content.signatures |
array |
Array of signature regions detected. |
Integration Flow
- Prepare the image for OCR processing by converting it to base64 format.
- Send a POST request to the OCR verification endpoint with the required parameters.
- Process the response to extract the relevant text, tables, forms, or signatures.
- Use the extracted data for further processing or validation.
Use Cases
- Document Processing: Extract text from scanned documents
- Form Recognition: Automatically fill forms from images
- Table Extraction: Convert image tables to structured data
- Signature Detection: Identify and validate signatures on documents
- Receipt Processing: Extract information from receipts and invoices