KTP - Asynchronous

Extract KTP (Asynchronous)

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. <br>

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. </br>

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. <br>

Error statusError codeDescription
400INVALID_PAYLOADNo value in payload or empty string more than 1
400INVALID_PAYLOAD_IMAGE_MISSINGImage empty string
400INVALID_PAYLOAD_IMAGE_SIZEImage size too big/too small
400INVALID_PAYLOAD_IMAGE_FORMATImage unable to be decoded/got from url OR invalid image extension
400MISSING_PAYLOAD_IMAGEMissing payload image
400INVALID_PAYLOAD_CALLBACK_URLCallback url payload is empty/null/ not url format (https://)
400INVALID_PAYLOAD_REFERENCE_IDreference_id is too short/too long
400INVALID_PAYLOAD_REFERENCE_ID_EXISTSreference_id already exists (not unique)
400INVALID_PAYLOAD_QUALITY_VALIDATION_DEPENDENCYis_quality must be true if validate_quality true
403INSUFFICIENT_QUOTAQuota for extract/quality is not sufficient to further continue the request (Only appears on testing mode)
500INTERNAL_SERVER_ERRORInternal server error
post/ktp/id/extract-async

Request

  • Base URL
    https://api.verihubs.com
  • URL
    https://api.verihubs.com/ktp/id/extract-async
  • Auth
    none declared. Required headers: App-ID, API-Key

Headers

App-IDstring required
API-Keystring required

Request body

imagestring required

A base64 image file.

validate_qualityboolean

A flag to determine whether quality validation will be executed. The validation consists of checking blur and dark with threshold.

reference_idstring

used as the identity of the recognition result

callback_urlstring

used to send recognition results to a specific url

Response

Successful Response

messagestring required

Message indicating the status of the request to be processed

Example response

{
  "message": "Accepted",
  "data": {
    "reference_id": "98a708d2-3dad-42e8-8a7d-52ae45c17463"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.