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.1/document/validate
Validate document process
Headers
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
type
string
Possible values: pooling, regular
. Default: regular synchronous process. See pooling specific request.
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. Max size: 1MB
back
object
Image file containing document's front for biometric analysis. File format: jpeg, png or jpg. Max size: 1MB
//Validate Document Process - providerA
{
"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 - providerB
{
"status": true,
"data": {
"message": "DOCUMENT_VALIDATED_WITH_SUCCESS",
"result": "GOOD",
"fields": {
"surnames": "REIS",
"names": "JOAO MIGUEL",
"origin": "PRT",
"gender": "M",
"height": "1,89",
"birth_date": "1900-01-01",
"expiry_date": "2022-01-01",
"id_number": "123456789",
"doc_number": "123456789 5ZZZ0",
"parents": "JOSE REIS * MARIA REIS",
"tax_number": "123456789",
"social_security_number": "123456789",
"health_number": "386926259",
"mrz": {
"line0": "I<PRT123456<ZZY0<<<<<<<<K",
"line1": "24123123 <<< ",
"line2": "JOAO<<<<<<REIS>>>>"
}
},
"validations": {
"front_resolution": "GOOD [4032x3024]",
"front_blurring": "GOOD [199.44849196759998]",
"front_luminance": "GOOD [77]",
"back_resolution": "GOOD [4032x3024]",
"back_blurring": "GOOD [224.78067465369602]",
"back_luminance": "GOOD [80]",
"integrity_tax_number": "GOOD",
"integrity_id_number": "GOOD",
"integrity_doc_number": "GOOD",
"integrity_birth_date": "GOOD",
"integrity_expiry_date": "GOOD",
"match_birth_date": "GOOD",
"match_name": "FAIL",
"match_surname": "GOOD",
"match_gender": "GOOD",
"match_nationality": "GOOD",
"match_expiry_date": "GOOD",
"expiration_date": "GOOD",
"fake_front_value": "GOOD",
"fake_back_value": "GOOD",
"fake_front_ratio": 0.99,
"fake_back_ratio": 0.99,
"value": "GOOD"
},
"images": {
"front": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAA",
"back": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAIB",
"photo": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAI"
},
"process": ""
}
}
//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": { ... }
}
}
}
// Pooling request
{
"status": true,
"data": {
"message": "PROCESSING",
"process": "process identifier" // Polygon OCR processId
}
}
//Document Not Recognised
{
"status": false,
"data": {
"message": "FAILED_TO_RECOGNIZE_DOCUMENT"
}
}
{
"front": front.jpeg
"back": back.jpeg
}
Last updated
Was this helpful?