Legacy Restful API
1.0.0
1.0.0
  • Introduction
  • Biometric Engines
  • Getting Started
  • User
    • Create User
    • Delete User
  • Face Engine
    • Enroll Face
    • Verify Face
    • Adapt Face
    • Delete User Face Enroll
    • Find User Id by Face
    • Find Multiple Id by Face
    • Find Face Properties
  • Liveness
    • Biometrics Status
    • Biometrics Liveness
  • Voice Engine
    • Enroll Voice
    • Verify Voice
    • Adapt Voice
    • Delete User Voice Enroll
    • Get Available Languages
  • OCR Engine
    • Validate Document
    • Validate Document (base64)
    • Verify document photo
    • Verify document photo (base64)
  • Auxiliar Methods
    • Get enroll Status
    • Has Pending Dialogue
    • Restart User State
    • Find UserId by MacAddress
Powered by GitBook
On this page
  • Validate Document
  • Success 200

Was this helpful?

  1. OCR Engine

Validate Document

This endpoint allows the OCR validation process on the document sent on the request.

To perform a document validation, the method to be used is Validate Document. The request to this method requires the upload two photos (front & back of the document).

This process will perform:

  • Automatic ID type recognition

  • Algorithmic-based checks

  • Detect security features in global identity documents

  • Reading and extraction of all documents fields

In case of a validation success BiometrID will retrieve all the data extracted from the document.

Validate Document

POST Https://api.biometrid.com/api/1.0/document/validate

Validate document process

Headers

Name
Type
Description

Content-type

string

Request content type (This is not required to be set. Referenced only to show how we expect data to be sent). { "Content-Type": "multipart/form-data" }

x-biometrid-key

string

Application Client Key

x-biometrid-secret

string

Application Client Secret

Request Body

Name
Type
Description

doctype

string

Required if document type different than idcard. Possible values: idcard, passport. If not present, by default, the system will expect idcard evaluation.

front

object

Image file containing document's front for biometric analysis. File format: jpeg, png or jpg. Maximum file size 1 Mb.

back

object

Image file containing document's front for biometric analysis. File format: jpeg, png or jpg. Maximum file size 1 Mb.

processId

string

Optional process id. Setup a specific process id.

HTTP/1.1 200 OK
//Validate Document Process
{
    "status": true,
    "data": {
        "message": "DOCUMENT_VALIDATED_WITH_SUCCESS",
        "result": "Ok",
        "side": "0",
        "reference": "123",
        "frontCut": String base64,
        "backCut": String base64,
        "photo": String base64,
        "signature": String base64,
        "fields": {
          "normal": { ... },
          "validation": { ... }
        }
    }
}
//Validate Document Process Failed
{
    "status": true,
    "data": {
        "message": "DOCUMENT_VALIDATION_FAILED",
        "result": "Warning",
        "side": "0",
        "reference": "123",
        "frontCut": String base64,
        "backCut": String base64,
        "photo": String base64,
        "signature": String base64,
        "fields": {
          "normal": { ... },
          "validation": { ... }
        }
    }
}
//Document Not Recognised
{
    "status": false,
    "data": {
        "message": "FAILED_TO_RECOGNIZE_DOCUMENT"
    }
}
HTTP/1.1 400 Bad Request
//No photo files detected on request. Not sent or invalid format
    {
        "status": false,
        "data": {
            "message": "NO_FILE_OR_INVALID_FORMAT"
        }
    }
//Missing photo files on request
{
    "status": false,
    "data": {
        "message": "EXPECTING_ALL_DOCUMENT_SIDES_TO_BE_PRESENT"
    }
}
// Missing Headers
 {
    "status": false,
    "data": {
        "message": "AUTHENTICATION_HEADERS_MISSING"
    }
}
HTTP/1.1 401 Unauthorized
{
    "status": false,
    "data": {
        "message": "INVALID_AUTHENTICATION_HEADERS"
    }
}
HTTP/1.1 402 Payment Required
{
    "status": false,
    "data": {
        "message": "REQUEST_LIMIT_REACHED"
    }
}
HTTP/1.1 404 Not Found
//Client not found by given key.
{
    "status": false,
    "data": {
        "message": "CLIENT_NOT_FOUND/CHECK_AUTHENTICATION_HEADERS"
    }
}
HTTP/1.1 405 Method Not Allowed
{
    "status": false,
    "data": {
        "message": "NO_DOCUMENT_ENGINE_CONFIGURATION_AVAILABLE"
    }
}
HTTP/1.1 504 Gateway Timeout
{
    "status": false,
    "data": {
        "message": "REQUEST_TIMEOUT_EXCEEDED"
    }
}
Example (JSON)
{
    "front": front.jpeg
    "back": back.jpeg
    "processId": "123"
}

Success 200

Field

Type

Description

status

Boolean

Response status.

data

Object

Response main data.

message

String

Message regarding the document's process.

result

String

Result of the document's process.

side

String

Code for the document side that were processed. 0: both sides were processed 1: front side was processed, 2: back side was processed.

reference

String

Process identifying code.

frontCut

String

Front image cut result. Image in Base64 string.

backCut

String

Back image cut. Image in Base64 string.

photo

String

Photo image cut. Image in Base64 string.

signature

String

Signature image cut. Image in Base64 string.

fields

String

Document's processed fields.

normal

String

Processed fields values.

validation

String

Processed fields validation.

PreviousGet Available LanguagesNextValidate Document (base64)

Last updated 5 years ago

Was this helpful?