post
https://api.verihubs.com/ktp/id/extract-async
This method helps you to recognize text in KTP image.
The following table describes choice of image to be used as input
| Image | Description |
|---|---|
| IMAGE_SIZE_EXCEED_LIMIT | Image with size larger than 5 MB |
| NO_KTP_DETECTED | Not a KTP photo |
| KTP | KTP photo |
| KTP_B | KTP photo with blur condition |
| KTP_D | KTP photo with dark condition |
| KTP_BD | KTP photo with blur and dark condition |
| KTP_BF | KTP photo with blur and flashlight condition |
| KTP_F | KTP photo with flashlight condition |
| KTP_G | KTP photo with grayscale condition |
| KTP_FG | KTP photo with flashlight and grayscale condition |
| KTP_BG | KTP photo with blur and grayscale condition |
| KTP_DG | KTP photo with dark and grayscale condition |
The following table describe reference_id options to be used as an input.
| reference_ID | Description |
|---|---|
| REFERENCE_ID | Valid reference_id |
| REFERENCE_ID_EXIST | reference_id already exist in App-ID (Not Unique) |
| REFERENCE_ID_TOO_LONG | reference_id is too long |
| REFERENCE_ID_TOO_SHORT | reference_id is too short |
You will receive a response of your payload request which consists of message and an error code if the request process failed. The following table is a list of error codes for the KTP extraction payload request.
| Error status | Error code | Description |
|---|---|---|
| 400 | INVALID_SANDBOX_CODE | image/reference_id not exist in image/reference_id code sandbox |
| 400 | INVALID_PAYLOAD | No value in payload or empty string more than 1 |
| 400 | INVALID_PAYLOAD_IMAGE_MISSING | Image field is an empty string |
| 400 | INVALID_PAYLOAD_IMAGE_SIZE | Image size is too big/too small |
| 400 | INVALID_PAYLOAD_IMAGE_FORMAT | Image is unable to be decoded/retrieved from url or invalid image extension |
| 400 | INVALID_PAYLOAD_CALLBACK_URL | Callback url payload is empty/null/ not in url format (https://) |
| 400 | INVALID_PAYLOAD_REFERENCE_ID | reference_id is too short/too long |
| 400 | INVALID_PAYLOAD_REFERENCE_ID_EXISTS | reference_id already exists (not unique) |
| 500 | INTERNAL_SERVER_ERROR | Internal server error |
