DocDetail
DocDetail
| Field | Description |
|---|---|
| ocrResult | string, PASS or FAIL |
| docFrontImage |
When returnImageType is When returnImageType is Always return null when solutionCode in ["05"]. (no need to return because the images are originally provided by caller") |
| docBackImage |
When returnImageType is When returnImageType is Always return null when solutionCode in ["05"]. (no need to return because the images are originally provided by caller") |
| docType | object,The document type of the user provided (recognized from the document picture ,not the docType provide when generateUrl). |
| subDocType | object,The sub document type of the user provided(recognized from the document picture ,not the docType provide when generateUrl).It is the same as docType,except PH-ID-NATIONAL_ID,PH-ID-E_NATIONAL_ID-V1,PH-ID-E_NATIONAL_ID-V2. |
| ocrInfo | object, the ocr result of the document images. |
| qualityLabels | object, the image quality assessment result of the document images. |
| forgeryLabels | list, the reasons why the front image of the document is considered forgery. |
| eventDetails | array, Event details. |
| docTypeDetails | object,The document type details recognized from the document pictures. |
ocrResult
| Value | Description |
|---|---|
| PASS | ocr succeeded for all images. |
| FAIL | ocr failed ( ocr failed for at least one image) |
docType
| Value | Description |
|---|---|
| front | The front doc type. |
| back | The back doc type. |
examples:
{
"front": "PH-ID-UMID",
"back": null
}refer toSupported Regions & DocTypes
subDocType
| Value | Description |
|---|---|
| front | The front sub doc type. |
| back | The back sub doc type. |
examples:
{
"front": "PH-ID-E_NATIONAL_ID-V1",
"back": "PH-ID-E_NATIONAL_ID-V1"
}ocrInfo
ocrInfo contains OCR results by document side.
frontandbackrepresent the front and back sides.backisnullfor a single-sided document.- The API does not merge values from both sides. To obtain one value, read
frontfirst and usebackwhen the front value is empty. - Returned fields vary by country, document type, and service configuration. A field may be
nullor omitted.
Example
{
"front": {
"side": "front",
"idNumber": "************",
"documentNumber": null,
"fullName": "EXAMPLE USER",
"fullNameLocal": "EXAMPLE USER",
"firstNameLocal": "EXAMPLE USER",
"birthday": "1990/01/01",
"nationality": "MYS",
"countryCode": "MY",
"issuerCountryIso3": "MYS"
},
"back": {
"side": "back",
"idNumber": null,
"documentNumber": "**************"
}
}Name fields
Use the *NameLocal fields first. Use the *NameEn fields when English names are enabled for the service.
| Field | Description |
|---|---|
fullNameLocal | Full name in the document's original language. This is the primary name field; fullName is used to populate it when needed. |
firstNameLocal | Given name in the document's original language. When the name cannot be split, it may contain fullNameLocal. |
middleNameLocal | Middle name in the document's original language. May be null. |
lastNameLocal | Family name in the document's original language. May be null. |
titleNameLocal | Title in the document's original language. Mainly returned for some Thai documents. |
fullNameEn | English full name. Returned according to service configuration. |
firstNameEn | English given name. Returned according to service configuration. |
middleNameEn | English middle name. Returned according to service configuration. |
lastNameEn | English family name. Returned according to service configuration. |
titleNameEn | English title. Returned according to service configuration. |
fullName, firstName, middleName, lastName, titleName | Compatibility fields. Their language depends on the document and OCR result. |
When OCR succeeds, at least one side contains fullNameLocal. Name fields on an individual side may still be null.
Document number fields
| Document category | idNumber | documentNumber |
|---|---|---|
ID | Primary personal identifier | Other identifier, when available |
PP | Passport number | Personal Number, when available |
DL | Driving licence number | Personal Number, when available |
RP | Residence permit number | Other personal identifier, when available |
idNumber is the primary identifier. If it is empty on the front side, it may be returned on the back side.
Core fields
| Field | Description |
|---|---|
side | Document side: front or back. |
birthday | Date of birth in YYYY/MM/DD format. |
expiryDate | Expiry date in YYYY/MM/DD format. A document with permanent validity returns 2099/01/01. |
issueDate | Issue date in YYYY/MM/DD format. |
fullAddress | Full address. null when unavailable. |
nationality | Nationality in ISO Alpha-3 format, for example MYS. |
issuerCountry | Issuing country or region name, for example Malaysia. |
countryCode | Issuing country or region in ISO Alpha-2 format, for example MY. |
issuerCountryIso3 | Issuing country or region in ISO Alpha-3 format, for example MYS. May be null. |
issuerAuthority | Issuing authority. null when unavailable. |
Additional fields
| Field | Description |
|---|---|
dobDay, dobMonth, dobYear | Date-of-birth components. |
expiryDay, expiryMonth, expiryYear, daysToExpiry | Expiry-date components and days until expiry. |
issueDay, issueMonth, issueYear, daysFromIssue | Issue-date components and days since issue. |
state, city, district, subdistrict, postcode | Address components. |
placeOfBirth, issuerPlace | Place of birth and place of issue. |
gender, genderLocal | Standardized gender and gender in the document's original language. |
nationalityLocal | Nationality in the document's original language. |
height, weight, eyeColor, bloodType, religion | Personal attributes, when present on the document. |
passportType | Passport type. |
vehicleClass, restrictions, endorsement | Driving licence attributes. |
others | Document-specific fields. Its contents vary by country and document type. |
Passport MRZ
When Passport MRZ is enabled, ocrInfo may also contain:
mrz: MRZ OCR results, including issuing country, passport type, name, passport number, Personal Number, date of birth, nationality, gender, and expiry date.mrzCheck: comparison results between visual-zone OCR and MRZ values. Each comparison value is normallypassorfail.
Within mrz, idNumber is the passport number and documentNumber is the Personal Number.
Integration notes
- Parse
ocrInfo.frontandocrInfo.backseparately; do not assume the API merges them. - Support both omitted fields and fields whose value is
null. - Use
*NameEnfor English names; do not infer the language of compatibility name fields. - Ignore unknown fields to remain compatible with future extensions.
eventDetails
| Value | Description |
|---|---|
| event | string,Event name. |
| result | string,Event result. |
| createTimestmap | long,Millisecond timestamp. |
qualityLabels
| Field | Description |
|---|---|
| front | map, The quality label (IQA failed reasons) of document front image. empty if the document front image quality is good. |
| back | map, The quality label (IQA failed reasons) of document back image. null if the document is not two-side. empty if the document front image quality is good. |
examples:
{
"front": null,
"back": null
}{
"front": {
"isBlur": false,
"isDim": false,
"isExposure": true
},
"back": null
}qualityKey
| Value | Description |
|---|---|
| isBlur | The image is blurry. |
| isDim | The image is dim. |
| isExposure | The image is exposure。 |
| occlude | The image is occlude by something. |
| poor_quality | The image is in poor quality. |
forgeryLabels
| Value | Description |
|---|---|
| screenshot | The image is a screenshot. |
| scan | The image is scan. |
| retake | The image is taken from another screen. |
| photocopy | The image is a black and white, or color photocopy. |
| bw_photocopy | The image is a black and white photocopy. |
| color_photocopy | The image is a color photocopy. |
| edited | The image of the card, or the information on the card has been edited or altered. |
| injection | An injection attack is detected in the document image, such as injected synthetic or substituted frames. |
| ai_fake_document | The document is identified as AI-generated or synthetically created. |
| document_fraud | The document appears to be physically fabricated or counterfeit (overall document fraud, not limited to partial editing). |
| other | Document’s authenticity is not verified for various reasons. |
Returned labels depend on the checks performed and the final review outcome; not every label applies to every country or verification flow. Clients should handle unrecognized label values without failing to parse the response.
docTypeDetails
| Value | Description |
|---|---|
| front | docTypeDetail of the front side. |
| back | docTypeDetail of the back side. |
Example
{
"front": {
"side": "FRONT",
"category": "ID",
"subCategory": null,
"docType": "UA-ID-N",
"version": null,
"countryIso3": "UKR"
},
"back": {
"side": "BACK",
"category": "ID",
"subCategory": null,
"docType": "UA-ID-N",
"version": null,
"countryIso3": "UKR"
}
}docTypeDetail
| Value | Description |
|---|---|
| side | enum FRONT or BACK. |
| countryIso3 | the region of the doc. Refer to ISO ALPHA-3 Country Code (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) |
| category | enum, category of the cardType. Refer to docTypeCategoryequals the second part of docType.front/back |
| subCategory | string, subCategory of cardType.equals the third part of docType.front/back splitted by - |
| version | string, version of cardType.equals the last part of docType.front/back splitted by - |
| docType | equals docType.front/back |
docTypeCategory
| Value | Description |
|---|---|
| ID | NationalId |
| PP | Passport |
| DL | Driver's License |
Updated 8 days ago
