> For the complete documentation index, see [llms.txt](https://docs.vida.id/identity-stack/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vida.id/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v2/summary-endpoint/id-verification/ktp.md).

# KTP

### Request

<details>

<summary>Request</summary>

```json
{
  "operations": ["idVerification"],
  "payload": {
    "partnerTrxId": "random-uuid",
    "groupId": "random-uuid",
    "idType": "ID_CARD",
    "country": "IDN",
    "idSubtype": "KTP",
    "idFrontSideImage": "Base64 encoded image of ID front side"
  },
  "userConsent": {
    "userIP": "0.0.0.0",
    "country": "MYS",
    "obtained": true,
    "obtainedAt": "1680700959"
  }
}
```

</details>

### Success Response

HTTP Status Code: `200`&#x20;

<details>

<summary>Success JSON Response</summary>

<pre class="language-json"><code class="lang-json">{
    "transactionId": "unique transaction id generated to identify this transaction",
<strong>    "partnerTrxId": "partner transaction id submitted by customer in request",
</strong>    "groupId": "partner group id submitted by customer in request",
    "imageQualityResult": {
        "front": {
            "statusCode": 5000
        }
    },
    "card": {
        "country": "INDONESIA",
        "type": "KTP",
        "isoAlpha3CountryCode": "IDN",
        "isoAlpha2CountryCode": "ID"
    },
    "idVerificationResult": {
        "front": {
            "statusCode": 5000
        }
    }
}
</code></pre>

</details>

### Forged Card Response

HTTP Status Code: `400`&#x20;

<details>

<summary>Forged Card JSON Response</summary>

```json
{
  "transactionId": "unique transaction id generated to identify this transaction",
  "partnerTrxId": "partner transaction id submitted by customer in request",
  "groupId": "partner group id submitted by customer in request",
  "errors": [
    {
        "message": "The card appears to be forged.",
        "code": 5024,
        "operations": [
            "idVerification"
        ]
    }
  ],
  "imageQualityResult": {
   "front": {
    "statusCode": 5000
    }
  }
}
```

</details>

### Spoof Response

HTTP Status Code: `400`&#x20;

<details>

<summary>Spoof JSON Response</summary>

```json
{
  "transactionId": "unique transaction id generated to identify this transaction",
  "partnerTrxId": "partner transaction id submitted by customer in request",
  "groupId": "partner group id submitted by customer in request",
  "errors": [
      {
            "message": "Spoof check failed. Image submitted is color reprint",
            "code": 5603,
            "operations": [
                "idVerification"
            ]
        },
        {
            "message": "Spoof check failed. Image submitted is screenshot",
            "code": 5604,
            "operations": [
                "idVerification"
            ]
        },
        {
            "message": "Spoof check failed. Image submitted is Recaptured",
            "code": 5601,
            "operations": [
                "idVerification"
            ]
        }
  ],
  "imageQualityResult": {
    "front": {
      "statusCode": 5000
    }
  }
}
```

</details>

### Landmark Response

HTTP Status Code: `400`&#x20;

<details>

<summary> Landmark JSON Response</summary>

```json
{
  "transactionId": "unique transaction id generated to identify this transaction",
  "partnerTrxId": "partner transaction id submitted by customer in request",
  "groupId": "partner group id submitted by customer in request",
  "errors": [
      {
        "message": "The card failed the idVerification",
        "code": 5025,
        "operations": [
            "idVerification"
        ]
      }
  ],
  "imageQualityResult": {
    "front": {
      "statusCode": 5000
    }
  }
}
```

</details>
