API Response
Successful Response
{
"result": {
"documentNumber": "I1234568",
"firstName": "IMA",
"lastName": "CARDHOLDER",
"fullName": "IMA CARDHOLDER",
"sex": "F",
"height": "5'-05\"",
"weight": "125",
"age": 43,
"dob": "1977\/08\/31",
"dob_day": 31,
"dob_month": 8,
"dob_year": 1977,
"expiry": "2014\/08\/31",
"expiry_day": 31,
"expiry_month": 8,
"expiry_year": 2014,
"daysToExpiry": -2406,
"issued": "2009\/08\/31",
"issued_day": 31,
"issued_month": 8,
"issued_year": 2009,
"daysFromIssue": 4233,
"address1": "2570 24TH STREET",
"address2": "ANYTOWN, CA",
"postcode": "95818",
"vehicleClass": "C",
"restrictions": "NONE",
"endorsement": "NONE",
"documentType": "D",
"documentSide": "FRONT",
"issuerOrg_region_full": "California",
"issuerOrg_region_abbr": "CA",
"issuerOrg_full": "United States",
"issuerOrg_iso2": "US",
"issuerOrg_iso3": "USA",
"nationality_full": "United States",
"nationality_iso2": "US",
"nationality_iso3": "USA",
"internalId": "1739"
},
"confidence": {
"documentNumber": 0.853
"firstName": 0.951
"lastName": 0.935
...
},
"face": {
"isIdentical": false,
"confidence": "0.091"
},
"verification": {
"passed": false,
"result": {
"face": false,
"notexpired": false,
"name": true,
"dob": true,
"postcode": true,
"address": false
}
},
"authentication": {
"score": 0.1,
"breakdown": {
"data_visibility": {
"passed": true
},
"image_quality": {
"passed": true
},
"feature_referencing": {
"passed": true
},
"exif_check": {
"passed": false,
"code": 130,
"reason": "Image edited in Photoshop",
"severity": "medium"
},
"publicity_check": {
"passed": false,
"code": 140,
"reason": "This document could be obtained in the public domain",
"severity": "high"
},
"text_analysis": {
"passed": true
},
"biometric_analysis": {
"passed": true
},
"security_feature_check": {
"passed": false,
"code": 171,
"reason": "Security feature partially missing",
"severity": "low"
},
"recapture_check": {
"passed": false,
"code": 180,
"reason": "Recaptured document",
"severity": "medium"
}
},
"warning": [
"Image edited in Photoshop",
"This document could be obtained in the public domain",
"Security feature partially missing",
"Recaptured document"
],
},
"aml": [
{
"entity": "person",
"fullname": [
"IMA CARDHOLDER"
],
"firstname": [
"IMA"
],
"lastname": [
"CARDHOLDER"
],
"alias": [
"IMA CARDHOLDER",
"CARDHOLDER SAMPLE"
],
"dob": [
"1967"
],
"address": [
"2570 24TH STREET ANYTOWN, CA, US(possibly)"
],
"nationality": [
"US"
],
"documentnumber": [
{
"id": "I1234568",
"id_formatted": "I1234568",
"country": "us",
"type": "I"
}
],
"program": [
"SDN List"
],
"note": [
"Executive Order 13224 (Terrorism)"
],
"time": "2019-09-03T22:00:00.000Z",
"source": [
"https:\/\/www.treasury.gov\/resource-center\/sanctions\/Pages\/default.aspx"
],
"database": "us_ofac",
"schema": "sanction"
}
],
"contract": {
"document_url": "https:\/\/objects.idanalyzer.com\/1f6e13d7298ac088490aacfb72c85235.pdf"
},
"vaultid": "I3MS6XjOqsB7Zbye54ohG9F7rtvW02Zv",
"matchrate": 0.95,
"executionTime": 1.3062239170074462890625,
"responseID": "25ca84e72040fcf060f6f20f76031cd0",
"quota": 999,
"credit": 999
}
Error Response
{
"error": {
"message": "Document not recognized",
"code": 9
},
"executionTime": 0.0062239170074462890625,
"responseID": "45ca84e72040fcf060f6f20f76031cd0"
}
Response Reference
Key |
Description |
result |
Contains an array of matched fields and their value. Possible values are:
ID Numbers
documentNumber[str]
- Unique identifier associated with the document (e.g. Passport No./Driver License No./Card Number etc)
personalNumber[str]
- Unique personal identifier associated with the person within a country (e.g. National ID Number)
Note. Document design standards are different for every country, you may encounter documents with both documentNumber and personalNumber, or only one of the fields.
Names
firstName[str]
- First name / Given name
middleName[str]
- Middle name(s)
lastName[str]
- Last name / Family name
fullName[str]
- If the first name and last name cannot be distinguished, full name will be returned instead
firstName_local[str]
- First name in local language if available
middleName_local[str]
- Middle name in local language if available
lastName_local[str]
- Last name in local language if available
fullName_local[str]
- Full name in local language if available
Dates
dob[str]
- Date of birth in YYYY/MM/DD
dob_day[int]
- Date of birth day 1 to 31
dob_month[int]
- Date of birth month 1 to 12
dob_year[int]
- Date of birth year in YYYY
expiry[str]
- Expiry date of document in YYYY/MM/DD
expiry_day[int]
- Day of expiry 1 to 31
expiry_month[int]
- Month of expiry 1 to 12
expiry_year[int]
- Year of expiry in YYYY
issued[str]
- Date of issue in YYYY/MM/DD
issued_day[int]
- Day of issue 1 to 31
issued_month[int]
- Month of issue 1 to 12
issued_year[int]
- Year of issue in YYYY
daysToExpiry[int]
- Number of days before the document expires
daysFromIssue[int]
- Number of days since the document was issued
Personal Information
age[int]
- Age of the document holder
sex[str]
- Gender M=Male, F=Female, X=Unspecified
height[str]
- Height of person
weight[str]
- Weight of person
hairColor[str]
- Hair Color - ANSI D-20 hair color code (3 letters)
eyeColor[str]
- Eye Color - ANSI D-20 eye color code (3 letters)
address1[str]
- Address line 1
address2[str]
- Address line 2
postcode[str]
- Address postcode
placeOfBirth[str]
- Place of birth
Document Information
documentSide[str]
- Side of the document: FRONT, BACK or BIODATA
documentType[str]
- Type of document: P=Passport, D=Driver's License, I=Identity Card, V=Visa, R=Residence Card, O=Other
documentName[str]
- If documentType is "O", a document name will be included.
issuerOrg_region_full[str]
- Document issuer subregion/state. Example: California
issuerOrg_region_abbr[str]
- Document issuer subregion/state abbreviation. Example: CA
issuerOrg_full[str]
- Document issued country. Example: United States
issuerOrg_iso2[str]
- Document issued country code in ISO2. Example: US
issuerOrg_iso3[str]
- Document issued country code in ISO3. Example: USA
nationality_full[str]
- Document holder nationality. Example: United States
nationality_iso2[str]
- Document holder nationality in ISO2. Example: US
nationality_iso3[str]
- Document holder nationality in ISO3. Example: USA
vehicleClass[str]
- Driver license vehicle class
restrictions[str]
- Driver license restrictions
endorsement[str]
- Driver license endorsement
Other Data
optionalData[str]
- Extra unspecific data included in the document
optionalData2[str]
- Extra unspecific data included in the document
internalId[int]
- Used to identify the unique document ID under ID Analyzer system, same type of document should have the same ID.
|
confidence |
If return_confidence is set to true, a key-value array containing field name and confidence level will be returned. Confidence score is a float between 0 to 1.
|
face |
If a biometric verification request was submitted, an array will be returned:
isIdentical[bool]
true
- Biometric verification passed
false
- Biometric verification failed
confidence[float]
- Value between 0 to 1 on how similar the two faces are, 1 being identical.
Upon Error, a different array will be returned:
error[int]
- Error Code
error_message[str]
- Error message. Example: Could not find face data within facial image
Biometric verification error codes:
1
- Could not find face in document image.
2
- Could not find face in face image.
3
- Multiple face detected within face image.
4
- Supplied photo failed to pass liveness check.
5
- You must provide a custom passcode since year of birth is missing from the document.
6
- Invalid passcode format, 4 digit number expected.
7
- Video format not supported or file corrupted
8
- Passcode verification failed.
9
- Face is not clearly visible throughout the entire video.
10
- Supplied video failed to pass liveness check.
|
authentication |
If authenticate is set to true , the document will be validated and an array will be returned:
Authenticate Module V1 Response
score[float]
- The score will be a float between 0 to 1. Valid documents will have a score closer to 1 while fake or edited documents will have a score closer to 0. It is your discretion to decide the boundary, a good starting point would be rejecting score less than 0.5
Authenticate Module V2 Response
score[float]
- The score will be a float between 0 to 1. Valid documents will have a score closer to 1 while fake or edited documents will have a score closer to 0. It is your discretion to decide the boundary, a good starting point would be rejecting score less than 0.5
breakdown[array]
-
Returns details about each checks performed and their results.
Code |
Reason |
Severity |
data_visibility Check if document number, firstname, lastname and birthday are clearly visible |
100 |
Name is not clearly visible |
High |
101 |
Document number is not clearly visible |
High |
102 |
Date of birth is not clearly visible |
Medium |
image_quality Check if the image appears to be a high quality image taken directly from camera without cropping or resizing |
110 |
Image appears to be computer generated |
High |
111 |
Image is too blurry |
Low |
112 |
Document image too small |
Low |
113 |
Document file too small |
Low |
114 |
Black white image |
Low |
feature_referencing Check features and details of submitted document with a genuine document reference |
120 |
Document features does not match up with genuine document |
Medium |
121 |
Unable to perform feature referencing on provided document type |
Low |
exif_check Check if the image has been edited in photo editing software |
130 |
Image edited in (program name) |
Medium |
publicity_check Check if the document can be obtained from a public domain such as the internet |
140 |
This document could be obtained in the public domain |
High |
text_analysis Check if the text present in the document has been tampered |
150 |
Text fragments appears to be computer generated |
High |
151 |
Unnatural text '(list of texts)' detected in '(list of fields)' |
Medium |
152 |
Text too blurry for analysis |
High |
153 |
No text fragment detected |
High |
biometric_analysis Check biometric features of the document |
160 |
No photo detected |
High |
161 |
Predicted age of photo is (age prediction), (age on document) shown on document |
Low |
162 |
Gender mismatch between document and photo |
Medium |
163 |
Photo failed to pass liveness check |
High |
security_feature_check Check if watermark, hologram, laser engraving are present on the document |
170 |
Security feature completely missing |
Medium |
171 |
Security feature partially missing |
Low |
172 |
Security feature verification not supported for this document |
Low |
recapture_check Check if the document is a recaptured image from a screen |
180 |
Recaptured document |
Medium |
warning[array]
- Array of string containing warning messages about validity of the document
Authenticate Module "Quick" Response
score[float]
- The score will be either 0 or 1. Valid documents will have a score of 1 while fake documents will have a score of 0.
|
verification |
If any of the verification parameters were submitted, an array will be returned:
passed[bool]
true
- Document has passed all verifications
false
- Document has failed at least one verification type
result[array]
- Array containing result
boolean for individual verification:
Field |
Description |
checkdigit |
If the type of document has a check digit/soundex algorithm, whether the check digits are valid. |
face |
If biometric verification is enabled, whether similarity confidence score is above set threshold. |
notexpired |
Whether the document has not yet expired. |
documentNumber |
Whether supplied document number matched with document number parsed from ID. |
name |
Whether supplied name matched with the name parsed from ID. |
age |
Whether document holder is within the set age range. |
dob |
Whether supplied birthday matched with the birthday parsed from ID. |
address |
Whether supplied address matched with the address parsed from ID. |
postcode |
Whether supplied postcode matched with the postcode parsed from ID. |
cccode |
If the type of document has Chinese commercial code (CC code) implementation, whether the CC codes are valid. |
|
aml |
Array containing list of AML matches, returns an empty array if no match was found. For specific details refer to AML API Reference. |
contract |
If a template ID is set through contract_generate , an autofilled document will be generated:
document_url[string]
- URL to generated document
error[string]
- In case the contract failed to generate, this field will contain reason such as "Invalid contract template ID".
|
vaultid |
Unique identifier to the vault entry if vault_save is enabled.
|
matchrate |
The ratio of fields successfully recognized by the API, a low ratio would indicate the document image is too blurry.
|
output |
If outputimage is set to true and outputmode is url , this field will include an URL (or an array of URLs for dualside scan) pointing to the cropped document image. The link is only guaranteed to live for 600 seconds, and will be removed any time after.
|
outputface |
If outputface is set to true and outputmode is url , this field will include an URL pointing to the cropped face image. The link is only guaranteed to live for 600 seconds, and will be removed any time after.
|
cropped |
If outputimage is set to true and outputmode is base64 , this field will include a base64-encoded image (or an array of base64-encoded images for dualside scan) of cropped document in JPEG format
|
croppedface |
If outputface is set to true and outputmode is base64 , this field will include a base64-encoded image of cropped face region of the document in JPEG format
|
executionTime |
Time taken for the API operation in seconds. |
responseID |
A unique identifier to identify the request/response. |
quota |
Remaining API quota, resets at beginning of each month for free or yearly subscriber, or at start of each billing cycle for monthly subscriber. If you have a subscription plan, your monthly quota will be used before your credit. |
credit |
Remaining test credit for your account. If you have a subscription plan, your monthly quota will be used before your credit. |
error |
This field will only be returned if there was an error, containing the following array:
code[int]
1
- Invalid API Key
2
- Invalid remote image URL
3
- Download remote image failed
4
- Invalid remote image MIME type
5
- No input document image detected
6
- Invalid file extension for file upload
7
- Image file format not supported or corrupted
8
- You have exhausted your quota, please purchase or upgrade your subscription plan.
9
- Document not recognized
10
- Document was not issued by one of the specified countries
11
- Document was not issued by one of the specified regions
12
- Document of this type is not accepted
13
- Image missing from dual-side request
14
- Dual-side check failed, information mismatch between front and back of document
15
- Document blocked
99
- Unexpected API error
message[str]
- Description of the error encountered.
|
Interpreting Results
Once you receive response from server, you should first check if the error
key is present and handle the errors.
The next step is to check if all the data fields needed by your application is present inside the result
object,
for example you need to record customer first name, last name and date of birth,
you then need to look for the result.firstName
, result.lastName
and result.dob
values.
If you are performing a biometric verification, you should check if face.isIdentical
equals to true. Alternatively, you can also check for verification.face
value.
If you are authenticating the document, you should check if authentication.score
is bigger than a threshold, for example, 0.5.
If you are performing additional verifications, such as name or age verification, you should check whether verification.name
and verification.age
equals to true
.
If you are performing AML/PEP compliance checks, you should make sure that the aml
field is empty, a non-empty value indicates potential matches and warrants further investigation.