🆕

OCR SIM (Beta)

Nodeflux OCR KTP is designed for information data extraction on SIM (Indonesia driver license card) to reduce manual input during registration.
post
https://api.cloud.nodeflux.io
/syncv2/analytics/ocr-sim
Request OCR SIM

Request Header

Key
Value
Authorization
{Your authorization key}
content-type
application/json
x-nodeflux-timestamp
{x-nodeflux-timestamp from your signature request}

Request Body

Required Field
All Fields
{
"images": [
"{INSERT_JPEG_IMAGE_AS_BASE64_STRING_FOR_SIM}"
]
}
{
"images": [
"{INSERT_JPEG_IMAGE_AS_BASE64_STRING_FOR_SIM}"
],
"client_ref":"client124"
}
Key
Type
Details
Compulsory
images
array of a URI base64 image
This parameter containing base64 image JPEG with URI format
Required
client_ref
string
Valid input only alphanumeric with minimum length is 6 digits and the maximum is 128 digits. The client_ref will be returned on the request. The client_ref should be unique.
Optional
Note for image input:
  • The maximum allowed image file size is 800 KB per image The image should be represented in base64 data based on a.JPG format. You can use any online jpg-to-base64 encoder to get the base64 data.
  • Please provide exactly an image of the Indonesian Driver License Card or known as well as SIM (Surat izin Mengemudi).
  • Please input the SIM photo in landscape orientation.
  • For more detail about image configuration please check the page Image Configuration Guideline.
Your request body should follow this format:
{
"images": [
"data:image/jpeg;base64,iVB\
ORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEU\
AAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8\
yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAEl\
FTkSuQmCC"
]
}
The base64 encoded jpeg string should follow the data URI scheme format. See below:
data:[<media type>][;base64],<data>
Valid base64 encoded jpeg string example:
data:image/jpeg;base64,iVB ORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEU AAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8 yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAEl FTkSuQmCC

Response

SIM field is successfully recognized (202)

{
"analytic_type": "OCR_SIM",
"job_id": "<job_id>",
"message": "OCR_SIM Service Success",
"ok": true,
"result": [
{
"nama": "DIMAS WIRA KUSUMA",
"polda": "JATIM",
"alamat": "JL. BRAWIJAYA 280 MIJI KRANGGAN_ KOTA MOJOKERTO",
"tinggi": "168 cm",
"jenis_sim": "A",
"nomor_sim": "000115620105",
"pekerjaan": "PELAJAR",
"tempat_lahir": "KENDAL",
"jenis_kelamin": "PRIA",
"tanggal_lahir": "14-01-2000",
"berlaku_hingga": "14-01-2023",
"golongan_darah": "-"
}
],
"status": "success"
}

Error Response

Rejection because image dimension below 400x 300 px (200)
{
"jo_id": "<job_id>",
"status": "incompleted",
"analytic_type": "OCR_SIM",
"result": [],
"message": "The SIM dimension is smaller than 400x300 pixels. Please retake your SIM photo.",
"ok": true
}
Rejection because there is no field is detected (400)
{
"jo_id": "<job_id>",
"status": "incompleted",
"analytic_type": "OCR_SIM",
"result": [],
"message": "No text is detected. Please check whether the input image has complied with the disclaimer and limitation of this pipeline.",
"ok": true
}
Rejection because there are too many fields not detected (400)
{
"jo_id": "<job_id>",
"status": "incompleted",
"analytic_type": "OCR_SIM",
"result": [],
"message": "There are too many unrecognizable characters. Please check whether the input image has complied with the disclaimer and limitation of this pipeline.",
"ok": true
}

List Charged API Transaction Based on Response

Case
Response Message
Transaction Status
SIM field is successfully recognized (202)
Job successfully submitted!
Charged
Rejection because image dimension below 200x 300 px (200)
The SIM dimension is smaller than 400x300 pixels. Please retake your SIM photo.
Charged
Rejection because there is no field is detected (400)
No text is detected. Please check whether the input image has complied with the disclaimer and limitation of this pipeline.
Charged
Rejection because there are too many fields not detected (400)
There are too many unrecognizable characters. Please check whether the input image has complied with the disclaimer and limitation of this pipeline.
Charged
Wrong base64 causing error decoding (400)
Error on image decoding process
Not charged
Error Because Invalid Token (401)
{"code":"not-authenticate","errors":[],"message":"Invalid HMAC Token","ok":false}
Not charged
Error because of Image file size is bigger (400)
Please re-check your image
Not charged
Error because image type is not JPEG (400)
Invalid base64 jpeg/jpg string, please use valid data URI scheme for jpeg/jpg
Not charged