post https://api.w2globaldata.com/document-verification/classifyAndVerify
Classifies the document and verifies the integrity of a document
How to call the endpoint
To call the endpoint you will need to perform a HTTP POST request to this URL:
URL | API Version |
---|---|
https://api.w2globaldata.com/document-verification/classifyAndVerify | 1.3+ |
Classify and verify request
Content Type: The classifyAndVerify endpoint expects the body of requests to be in the form-data format. Responses will be in application/json format.
These are the properties the endpoint accepts:
Property | Mandatory | Description |
---|---|---|
Pages (File) | 🔒 | An array of image data files that represent the images of the document. - At least one page is required - File must be either JPEG, PNG or BMP |
DocumentType (string) | 🔒 | A string representing the type of the document you are cropping - Must be either 'ID1' or 'ID3' |
ClientReference (string) | A reference identifying this call for your reference. | |
AutoVerify (boolean) | AutoVerify (boolean) |
Classify and verify response
Example of a full document verification response:
{
"classification": {
"classificationResult": "Pass",
"classificationDetails": {
"classificationName": "Passport",
"version": "2006",
"type": "ePassport",
"issuerCode": "GBR",
"issuerName": "United Kingdom (Citizen)"
}
},
"verification": {
"alerts": [
{
"name": "Document Expired",
"description": "Checked if the document is expired.",
"mitigation": "Check if the document has expired",
"result": "Refer"
},
{
"name": "Birth Date Check Digit",
"description": "Verified that the birth date check digit is correct.",
"mitigation": "The birth date check digit is correct",
"result": "Passed"
}
// Additional data removed for brevity.....
],
"checkedRegions": [
{
"name": "Background",
"height": 270,
"width": 574,
"xAxis": 1337,
"yAxis": 466
},
{
"name": "Background Bird",
"height": 324,
"width": 486,
"xAxis": 986,
"yAxis": 702
}
// Additional data removed for brevity.....
],
"metaData": {
"name": "Tyrion Lannister",
"dateOfBirth": "1990-08-01T00:00:00.0000000Z",
"mrz": "IRGGRJF321822427<<<<<<<<<<<<1234010M1511114KEN<<<<<<<<<<<8ICTHREEMALE<<TECH<REFRESH<<<<<",
"documentNumber": "123456789",
"documentExpiryDate": "31/05/2022"
},
"result": "Refer",
"photo": "<Base 64 encoded image removed for documentation>",
"signature": "<Base 64 encoded image removed for documentation>"
}
}
Classify Response breakdown
This table describes the properties of the response.
Property Name | Description |
---|---|
Classification | Represents the classification result of the document. |
Verification | Represents the verification result of the document. Please refer to the response properties here. |
Classification
Property Name | Description |
---|---|
ClassificationResult | The classification result: Pass - Indicates a successful classification of the document. Fail - Indicates an unsuccessful classification of the document |
ClassificationDetails | A dictionary of key value pairs representing data from the classified document. We cannot guarantee the existence of any values in this dictionary. For example, classifying one document may return the Version on the document where as verifying another may not. However, we do guarantee the existence of ClassificationName - when ClassificationResult of Fail is present ClassificationName will always be Unknown |
Classification Details
Property Name | Description |
---|---|
ClassificationName | General category of the document type. |
Version | The series - such as year, letter, or integer - to which the document belongs. |
Type | Document subtype, such as Driver License, Driver License Under 21, Identification Card, Over 21, and Under 21. |
IssuerCode | Code of the Government jurisdiction (country, state, or province) that issued the document. |
IssuerName | Government jurisdiction (country, state, or province) that issued the document. |
Verification
The verification response is the same as the Verify endpoint. Please refer to the response properties in the Verify document endpoint documentation.