Asynchronous KTP method helps you to recognize text in KTP image and the response is returned immediately while the request continues to be processed. There is an option to provide a callback URL, so once the process is complete the result will be returned to the given URL. Otherwise, you can call the get result method to pull the result.
If you use a callback URL, we also provide extra authentication using HTTP basic authentication. This allows you to check whether the request sent to your URL is sent by our backend by looking at the Authorization HTTP header. The username and password can be set to an application ID in Verihubs Client dashboard (https://app.verihubs.com/). Please refer to the documentation in https://docs.verihubs.com/docs/ocr.
The detection of KTP quality is always checked in this Extract KTP Asynchronous, 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||INVALID_PAYLOAD_CALLBACK_URL||Callback url payload is empty/null/ not 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)|
|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|