Note: The RELIGION field is optional on Malaysian ID cards, meaning it may or may not be printed on the card. As a result, this field may also be present or absent in the response.
MyKad
Request
{"operations":["ocr"],"payload":{"partnerTrxId":"random-uuid","groupId":"random-uuid","idType":"ID_CARD","country":"MYS","idSubtype":"MyKad","idFrontSideImage":"Base64 encoded image of ID front side"},"userConsent":{"userIP":"0.0.0.0","country":"MYS","obtained":true,"obtainedAt":"1680700959"}}
Success Response
HTTP Status Code: 200
Success JSON Response
{"transactionId":"unique transaction id generated to identify this transaction","partnerTrxId":"partner transaction id submitted by customer in request","groupId":"partner group id submitted by customer in request","imageQualityResult":{"glare":{"score":0,"threshold":0.95},"blurriness":{"score":0.000001,"threshold":0.95},"lowLight":{"score":0.045506,"threshold":0.95}},"card":{"country":"MALAYSIA","type":"MyKad","isoAlpha3CountryCode":"MYS","isoAlpha2CountryCode":"MY"},"ocrResult":{"data":{"idNumber":{"value":"Id Number from the card","score":0.802543,"threshold":0.95},"name":{"value":"Name from id card","score":0.841026,"threshold":0.95},"address":{"value":"Address from id card","score":0.789136,"threshold":0.95},"dob":{"value":"Date of birth in YYYYMMDD format","score":0.802543,"threshold":0.95},"citizenship":{"value":"Citizenship from id card","score":0.829340,"threshold":0.95},"gender":{"value":"Gender from id card (M/F/O)","score":0.872438,"threshold":0.95},"religion":{"value":"Religion from id card","score":0.495276,"threshold":0.95},"address1":{"value":"address 1","score":1,"threshold":0.95},"address2":{"value":"address 2","score":1,"threshold":0.95},"zipCode":{"value":"Zip Code","score":1,"threshold":0.95},"city":{"value":"City","score":1,"threshold":0.95},"state":{"value":"State","score":1,"threshold":0.95},"portraitImage":"Base64 encoded cropped face image from id card"}}}
Error 5023 - IdNumber Doesn't contain a valid DOB
Note: In some cases, glare or other obstructions on MyKad cards may prevent proper extraction of the ID number, which in turn affects the extraction of the date of birth. If the ID number is occluded or not extracted correctly, the following error message will be returned.
HTTP Status Code: 400
Error 5023 - JSON Response
IdNumber with '*' at the end
Note: Some MyKad cards have an * at the end of the ID number. This asterisk indicates that the ID number does not match the cardholder’s date of birth. Instead, the first six digits, which typically represent the date of birth, correspond to the date of application for the MyKad.
HTTP Status Code: 200
IdNumber with '*' JSON Response
OCR Warning for low scores
Note: Any field if has a score lower than threshold value of 0.95, we raise a low score warning for the field.
HTTP Status Code: 200
OCR Warning JSON Response
Image Color Reprint
HTTP Status Code: 200
Image Color Reprint JSON Response
MyTentera
Request
Success Response
HTTP Status Code: 200
Success JSON Response
Error 5023 - IdNumber Doesn't contain a valid DOB
Note: In some cases, glare or other obstructions on MyTentera cards may prevent proper extraction of the ID number, which in turn affects the extraction of the date of birth. If the ID number is occluded or not extracted correctly, the following error message will be returned.
HTTP Status Code: 400
Error 5023 - JSON Response
OCR Warning's for low score
Note: Any field if has a score lower than threshold value of 0.95, we raise a low score warning for the field.
HTTP Status Code: 200
OCR Warning JSON Response
Image Color Reprint
HTTP Status Code: 200
Image Color Reprint JSON Response
MyKas
Request
Success Response
HTTP Status Code: 200
Success JSON Response
Error 5023 - IdNumber Doesn't contain a valid DOB
Note: In some cases, glare or other obstructions on MyKas cards may prevent proper extraction of the ID number, which in turn affects the extraction of the date of birth. If the ID number is occluded or not extracted correctly, the following error message will be returned.
HTTP Status Code: 400
Error 5023 - JSON Response
OCR Warning's for low score
Note: Any field if has a score lower than threshold value of 0.95, we raise a low score warning for the field.
HTTP Status Code: 200
OCR Warning JSON Response
Image Color Reprint
HTTP Status Code: 200
Image Color Reprint JSON Response
MyPR
Request
Success Response
HTTP Status Code: 200
Success JSON Response
Error 5023 - IdNumber Doesn't contain a valid DOB
Note: In some cases, glare or other obstructions on MyPR cards may prevent proper extraction of the ID number, which in turn affects the extraction of the date of birth. If the ID number is occluded or not extracted correctly, the following error message will be returned.
HTTP Status Code: 400
Error 5023 - JSON Response
OCR Warning's for low score
Note: Any field if has a score lower than threshold value of 0.95, we raise a low score warning for the field.