Document Types
Dokai supports ASEAN identity documents across multiple countries. Each document brand has specific extracted fields tailored to its format. If you omit the type and brand parameters, Dokai auto-detects the document.
Document categories
The document_type parameter specifies the broad category. Most documents are auto-detected.
| Type | Label | Description |
|---|---|---|
identity_card | Identity Card | National identity cards (MyKad, KTP, NRIC) |
passport | Passport | International travel passports with MRZ |
driving_license | Driving License | Government-issued driving licenses |
work_permit | Work Permit | Employment and work authorization documents |
birth_certificate | Birth Certificate | Official birth registration documents |
other | Other | Any document not matching the above categories |
Regional brands
The document_brand parameter specifies the exact regional variant. Each brand maps to a parent document type and defines which fields are extracted.
MyKad
MalaysiamykadMalaysian national identity card for citizens aged 12+
Parent type: identity_card
Extracted fields
| Field | Description |
|---|---|
full_name | Full name as printed on the card |
id_number | 12-digit IC number (e.g. 880503-14-5234) |
date_of_birth | Date of birth (YYYY-MM-DD) |
gender | M or F |
nationality | WARGANEGARA (citizen) |
address | Full residential address |
Extra fields
Returned in the extra object when available.
religionraceDerived fields
Computed automatically from the extracted data.
state_of_birth (from IC prefix)age (calculated)MyPR
MalaysiamyprMalaysian permanent resident identity card
Parent type: identity_card
Extracted fields
| Field | Description |
|---|---|
full_name | Full name |
id_number | 12-digit IC number |
date_of_birth | Date of birth (YYYY-MM-DD) |
gender | M or F |
nationality | PEMASTAUTIN TETAP (permanent resident) |
address | Full residential address |
Extra fields
Returned in the extra object when available.
country_of_originMyKAS
MalaysiamykasMalaysian temporary resident identity card
Parent type: identity_card
Extracted fields
| Field | Description |
|---|---|
full_name | Full name |
id_number | 12-digit IC number |
date_of_birth | Date of birth (YYYY-MM-DD) |
gender | M or F |
nationality | Country of origin |
address | Residential address in Malaysia |
KTP
IndonesiaktpKartu Tanda Penduduk — Indonesian national identity card
Parent type: identity_card
Extracted fields
| Field | Description |
|---|---|
full_name | Full name (Nama) |
id_number | 16-digit NIK number |
date_of_birth | Date of birth (Tanggal Lahir) |
place_of_birth | Place of birth (Tempat Lahir) |
gender | LAKI-LAKI or PEREMPUAN |
address | Full address (Alamat) |
blood_type | Blood type (Gol. Darah) |
Extra fields
Returned in the extra object when available.
religionmarital_statusoccupationrt_rwkelurahankecamatanDerived fields
Computed automatically from the extracted data.
province (from NIK prefix)NRIC
SingaporenricNational Registration Identity Card — Singapore identity card
Parent type: identity_card
Extracted fields
| Field | Description |
|---|---|
full_name | Full name |
id_number | NRIC number (e.g. S8805034Z) |
date_of_birth | Date of birth (YYYY-MM-DD) |
gender | M or F |
race | Race/ethnicity |
address | Registered address |
Extra fields
Returned in the extra object when available.
country_of_birthThai ID
Thailandthai_idThai national identity card (Bat Prachachon)
Parent type: identity_card
Extracted fields
| Field | Description |
|---|---|
full_name | Full name (Thai and English) |
id_number | 13-digit citizen ID |
date_of_birth | Date of birth |
gender | M or F |
address | Address |
Extra fields
Returned in the extra object when available.
issue_dateexpiry_dateThai DL
Thailandthai_dlThai driving license
Parent type: driving_license
Extracted fields
| Field | Description |
|---|---|
full_name | Full name |
id_number | License number |
date_of_birth | Date of birth |
license_class | Vehicle class |
issue_date | Issue date |
expiry_date | Expiration date |
Passports
passportInternational passports from any country. Dokai reads both the visual inspection zone (VIZ) and the machine readable zone (MRZ), cross-validating fields and checksums.
Extracted fields
| Field | Description |
|---|---|
full_name | Full name (surname + given names) |
passport_number | Passport number |
nationality | Nationality (3-letter country code) |
date_of_birth | Date of birth (YYYY-MM-DD) |
gender | M or F |
date_of_issue | Issue date |
date_of_expiry | Expiration date |
place_of_birth | Place of birth |
issuing_authority | Issuing authority or country |
mrz_line_1 | First MRZ line (raw) |
mrz_line_2 | Second MRZ line (raw) |
Derived fields
mrz_valid (checksum verification)days_until_expiry (calculated)Auto-detection
When you omit document_type and document_brand, Dokai analyzes the document image and automatically determines the type and brand. The detected values are returned in the response.
For best accuracy, provide the type and brand if you know them. Auto-detection adds minimal latency (<100ms) but may occasionally misidentify heavily damaged or unusual documents.
Plan restrictions
Free plan: Limited to identity_card and passport document types only (MyKad and Passport brands).
Starter plan: All document types and brands.
Pro & Business: All document types and brands, plus deep scan and batch processing.
Next steps
- Parse Document — submit a document for parsing
- Error Handling — invalid type and brand error codes
- Authentication — test keys return mock data for all document types