Skip to main content

Malaysian ID Extraction

Extracts ID number, name, sex, date of birth and address from a Malaysian ID card (MyKad).

POSThttps://sandbox/pcs/MalaysianId

Content-Type: application/json

Headers​

HeaderTypeRequiredDescription
keystringYesAPI key issued for authentication.

Request body​

FieldTypeRequiredDescription
recordIdstringYesUnique ID you assign to correlate the request with the response.
imagestringYesBase64 string / data URI of the Malaysian ID image.

Example​

POST/pcs/MalaysianId
curl --location 'https://sandbox/pcs/MalaysianId' \
--header 'key: <your-api-key>' \
--header 'Content-Type: application/json' \
--data '{
  "recordId": "1",
  "image": "data:image/png;base64,<BASE64_STRING>"
}'
200
{
"status": "success",
"recordId": "1",
"data": {
  "idNumber": "123456",
  "name": "name-string",
  "sex": "sex-string",
  "dob": "dob-string",
  "address": "address-string"
},
"utc_time_stamp": "07/11/2024, 07:35:09"
}

Response​

FieldTypeDescription
statusstringsuccess when data was extracted.
recordIdstringEchoes the recordId sent in the request.
data.idNumberstringMyKad identification number.
data.namestringHolder's name.
data.sexstringHolder's sex.
data.dobstringDate of birth.
data.addressstringFull address as printed on the card.
utc_time_stampstringUTC timestamp of the response, DD/MM/YYYY, HH:mm:ss.

Error handling​

200 on success, 422 on a validation error — see Error handling for the common error shape.