Estimated reading time: 20- 25 minutes
What will you learn from this guide?
This manual will teach you how to use an Optical Properties Recognition system (document) OCR) JAAKwith us. OCRyou can automatically extract information from an ID document (INes, passports, licenses, etc), check its authenticity and securely store the images. That's crucial to your onboarding processes, compliance with standards KYC and prevention of abetting an identity.
No prior technical knowledge required - just follow the steps.
Before Start - Checks list
Be sure to have these data ready:
- API Key (Token Bearer): Your valid authentication key provided by JAAK. It's essential to get our services.
- Images of document: Clear photos of the front and, if applicable, back of the document, in Base64 format.
- Basic knowledge of APIs REST: familiarity with how HTTP (POST, GET) applications are made and JSON responses are processed.
Contents Index
| Section | What will you learn |
|---|---|
| 1. What's Product OCR of JAAK? | To understand the purpose and scope of our service OCR |
| 2. Key Functionality | Know the main capabilities for extraction, monitoring and storage |
| 3. Integration with API | Guide to how to conduct operations OCR |
| 4. Monitoring of Events | How to check the history and status of document processes |
| 5. Common Problem Resolution | To identify and solve most common errors |
| 6. Do you need help? | When and how to contact our support team |
| 7. Glossary of terms | Definitions of key terms related to OCR |
1. What's Product OCR of JAAK?
The product OCR of JAAK uses advanced optical character recognition technology to read and extract structured information from official identity documents as:
- Credentials to vote (INE/ FIT of Mexico)
- Passports
- Citizenship Fates (Colombia)
- National Identity Documents (Peru)
- Driving licences
- and other official documents
Our service not only removes data but also performs Security and authenticity validations to ensure that the document is legitimate and remains unchanged.
Main use cases:
- Digital Onboarding: It increases the registration process for new customers by automatically withdrawing their data and reducing manual errors.
- Fraud prevention: It detects forged, manipulated or altered documents and minimizes the risk of suplanting an identity.
- Standard compliance (KYC/AML): It facilitates compliance with regulations by monitoring users' identities and storing process evidence.
- Form processing: Convert physical documents to digital data for internal process automation.
2. Key functionality
Our product OCR offers a robust set of capabilities:
- Automatic Data Extraction (OCR): Read and structure personal information (name, date of birth, sex, nationality), address and document (type, number, date of issue / expiry).
- Document and Country Type Detection: The document type (INE) and his country of origin.
- Facial Photography Extraction: Captures photo of face found in document for use in biometric comparisons One-to-One (OTO).
- Validation of Authenticity (Liveness document): It assesses document safety characteristics to determine whether it's physical and true, preventing the use of copies or screens.
- Age and Expiration Verification: Check if the document is expired and if the incumbent's age meets your set requirements.
- Security Storage: It offers the option to save document images from our secure storage system (Babel Storage) and get temporary URLs for controlled access.
- Audit and Monitoring: Record every document processing event, enabling you to check the history, response times and results for analysis.
3. Integration with API
Interaction with the system OCR of JAAK It's made through calls to our API.
3.1 Extraction of document data
That's the main endpoint to get information from documents. JAAK offers several versions and v4 more advanced for general extraction and extract-both for dual-face documents.
3.1.1 General Extraction (POST / api / v4 / document / extract)
Ideal for advanced data collection from a document, usually with a single side.
- Method:
POST - Base URL:
https://api.sandbox.jaak.ai/api/v4/document/extract
Required Headers:
Authorization:Bearer TU_API_KEY_AQUI(Your authentication key)Content-Type:application/json
Application body (JSON):
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
imageFront | string | Yes | Front image of document encoded at Base64 | "iVBORw0KGgoAAA..." |
imageBack | string | No | Post image of document encoded at Base64 | "iVBORw0KGgoAAA..." |
allowedCountries | array[string] | No | Code list ISO Alpha-3 countries allowed for this request | ["MEX", "COL"] |
Successful Response (HTTP Status: 200 OK):
The answer includes a eventId and requestId for monitoring, status of operation (SUCCESS or REJECTED), processingTime and objects content.data with all information extracted. Also includes an object state with validation as documentCompleteSides, documentExpired and ageValid.
Simplified response example:
{
"eventId": "d99fe2d2...",
"status": "SUCCESS",
"content": {
"data": {
"personal": {
"fullName": "Juan Carlos Hernández López",
"dateOfBirth": "15/01/1990",
"face": "base64_face_image"
},
"document": {
"type": "I",
"number": "A123456789",
"country": { "name": "Mexico" },
"expiration": { "date": "01/01/2030" }
}
}
},
"state": {
"documentCompleteSides": true,
"documentExpired": false,
"ageValid": true
}
}
3.1.2 Double face document extraction (POST / api / v3 / document / extract-both)
Special for documents requiring processing of both sides (e.g. INE ).
- Method:
POST - Base URL:
https://api.sandbox.jaak.ai/api/v3/document/extract-both
Application body (JSON):
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
documentFront | string | Yes | Front image of document encoded at Base64 | "iVBORw0KGgoAAAA..." |
documentBack | string | No | Post image of document encoded at Base64 | "iVBORw0KGgoAAAA..." |
The response is similar to v4 but the structure of the input data can vary slightly after processing an output of a SDK as Micoblink BLinkID.
3.2 Verification of document authenticity (POST / api / v3 / document / verify)
That endpoint evaluates the authenticity of an identity document using an analysis of its safety characteristics and image quality.
- Method:
POST - Base URL:
https://api.sandbox.jaak.ai/api/v3/document/verify
Application body (JSON):
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
imageFront | string | Yes | Front image of document encoded at Base64 | "iVBORw0KGgoAAA..." |
imageBack | string | No | Rear image of document encoded at Base64 | "iVBORw0KGgoAAA..." |
allowedCountries | array[string] | No | Code list ISO Alpha-3 countries allowed | ["MEX", "USA"] |
dataVerification | boolean | No | Enabling Government Data Verification (only Mexico) | true |
Successful Response (HTTP Status: 200 OK):
The evaluation document may be SUCCESS, WARNING or REJECTEDThe object. state provides boolean results from different validations as documentCompleteSides, documentLiveness (physical document detection), securityFeatures (safety characteristics), documentValidity and imageQuality.
Simplified response example:
{
"eventId": "evt_123...",
"evaluation": "SUCCESS",
"document": {
"type": "driving_license",
"country": "MEX"
},
"state": {
"documentCompleteSides": true,
"documentLiveness": true,
"securityFeatures": true,
"imageQuality": true,
"message": "document successfully verified"
}
}
3.3 Secure document storage (POST / api / v3 / document / store)
This endpoint allows you to securely store document images in our storage system.
- Method:
POST - Base URL:
https://api.sandbox.jaak.ai/api/v3/document/store
Application body (JSON):
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
front | string | Yes | Front image of document encoded at Base64 | "aW1hZ2Vu==" |
back | string | No | Post image of document encoded at Base64 | "aW1hZ2Vu==" |
Successful Response (HTTP Status: 200 OK):
The answer includes eventId, requestId and the object image that contains secure URLs to access stored images (image.front and image.back).
Simplified response example:
{
"eventId": "d99fe2d2...",
"image": {
"front": "https://storage.googleapis.com/bucket/path/to/front-image.jpg",
"back": "https://storage.googleapis.com/bucket/path/to/back-image.jpg"
}
}
3.4 General considerations for images
Format: JPEG, NPG or BMP
- Codification: All images should be valid Base64, without including prefix
data:image/...;base64, - Quality: It's crucial that the images are clear, well-lit, focused and with complete document visible for a OCR and success
Size:
- To extraction (v4): Maximum 5MB per image. Minimum recommended resolution: 600x400 pixels
- To storage (v3): Maximum 10MB per image
4. Monitoring of Events
See the history and details of all document processes performed through API.
4.1 Event Consultation (PET / api / v2 / document / event)
This endpoint allows you to get a pat list of all document processing events.
- Method:
GET - Base URL:
https://api.sandbox.jaak.ai/api/v2/document/event
Required Headers:
Authorization:Bearer TU_API_KEY_AQUIContent-Type:application/json
Consultation parameters (Query Params):
Can use filters as limit, page, status (success, failed, pending), action (verify-document, extract-document), eventId (event unique), min-process-time, max-process-time, min-created-at and max-created-at (RFC3339).
Example: GET /api/v2/document/event?limit=10&page=1&status=success&action=extract-document
Successful response:
The answer includes an item of pagination (page, limit, totalDocs, totalPages) and an array docList with events found. Each event details its id, createdAt, action, status and processTime.
5. Common Problem Resolution
| Problem | Description | Resolution |
|---|---|---|
| Error 400 - Invalid Image | indicated by errorCode: DC08 ("Invalid image format") or DC07 The Base64 image is corrupt, bad encoded or missing. | 1. Check encoding: Make sure that the Base64 string is valid and does not contain the prefix data:image/...;base64,. 2. Format: Use supported formats (JPG, PNG, BMP) 3. Presence: Confirm that the field of image (e.g. imageFront, front) isn't empty. |
| Error 400 - Lack of Backface | errorCode: DC09 ("Please provide the back side"). INE) and only the front image is sent. | He sends both faces: For documents such as INE, IID, etc., it's required to send imageFront and imageBack (or documentFront and documentBack). |
| Error 400 - Unsupported Document | errorCode: DC04 ("Document type not supported") or DC17 ("Country not supported"). Occurs if the document type or country is not configured or recognized. | 1. Allowed country: Check that the document's country is in your allowedCountries list or in your company's configuration. 2. Official document: Make sure it is an official identity document supported by JAAK. |
| Error 403 - Authentication/Permissions | Your API Key is invalid or expired, or you do not have the permissions required for the product (Document/KYC Product). Occasionally, it may indicate that there is no active KYC session (v3). | 1. Verify API Key: Confirm it is correct and valid. 2. Format: Authorization: Bearer TU_API_KEY_AQUI. 3. Products/Roles: Make sure Document Product and KYC Product are enabled and that your role is appropriate. 4. KYC Session (v3): For /api/v3/document/extract-both and /api/v3/document/verify, make sure you have an active and valid KYC session. |
| Error 400 - Unsufficient quality | errorCode: DC13 ("Image quality insufficient") or DC15 (Unable to extract document information). OCR He can't read his data. | 1. Enhance the image: Ensure good light, clear focus, complete document and without reflections / shadows. 2. Resolution: Using images with at least 600x400 pixels for v4/extract. |
| Failed 500 - Server / Timeout | errorCode: 0000 (internal error) or DC31 ("Verification service unavailable"). It happens if the internal server fails or the request exceeds the response time. | 1. Reattempts: Implement an exponential backoff retrying logic. 2. Image size: Tablet with large images (max. 5MB for v4/extract10MB for v3/store). 3. Support contact: If it persists, it could be a service problem. |
6. Do you need some help?
Do not hesitate to contact our support team (support) if:
- The problem-solving steps do not solve your drawback after several attempts
- Undocumented or unexpected errors
- Special settings for your use (e.g. new document types, custom thresholds)
- Experiments with persistent performance problems or inconsistencies in data extracted
Information to have ready while contacting support:
- Special description of the problem
- Steps you followed before the mistake
Event IDorRequest IDof failed requests (if applicable)- Full bug logs from your side with tipprints
- Examples of problematic images (with no sensitive data if possible)
- Configure your API Key and environment (development, sandbox, production)
7. Glossary of terms
| Term | Definition |
|---|---|
| OCR | Optional Character Recognition: Technology to extract text from images |
| Base64 | Coding outline to represent binary data (as images) in ASCII text format |
| BLinkID | SDK/API from Micoblink, specialized in the collection of information from identity documents |
| KYC Session | Active session of "Know Your Custom" required for advanced processes |
| MRZ | Readable Zone Machine (Mechanical Reading Zone): Section in travel documents with special characters for automated reading |
| Event ID | Unique identifier generated by JAAK for each document processing useful for monitoring and audit |
| Request ID | Unique identifier of the original HTTP request, used for traceability |
| Liveness (document) | Detection that checks if a document is physical and true (not a photocopy or display) |
| API Key | Authentication key to access the services of API of JAAK |
| ISO Alpha-3 Code | 3 letter code representing a country (e.g. MEX for Mexico) |
| CPP Middleware | Customer Product Protection: cape JAAK Valid product permits contracted by each client |
Reference links
- Documentation API - POST / api / v4 / document / extract
- Documentation API - POST / api / v3 / document / extract-both
- Documentation API - POST / api / v3 / document / verify
- Documentation API - POST / api / v3 / document / store
- Documentation API - GET / api / v2 / document / event
- Official documentation of Micoblink BLinkID
- Basic Specification 64 RFC 4648
- Country code ISO Alpha-3