v1

latestOpenAPI 3.0.22026-07-2432112226.7 KB
KTP

Sandbox - Extract Async

This method helps you to recognize text in KTP image.

The following table describes choice of image to be used as input </br>

ImageDescription
IMAGE_SIZE_EXCEED_LIMITImage with size larger than 5 MB
NO_KTP_DETECTEDNot a KTP photo
KTPKTP photo
KTP_BKTP photo with blur condition
KTP_DKTP photo with dark condition
KTP_BDKTP photo with blur and dark condition
KTP_BFKTP photo with blur and flashlight condition
KTP_FKTP photo with flashlight condition
KTP_GKTP photo with grayscale condition
KTP_FGKTP photo with flashlight and grayscale condition
KTP_BGKTP photo with blur and grayscale condition
KTP_DGKTP photo with dark and grayscale condition

The following table describe reference_id options to be used as an input.

reference_IDDescription
REFERENCE_IDValid reference_id
REFERENCE_ID_EXISTreference_id already exist in App-ID (Not Unique)
REFERENCE_ID_TOO_LONGreference_id is too long
REFERENCE_ID_TOO_SHORTreference_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 statusError codeDescription
400INVALID_SANDBOX_CODEimage/reference_id not exist in image/reference_id code sandbox
400INVALID_PAYLOADNo value in payload or empty string more than 1
400INVALID_PAYLOAD_IMAGE_MISSINGImage field is an empty string
400INVALID_PAYLOAD_IMAGE_SIZEImage size is too big/too small
400INVALID_PAYLOAD_IMAGE_FORMATImage is unable to be decoded/retrieved from url or invalid image extension
400INVALID_PAYLOAD_CALLBACK_URLCallback url payload is empty/null/ not in url format (https://)
400INVALID_PAYLOAD_REFERENCE_IDreference_id is too short/too long
400INVALID_PAYLOAD_REFERENCE_ID_EXISTSreference_id already exists (not unique)
500INTERNAL_SERVER_ERRORInternal server error
post/ktp/id/extract-async

Headers

App-IDstring required
API-Keystring required

Request body

imagestring required

Choice of image, as given in the table

validate_qualityboolean

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

reference_idstring

Choice of reference_id, as given in the table

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": "Request Success",
  "data": {
    "reference_id": "REFERENCE_ID"
  }
}