DocDetail
DocDetail
Document verification details for the APIs under Historical Docs — Identity Verification Solution. This page describes the legacy response structure.
| 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. |
| additionalInfo | object, supplementary document information. See additionalInfo below for the planned postal-code extension and availability. |
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.
additionalInfo
Planned extension: The postal-code response described below is provided for integration planning ahead of service availability. Confirm availability with your integration contact before relying on this field. Examples containing
additionalInfoillustrate the planned response contract.
additionalInfo is an object at data.docDetail.additionalInfo containing supplementary information about the document.
| Field | Type | Description |
|---|---|---|
postalCode | string or null | Postal code looked up using the address extracted from the document. Returns JSON null (without quotes), not the string "null" or an empty string "", when no postal code is available. |
The initial scope is Indonesian KTP documents for solution codes 01, 02, 05, and 10, subject to service enablement. No additional request parameter is required.
This postal code is supplementary information derived from an address lookup; the existing ocrInfo.front.postcode and ocrInfo.back.postcode remain OCR address fields. A postal code is not guaranteed even when an address is available. Postal-code lookup does not affect the IDV pass/fail decision.
When docDetail is present, additionalInfo contains postalCode, with a string value or null. If docDetail itself is null, it remains null. Once the IDV result is final, the postal-code result will not be populated later; no additional polling is required for this field.
Postal code available
Example of the additionalInfo object for an Indonesian KTP address:
{
"postalCode": "71571"
}Postal code unavailable
Example of the additionalInfo object when no postal code is available:
{
"postalCode": null
}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. |
| others | Document’s authenticity is not verified for various reasons. |
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 about 7 hours ago
