post https://api.verihubs.com/v2/ktp/extract
Synchronous KTP method helps you to recognize text in KTP image and the extraction result will be processed and returned immediately.
The detection of KTP quality is always checked in this Extract KTP Synchronous, but you can set whether you want to validate your KTP quality photo by using validate_quality request.
You will receive a response consists of message and an error code if the request fails to process. The following is a list of error codes.
Error status | Error code | Description |
---|---|---|
400 | INVALID_PAYLOAD | No value in payload or empty string more than 1 |
400 | INVALID_PAYLOAD_IMAGE_MISSING | Image empty string |
400 | INVALID_PAYLOAD_IMAGE_SIZE | Image size too big/too small |
400 | INVALID_PAYLOAD_IMAGE_FORMAT | Image unable to be decoded/got from url OR invalid image extension |
400 | MISSING_PAYLOAD_IMAGE | Missing payload image |
400 | KTP_NOT_DETECTED | KTP not detected from image |
400 | INVALID_PAYLOAD_REFERENCE_ID | reference_id is too short/too long |
400 | INVALID_PAYLOAD_REFERENCE_ID_EXISTS | reference_id already exists (not unique) |
400 | INVALID_PAYLOAD_QUALITY_VALIDATION_DEPENDENCY | is_quality must be true if validate_quality true |
403 | INSUFFICIENT_QUOTA | Quota for extract/quality is not sufficient to further continue the request (Only appears on testing mode) |
500 | INTERNAL_SERVER_ERROR | Internal server error |