---
title: "Sandbox - Get Extract Async"
method: GET
path: "/ktp/id/extract-async/result"
tags: ["KTP"]
---

# Sandbox - Get Extract Async

`GET /ktp/id/extract-async/result`

## Request

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

This method helps you to get the recognition result of extract KTP asynchronous.

</br>
You will receive a response of your payload request which consists of message and an error code if the request fails to process. The following is a list of error codes of get KTP extraction payload request.

</br> reference_id code with _V (e.g REFERENCE_ID_KTP_B_V) means the quality validation is on. 

  |reference_id|Description|
  |-----|-----------|
  |REFERENCE_ID_KTP|Valid reference_id and KTP photo|
  |REFERENCE_ID_KTP_B|Valid reference_id and KTP photo in blur condition|
  |REFERENCE_ID_KTP_D|Valid reference_id and KTP photo in dark condition|
  |REFERENCE_ID_KTP_BD|Valid reference_id and KTP photo in blur and dark condition|
  |REFERENCE_ID_KTP_F|Valid reference_id and KTP photo in flashlight condition|
  |REFERENCE_ID_KTP_G|Valid reference_id and KTP photo in grayscale condition|
  |REFERENCE_ID_KTP_FG|Valid reference_id and KTP photo in flashlight and grayscale condition|
  |REFERENCE_ID_KTP_DG|Valid reference_id and KTP photo in dark and grayscale condition|
  |REFERENCE_ID_KTP_BF|Valid reference_id and KTP photo in blur and flashlight condition|
  |REFERENCE_ID_KTP_BG|Valid reference_id and KTP photo in blur and grayscale condition|
  |REFERENCE_ID_KTP_B_V|Valid reference_id and KTP photo in blur condition with validation_quality|
  |REFERENCE_ID_KTP_D_V|Valid reference_id and KTP photo in dark condition with validation_quality|
  |REFERENCE_ID_KTP_BD_V|Valid reference_id and KTP photo in blur and dark condition with validation_quality|
  |REFERENCE_ID_KTP_F_V|Valid reference_id and KTP photo in flashlight condition with validation_quality|
  |REFERENCE_ID_KTP_G_V|Valid reference_id and KTP photo in grayscale condition with validation_quality|
  |REFERENCE_ID_KTP_FG_V|Valid reference_id and KTP photo in flashlight and grayscale condition with validation_quality|
  |REFERENCE_ID_KTP_DG_V|Valid reference_id and KTP photo in dark and grayscale condition with validation_quality|
  |REFERENCE_ID_KTP_BF_V|Valid reference_id and KTP photo in blur and flashlight condition with validation_quality|
  |REFERENCE_ID_KTP_BG_V|Valid reference_id and KTP photo in blur and grayscale condition with validation_quality|
  |REFERENCE_ID_NOT_FOUND|reference_id not found|
  |REFERENCE_ID_KTP_NOT_DETECTED|reference_id and KTP photo not detected|
  |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 describes choice of image to be used as input.
  

|Error Status|  Error code  |Description          |
|---------------| ------------------------------|----------------------------------------------|
| 400 | INVALID_SANDBOX_CODE              | reference_id not exist in reference_id code sandbox  |
|400| INVALID_PAYLOAD_REFERENCE_ID | reference_id is too short/too long |
|404| INVALID_PAYLOAD_REFERENCE_ID_NOT_FOUND | reference_id is not found / reference_id payload is missing|
|500| INTERNAL_SERVER_ERROR         | Internal server error |
But, you can also receive error_code in your successful request. This error_code indicates an error that appeared in processing the request from the extract-async method. The following is a list of error_code you might get. <br>

| Error code                    | Description                                  |
|----------------------------------------------|----------------------------------------------|
| FAIL_ON_1 | Fail on quality |
| KTP_NOT_DETECTED              | KTP not detected from image              |
| INTERNAL_SERVER_ERROR         | Internal server error | <br>

## Query parameters

- `reference_id` string, required

## Headers

- `App-ID` string, required
- `API-Key` string, required

## Response `200`

Successful Response

- ResponseExtractKTPAsyncResult
  - `message` string, required: Message
  - `error_code` string: This error_code indicates an error that appeared in processing the request from the extract-async method
  - `data` object: Show the recognition result
    - `address` string: Shows address from KTP
    - `administrative_village` string: Shows administrative village from KTP
    - `blood_type` string: Shows blood type from KTP
    - `city` string: Shows city from KTP
    - `date_of_birth` string: Shows date of birth from KTP
    - `district` string: Shows district from KTP
    - `full_name` string: Shows full name from KTP
    - `gender` string: Shows gender from KTP
    - `marital_status` string: Shows marital status from KTP
    - `nationality` string: Shows nationality from KTP
    - `nik` string: Shows NIK from KTP
    - `occupation` string: Shows occupation from KTP
    - `place_of_birth` string: Shows place of birth from KTP
    - `religion` string: Shows religion from KTP
    - `rt_rw` string: Shows RT/ RW from KTP
    - `state` string: Shows state from KTP
    - `image_quality` object: Shows quality of image
      - `blur` boolean
      - `dark` boolean
      - `flashlight` boolean
      - `grayscale` boolean

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `500`: Internal Server Error

---

[API](https://skmtc.dev/verihubs/apis/sandbox-ai-api-documentation.md) - [All operations](https://skmtc.dev/verihubs/apis/sandbox-ai-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/verihubs/apis/sandbox-ai-api-documentation/revisions/a6dfa332ac11?raw)
