DocDetail

DocDetail

Document verification details for the APIs under Historical Docs — Identity Verification Solution. This page describes the legacy response structure.

FieldDescription
ocrResultstring, PASS or FAIL
docFrontImage

string,
The front image of the document.

When returnImageType is URL, this value is a link that will be expired in 1 day; if the link is expired ,you need to re query this endpoint to get a new link.

When returnImageType is BASE64, this value is a Base64 encoded string of image bytes.

Always return null when solutionCode in ["05"]. (no need to return because the images are originally provided by caller")

docBackImage

string,
The back image of the document ( only if the document has two sides).

When returnImageType is URL, this value is a link that will be expired in 1 day; if the link is expired ,you need to re query this endpoint to get a new link.

When returnImageType is BASE64, this value is a Base64 encoded string of image bytes.

Always return null when solutionCode in ["05"]. (no need to return because the images are originally provided by caller")

docTypeobject,The document type of the user provided (recognized from the document picture ,not the docType provide when generateUrl).
subDocTypeobject,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.
ocrInfoobject, the ocr result of the document images.
qualityLabelsobject, the image quality assessment result of the document images.
forgeryLabelslist, the reasons why the front image of the document is considered forgery.
eventDetailsarray, Event details.
docTypeDetailsobject,The document type details recognized from the document pictures.
additionalInfoobject, supplementary document information. See additionalInfo below for the planned postal-code extension and availability.

ocrResult

ValueDescription
PASSocr succeeded for all images.
FAILocr failed ( ocr failed for at least one image)

docType

ValueDescription
frontThe front doc type.
backThe back doc type.

examples:

{
  "front": "PH-ID-UMID",
  "back": null
}

refer toSupported Regions & DocTypes

subDocType

ValueDescription
frontThe front sub doc type.
backThe 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.

  • front and back represent the front and back sides. back is null for a single-sided document.
  • The API does not merge values from both sides. To obtain one value, read front first and use back when the front value is empty.
  • Returned fields vary by country, document type, and service configuration. A field may be null or 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.

FieldDescription
fullNameLocalFull name in the document's original language. This is the primary name field; fullName is used to populate it when needed.
firstNameLocalGiven name in the document's original language. When the name cannot be split, it may contain fullNameLocal.
middleNameLocalMiddle name in the document's original language. May be null.
lastNameLocalFamily name in the document's original language. May be null.
titleNameLocalTitle in the document's original language. Mainly returned for some Thai documents.
fullNameEnEnglish full name. Returned according to service configuration.
firstNameEnEnglish given name. Returned according to service configuration.
middleNameEnEnglish middle name. Returned according to service configuration.
lastNameEnEnglish family name. Returned according to service configuration.
titleNameEnEnglish title. Returned according to service configuration.
fullName, firstName, middleName, lastName, titleNameCompatibility 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 categoryidNumberdocumentNumber
IDPrimary personal identifierOther identifier, when available
PPPassport numberPersonal Number, when available
DLDriving licence numberPersonal Number, when available
RPResidence permit numberOther 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

FieldDescription
sideDocument side: front or back.
birthdayDate of birth in YYYY/MM/DD format.
expiryDateExpiry date in YYYY/MM/DD format. A document with permanent validity returns 2099/01/01.
issueDateIssue date in YYYY/MM/DD format.
fullAddressFull address. null when unavailable.
nationalityNationality in ISO Alpha-3 format, for example MYS.
issuerCountryIssuing country or region name, for example Malaysia.
countryCodeIssuing country or region in ISO Alpha-2 format, for example MY.
issuerCountryIso3Issuing country or region in ISO Alpha-3 format, for example MYS. May be null.
issuerAuthorityIssuing authority. null when unavailable.

Additional fields

FieldDescription
dobDay, dobMonth, dobYearDate-of-birth components.
expiryDay, expiryMonth, expiryYear, daysToExpiryExpiry-date components and days until expiry.
issueDay, issueMonth, issueYear, daysFromIssueIssue-date components and days since issue.
state, city, district, subdistrict, postcodeAddress components.
placeOfBirth, issuerPlacePlace of birth and place of issue.
gender, genderLocalStandardized gender and gender in the document's original language.
nationalityLocalNationality in the document's original language.
height, weight, eyeColor, bloodType, religionPersonal attributes, when present on the document.
passportTypePassport type.
vehicleClass, restrictions, endorsementDriving licence attributes.
othersDocument-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 normally pass or fail.

Within mrz, idNumber is the passport number and documentNumber is the Personal Number.

Integration notes

  1. Parse ocrInfo.front and ocrInfo.back separately; do not assume the API merges them.
  2. Support both omitted fields and fields whose value is null.
  3. Use *NameEn for English names; do not infer the language of compatibility name fields.
  4. 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 additionalInfo illustrate the planned response contract.

additionalInfo is an object at data.docDetail.additionalInfo containing supplementary information about the document.

FieldTypeDescription
postalCodestring or nullPostal 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

ValueDescription
eventstring,Event name.
resultstring,Event result.
createTimestmaplong,Millisecond timestamp.

qualityLabels

FieldDescription
frontmap, The quality label (IQA failed reasons) of document front image. empty if the document front image quality is good.
backmap, 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

ValueDescription
isBlurThe image is blurry.
isDimThe image is dim.
isExposureThe image is exposure。
occludeThe image is occlude by something.
poor_qualityThe image is in poor quality.

forgeryLabels

ValueDescription
screenshotThe image is a screenshot.
scanThe image is scan.
retakeThe image is taken from another screen.
photocopyThe image is a black and white, or color photocopy.
bw_photocopyThe image is a black and white photocopy.
color_photocopyThe image is a color photocopy.
editedThe image of the card, or the information on the card has been edited or altered.
othersDocument’s authenticity is not verified for various reasons.

docTypeDetails

ValueDescription
frontdocTypeDetail of the front side.
backdocTypeDetail 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

ValueDescription
sideenum FRONT or BACK.
countryIso3the region of the doc.
Refer to ISO ALPHA-3 Country Code (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3)
categoryenum, category of the cardType. Refer to docTypeCategory
equals the second part of docType.front/back
subCategorystring, subCategory of cardType.
equals the third part of docType.front/back splitted by -
versionstring, version of cardType.
equals the last part of docType.front/back splitted by -
docTypeequals docType.front/back

docTypeCategory


ValueDescription
IDNationalId
PPPassport
DLDriver's License

Did this page help you?