> 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/http-status-and-error-codes/all-error-scenarios-related-to-ocr-and-idv.md).

# All Error Scenarios Related to OCR and IDV

{% hint style="info" %}
**Note :** In case of any error messages in response like 'No card detected and 'Bad Quality Image , Id Number Extraction Failed then in this case card details won't be generated. i.e:
{% endhint %}

<details>

<summary>Example Error Response Card</summary>

```json
"card":{
    "country": "COUNTRY",
    "type": "CARD_TYPE",
    "isoAlpha3CountryCode": "Alpha 3 Country Code",
    "isoAlpha2CountryCode": "Alpha 2 Country Code"
},
```

</details>

### Success - 5000&#x20;

<details>

<summary>Request Sample</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyKas",
        "idFrontSideImage":"", //Base64 encoded image of Front Side ID Card
        "idBackSideImage": "" //Base64 encoded image of Back Side ID Card, If enabled
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>Response Sample</summary>

<pre class="language-json"><code class="lang-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",    
    "card": {
        "country": "MALAYSIA",
        "type": "MyKad",
        "isoAlpha3CountryCode": "MYS",
        "isoAlpha2CountryCode": "MY"
    },
    "imageQualityResult": {
        "front": {
            "glare": {
                "score": 0,
                "threshold": 0.95
            },
            "blurriness": {
                "score": 0.0008,
                "threshold": 0.95
            },
            "lowLight": {
                "score": 0.076793,
                "threshold": 0.95
            }
        },
        "back": {
            "blurriness": {
                "score": 0.003535,
                "threshold": 0.95
            },
            "lowLight": {
                "score": 0,
                "threshold": 0.95
            }
        }
    },
    "idVerificationResult": {
        "front": {
            "spoofingResult": {
                "message": "Success",
                "code": 5000,
                "recapScore": {
                    "score": 0.156807,
                    "threshold": 0.95
                },
                "blackWhite": {
                    "score": 0.005257,
                    "threshold": 0.95
                }
            },
            "landmarkResult": {
                "code": 5000,
                "message": "Success",
                "threshold": 0.95,
                "containerResult": [
                    {
                        "name": "card_logo",
                        "score": 0.9831
                    },
                    {
                        "name": "chip",
                        "score": 0.9748
                    },
                    {
                        "name": "hibiscus_logo",
                        "score": 0.9832
                    },
                    {
                        "name": "malaysia_flag",
                        "score": 0.9882
                    },
<strong>                    {
</strong>                        "name": "ghost",
                        "score": 0.9891
                    },
                    {
                        "name": "portrait",
                        "score": 0.9691
                    },
                    {
                        "name": "msc_logo",
                        "score": 0.9785
                    },
                    {
                        "name": "kad_pengenalan_header",
                        "score": 0.9847
                    },
                    {
                        "name": "id_number",
                        "score": 0.9941
                    },
                    {
                        "name": "name",
                        "score": 0.9915
                    }
                ]
            },
            "forgeryResult": {
                "code": 5000,
                "message": "Success",
                "summary": {
                    "score": 0.257167,
                    "threshold": 0.95
                }
            }
        },
        "back": {
            "spoofingResult": {
                "message": "Success",
                "code": 5000,
                "recapScore": {
                    "score": 0.270645,
                    "threshold": 0.95
                },
                "blackWhite": {
                    "score": 0.014498,
                    "threshold": 0.95
                }
            },
            "landmarkResult": {
                "code": 5000,
                "message": "Success",
                "threshold": 0.95,
                "containerResult": [
                    {
                        "name": "coat_of_arm",
                        "score": 0.9956
                    },
                    {
                        "name": "kopiah",
                        "score": 0.995
                    },
                    {
                        "name": "twin_tower",
                        "score": 0.9934
                    },
                    {
                        "name": "state_registrar",
                        "score": 0.9913
                    },
                    {
                        "name": "id_number",
                        "score": 0.9906
                    },
                    {
                        "name": "sn",
                        "score": 0.9911
                    }
                ]
            }
        }
    },
    "ocrResult": {
        "front": {
            "data": {
                "idNumber": {
                    "value": "ID Number from ID Card",
                    "score": 0.993373,
                    "threshold": 0.95
                },
                "name": {
                    "value": "Name",
                    "score": 0.999926,
                    "threshold": 0.95
                },
                "address": {
                    "value": "Address",
                    "score": 0.997141,
                    "threshold": 0.95
                },
                "dob": {
                    "value": "YYYY-MM-DD",
                    "score": 0.993373,
                    "threshold": 0.95
                },
                "citizenship": {
                    "value": "Citizenship",
                    "score": 1,
                    "threshold": 0.95
                },
                "gender": {
                    "value": "Gender from ID Card",
                    "score": 1,
                    "threshold": 0.95
                },
                "religion": {
                    "value": "Religion",
                    "score": 1,
                    "threshold": 0.95
                },
                "portraitImage": "Base64 encoded..."
                 }
        },
        "back": {
            "data": {
                "extendedIdNumber": {
                    "value": "xxxxxx-xx-xxxx-xx-xx",
                    "score": 0.988594,
                    "threshold": 0.95
                }
            }
        }
    }
}
</code></pre>

</details>

### Error - 5001 - Missing required fields in the request parameter

#### Case - Missing idFrontSideImage

<details>

<summary>Request Sample</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyKas",
        "idFrontSideImage":"" //Missing idFrontSide base 64 string
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>Response Sample</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": "idFrontSideImage must not be blank",
            "code": 5001,
            "fieldName": "payload.idFrontSideImage",
            "operations": [
                "idVerification"
            ]
        }
    ]
}
```

</details>

### Error - 5001 - Missing required fields in the request parameter

#### Case - Multiple mandatory field missing like groupId and idType

<details>

<summary>Request Sample</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"",  // Blank group id
        "country": "MYS",
        "idType": "",  // Blank id tpye
        "idSubtype": "MyKas",
        "idFrontSideImage":"Base 64 Image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>Response Sample</summary>

```json
{
    "transactionId": "unique transaction id generated to identify this transaction",
    "partnerTrxId": "partner transaction id submitted by customer in request",
    "errors": [
        {
            "message": "groupId must not be blank",
            "code": 5001,
            "fieldName": "payload.groupId",
            "operations": [
                "ocr",
                "idVerification"
            ]
        },
        {
            "message": "idType must not be blank",
            "code": 5001,
            "fieldName": "payload.idType",
            "operations": [
                "ocr",
                "idVerification"
            ]
        }
    ]
}
```

</details>

### Error - 5002 - Unable to decode string in request body

#### Case - Invalid Base64 String passed in the request

<details>

<summary>Request Sample</summary>

<pre class="language-json"><code class="lang-json"><strong>{
</strong>    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyKad",
        "idFrontSideImage": "" // Invalid Base64 String
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
</code></pre>

</details>

<details>

<summary>Response Sample</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": "Unable to decode the string (080006)",
            "code": 5002,
            "operations": [
                "ocr",
                "idVerification"
            ]
        }
    ]
}
```

</details>

### Error - 5003 -Invalid request parameter or Missing request parameter. <a href="#id-5003-validation-errors-examples" id="id-5003-validation-errors-examples"></a>

{% hint style="info" %}
**Note:** The above issue happens when the some validations fail on the request body sent. Some samples of the possible causes 5003 are given below. The message will differ for this error scenario according to the type of validation that fails.&#x20;
{% endhint %}

### Some samples of this validation failures are given below

#### Error - 5003 - Case - InValid JSON Payload sent

<details>

<summary>Request Sample</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyKad"    // Missing ',' creating incorrect Json.
        "idFrontSideImage": "base 64 string"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "Invalid request: Error occurred while parsing the request",
            "code": 5003
        }
    ]
}
```

</details>

#### Error - 5003 - Case - Invalid Id Type Sent

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "abc",  // invalid id type.
        "idSubtype": "MyKad",
        "idFrontSideImage": "base 64 string"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "Invalid idType provided. Valid values: DRIVING_LICENSE,VISA,PASSPORT,ID_CARD",
            "code": 5003,
            "fieldName": "payload.idType",
            "operations": [
                "ocr",
                "idVerification"
            ]
        }
    ]
}
```

</details>

#### Error - 5003 - Case - Invalid Id Subtype Sent

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",  
        "idSubtype": "hgj",// invalid id Subtype.
        "idFrontSideImage": "base 64 string"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "Invalid idSubtype",
            "code": 5003,
            "fieldName": "payload.idSubtype",
            "operations": [
                "ocr",
                "idVerification"
            ]
        }
    ]
}
```

</details>

#### Error - 5003 - Case - Invalid Country Codes Sent

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "hgf",//invalid country code
        "idType": "ID_CARD",  
        "idSubtype": "MyKad",
        "idFrontSideImage": "base 64 string"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "Invalid country. Supported values: DNK,CHE,GHA,CHL,CHN,MLI,SLE,KHM,IDN,VNM,SDN,BGD,AUS,AUT,LBY,LKA,HKG,MYS,NGA,CMR,TWN,POL,AZE,SYR,CAN,MMR,KEN,ARG,ROU,IND,MAR,YEM,MEX,AFG,IRL,IRN,QAT,SAU,BDI,NLD,JPN,IRQ,SVK,NPL,THA,BHR,PHL,GBR,ABW,DMA,TLS,ASM,URY,USA,ISL,ESP,EST,BEL,AGO,DZA,FIN,UGA,KOR,SOM,BRA,RUS,FRA,DEU,EGY,LVA,ITA,ETH,PAK,SGP,UKR,ZAF,BRN",
            "code": 5003,
            "fieldName": "payload.country",
            "operations": [
                "ocr",
                "idVerification"
            ]
        }
    ]
}
```

</details>

#### Error - 5003 - Case - Duplicate partner transaction Id's are not allowed

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{a4e615f3-1da1-4389-a457-b8be76a52dae",//duplicate partner Transid
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyKad",
        "idFrontSideImage": "base 64 String"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>Response</summary>

<pre class="language-json"><code class="lang-json"><strong>{
</strong>    "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": "Invalid request: Duplicate partnerTrxId",
            "code": 5003
        }
    ]
}
</code></pre>

</details>

#### Error - 5003 - Case - Invalid ip address in the user consent.

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyKad",
        "idFrontSideImage": "base 64 String"
    },
    "userConsent": {
        "userIp": "226.80.211232",//invalid ip address
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "userIp is invalid",
            "code": 5003,
            "fieldName": "userConsent.userIp"
        }
    ]
}
```

</details>

#### Error - 5003 - Case - Country code size  greater than 3.

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYSds",//country code size larger than 3 characters
        "idType": "ID_CARD",
        "idSubtype": "MyKad",
        "idFrontSideImage": "base 64 String"
    },
    "userConsent": {
        "userIp": "226.80.211232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "country size must be between 0 and 3",
            "code": 5003,
            "fieldName": "payload.country",
            "operations": [
                "ocr",
                "idVerification"
            ]
        }
    ]
}
```

</details>

#### Error - 5003 - Case - Partner transaction and groupId size must not be greater than 255.

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"550e8400-e29b-41d4-a716-446655440000-9f8a5b7c-3c6d-4e2f-b13a-2f9d8a6c1e77-a1b2c3d4-e5f6-7890-1234-56789abcdef0-01234567-89ab-cdef-0123-456789abcdef-abcdef12-3456-789a-bcde-f01234567890-12345678-90ab-cdef-1234-567890abcdef-abcdef01-2345-6789-abcd-ef0123456789",//UUID size larger than 255 characters
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyKad",
        "idFrontSideImage": "base 64 String"
    },
    "userConsent": {
        "userIp": "226.80.211232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "groupId size must be between 0 and 255",
            "code": 5003,
            "fieldName": "payload.groupId",
            "operations": [
                "ocr",
                "idVerification"
            ]
        }
    ]
}
```

</details>

### Error - 5005 -Internal Server Error

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyKad",
        "idFrontSideImage":"Base 64 string"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "Internal server error",
            "code": 5005,
            "operations": [
                "idVerification"
            ]
        }
    ],
    "imageQualityResult": {
        ... // truncated response
    }
}
```

</details>

### Error - 5005 - extraction\_failed

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyTentera",
        "idFrontSideImage":"Base 64 string of MyTentera card occluded any OCR field"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }

}
```

</details>

<details>

<summary>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": "extraction_failed",
            "code": 5005,
            "operations": [
                "ocr",
                "idVerification"
            ]
        }
    ]
}
```

</details>

### Error - 5006 - Unsupported Image Format Detected

<details>

<summary>Request</summary>

<pre class="language-json"><code class="lang-json"><strong>{
</strong>    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyKad",
        "idFrontSideImage": "Base 64 string" // .png image sent
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
</code></pre>

</details>

<details>

<summary>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": "Unsupported image format detected (120002)",
            "code": 5006,
            "operations": [
                "ocr",
                "idVerification"
            ]
        }
    ]
}
```

</details>

### Error - 5008 - Data Processing Error

<details>

<summary>Request</summary>

<pre class="language-json"><code class="lang-json"><strong>{
</strong>    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyKad",
        "idFrontSideImage": "Base 64 string" 
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
</code></pre>

</details>

<details>

<summary>Response</summary>

<pre class="language-json"><code class="lang-json"><strong>{
</strong>    "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": "Data Processing Error (082000)",
            "code": 5008,
            "operations": [
                "ocr",
                "idVerification"
            ]
        }
    ]
}
</code></pre>

</details>

### Error - 5009 - Wrong input format of the image given

<details>

<summary>Request</summary>

<pre class="language-json"><code class="lang-json"><strong>{
</strong>    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyKad",
        "idFrontSideImage": "Base 64 string"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
</code></pre>

</details>

<details>

<summary>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": "Wrong input format (080002)",
            "code": 5009,
            "operations": [
                "idVerification",
                "ocr"
            ]
        }
    ]
}
```

</details>

### Error - 5010 - Invalid Image Specification

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyKad",
        "idFrontSideImage": "Base 64 string of card with resolution 200*200"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "Invalid image specification (080004)",
            "code": 5010,
            "operations": [
                "ocr",
                "idVerification"
            ]
        }
    ]
}
```

</details>

### Error - 5016 - Invalid card detected, make sure the lighting and orientation is proper.

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyKad",
        "idFrontSideImage": "Base 64 string of card with bad lighting"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "Invalid card, Kindly ensure the image is well lit and is placed in the right angle",
            "code": 5016,
            "operations": [
                "idVerification",
                "ocr"
            ]
        }
    ]
}
```

</details>

### Error - 5020 - When the image sent doesn't contain a card

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyKad",
        "idFrontSideImage": "Profile photo of a person"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "No card detected (123002)",
            "code": 5020,
            "operations": [
                "ocr",
                "idVerification"
            ]
        }
    ]
}
```

</details>

### Error - 5022 - Internal Server Error Occurred

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyKad",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "Internal Server Error Occurred While Fetching The Details",
            "code": 5022,
            "operations": [
                "ocr"
            ]
        }
    ]
}
```

</details>

### Error - 5023 - IdNumber extraction failed.

{% hint style="info" %}
**Note:** Currently this error occurs for the malaysia cards only. This happens when the idnumber is not extracted properly causing the dob extraction to fail which is extracted from the idnumber in the malaysian id cards.
{% endhint %}

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyKad",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "Bad Quality Image , Id Number Extraction Failed",
            "code": 5023,
            "operations": [
                "ocr"
            ]
        }
    ]
}
```

</details>

### Error - 5024 - Forgery failed

{% hint style="info" %}
**Note:** This error code occurs when there is forgery failure for the malaysian cards or the KTP forgery failure.
{% endhint %}

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyKad",
        "idFrontSideImage": "Base 64 image of a forged card"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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"
            ]
        }
    ]
}
```

</details>

### Error - 5025 - The card failed the IdVerification

{% hint style="info" %}
**Note:** This error code occurs when there is a IdVerification failure in the **summary response api**.
{% endhint %}

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyKad",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>Response</summary>

```json
{
    "transactionId": "8476df53-3f82-44d0-b628-979f15bf8178",
    "partnerTrxId": "d384fb45-c862-47d0-bc6d-665588bacb83",
    "groupId": "aaaaaaaa",
    "errors": [
        {
            "message": "The card failed the idVerification",
            "code": 5025,
            "operations": [
                "idVerification"
            ]
        }
    ]
}
```

</details>

### Error - 5026 - Extraction failure for OCR fields.

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyKad",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>Response</summary>

```json
{
    "transactionId": "826c90fd-c03f-4bb5-8837-b3cb9eb5cdaf",
    "partnerTrxId": "7313e3fa-dde9-405c-9875-03c284d5b69f",
    "groupId": "aaaaaaaa",
    "errors": [
        {
            "message": "Extraction failed for the below ocr field. Please make sure the fields are properly visible on the card.",
            "code": 5026,
            "fieldName": "idNumber, name",
            "operations": [
                "ocr"
            ]
        }
    ]
}
```

</details>

### Error - 5027 - Id Numbers doesn't match

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyKad",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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 ID numbers on the front and back of your card do not match. Please upload both sides of the same card.",
            "code": 5027,
            "operations": [
                "ocr"
            ]
        }
    ]
}
```

</details>

### Error - 5028 - The card appears to be spoofed

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyKad",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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 spoofed.",
            "code": 5028,
            "operations": [
                "idVerification"
            ]
        }
    ]
}
```

</details>

### Error - 5029 - Critical Landmarks Fields Missing

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyKad",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>Response</summary>

```json
"errors": [{
        "code": 5029,
        "message": "Critical landmarks are not visible. Please make sure the landmarks are properly visible on the card.",
        "fieldName": "gol-darah",
        "operations": ["idVerification"]
    }],
```

</details>

### Error - 5030 - The card failed the material check

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyKad",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>Response</summary>

```json
"errors": [
    {
        "code": 5030,
        "message": "The card failed the material check.",
    }
],
```

</details>

### Error - 5201 - No portrait image present

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "IDN",
        "idType": "ID_CARD",
        "idSubtype": "KTP",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "No portrait is present on the card (123004)",
            "code": 5201,
            "operations": [
                "ocr",
                "idVerification"
            ]
        }
    ]
}
```

</details>

### Error - 5202 - Image is too blurry

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "IDN",
        "idType": "ID_CARD",
        "idSubtype": "KTP",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "Quality check failed. Image is too blurry. (123005)",
            "code": 5202,
            "operations": [
                "ocr",
                "idVerification"
            ]
        }
    ]
}
```

</details>

### Error - 5203 - Image is too dark

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "IDN",
        "idType": "ID_CARD",
        "idSubtype": "KTP",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "Quality check failed. Image is too dark. (123008)",
            "code": 5203,
            "operations": [
                "ocr",
                "idVerification"
            ]
        }
    ]
}
```

</details>

### Error - 5204 - Image is too bright

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "IDN",
        "idType": "ID_CARD",
        "idSubtype": "KTP",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "Quality check failed. Image is too bright. (123010)",
            "code": 5204,
            "operations": [
                "ocr",
                "idVerification"
            ]
        }
    ]
}
```

</details>

### Error - 5205 - Image of the card is too small

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "IDN",
        "idType": "ID_CARD",
        "idSubtype": "KTP",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "Quality check failed. Image of card is too small, try taking a closer image (123012)",
            "code": 5205,
            "operations": [
                "ocr",
                "idVerification"
            ]
        }
    ]
}
```

</details>

### Error - 5206 - Provinsi title is missing

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "IDN",
        "idType": "ID_CARD",
        "idSubtype": "KTP",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "No PROVINSI title is present, make sure all card’s edge is present within the image (123015)",
            "code": 5206,
            "operations": [
                "ocr",
                "idVerification"
            ]
        }
    ]
}
```

</details>

### Error - 5207 - Quality check failed, Card has glare

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "IDN",
        "idType": "ID_CARD",
        "idSubtype": "KTP",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "Quality check failed. Card has glare, try taking image in a different angle",
            "code": 5207,
            "operations": [
                "ocr",
                "idVerification"
            ]
        }
    ]
}
```

</details>

### Error - 5301 - Image resolution is very small

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "IDN",
        "idType": "ID_CARD",
        "idSubtype": "KTP",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "Card resolution is smaller than (400x300), the recommended image size is (800x600) (120004)",
            "code": 5301,
            "operations": [
                "ocr",
                "idVerification"
            ]
        }
    ]
}
```

</details>

### Error - 5302 - Image resolution is very big

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "IDN",
        "idType": "ID_CARD",
        "idSubtype": "KTP",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "Card resolution is larger than (4000x3000), the recommended image size is (800x600) (120003)",
            "code": 5302,
            "operations": [
                "ocr",
                "idVerification"
            ]
        }
    ]
}
```

</details>

### Error - 5321 - Card resolution for back side

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "IDN",
        "idType": "ID_CARD",
        "idSubtype": "KTP",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "Card resolution for back side is smaller than (275 x 176), the recommended image size is (800x600) (082009)",
            "code": 5321,
            "operations": [
                "ocr",
                "idVerification"
            ]
        }
    ]
}
```

</details>

### Error - 5322 - Card back side verification is not supported&#x20;

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "IDN",
        "idType": "ID_CARD",
        "idSubtype": "KTP",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "Card back side verification is not supported on V1 endpoint, please switch to V2.",
            "code": 5322,
            "operations": [
                "ocr",
                "idVerification"
            ]
        }
    ]
}
```

</details>

### Error - 5323 - Configuration set for Front Side Only

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "IDN",
        "idType": "ID_CARD",
        "idSubtype": "KTP",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "Configuration set for front only verification, please send only front side image or contact VIDA Support.",
            "code": 5323,
            "operations": [
                "ocr",
                "idVerification"
            ]
        }
    ]
}
```

</details>

### Error - 5324 - Missing required fields in the request parameter

#### Case - Missing idBackSideImage

<details>

<summary>Request </summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyKas",
        "idFrontSideImage":"Base 64 string for Front side", 
        "idBackSideImage":"" //Missing idBackSide base 64 string
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "Configuration set for both side verification, please send both front and back side image or contact VIDA Support.",
            "code": 5324,
            "operations": [
                "idVerification"
            ]
        }
    ]
}
```

</details>

### Error - 5324 - Missing required fields in the request parameter

#### Case - Missing Both side

<details>

<summary>Request </summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyKas",
        "idFrontSideImage":"", //Missing idFrontSide base 64 string
        "idBackSideImage":"" //Missing idBackSide base 64 string
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "Configuration set for both side verification, please send both front and back side image or contact VIDA Support.",
            "code": 5324,
            "operations": [
                "idVerification"
            ]
        }
    ]
}
```

</details>

### Error - 5303 - Image size is larger than 3 MB.

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "IDN",
        "idType": "ID_CARD",
        "idSubtype": "KTP",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "Image size is larger than max allowed 3MB (18409)",
            "code": 5303,
            "operations": [
                "ocr"
            ]
        }
    ],
    "imageQualityResult": {
        ... // truncated results
    },
    "idVerificationResult": {
        ... // truncated results
    }
}
```

</details>

### Error - 5401 - Unknown card orientation

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "IDN",
        "idType": "ID_CARD",
        "idSubtype": "KTP",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "orientation unknown, take image of card on a flat surface in upright position (123014)",
            "code": 5401,
            "operations": [
                "ocr",
                "idVerification"
            ]
        }
    ]
}
```

</details>

### Error - 5402 - Front Side and Back Side of the card have different card types

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "IDN",
        "idType": "ID_CARD",
        "idSubtype": "KTP",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "Front side and back side of the card have different card types, please send the same card type for verification. (083012)",
            "code": 5402,
            "operations": [
                "ocr",
                "idVerification"
            ]
        }
    ]
}
```

</details>

### Error - 5403 - The card type sent is not supported for backside verification

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "IDN",
        "idType": "ID_CARD",
        "idSubtype": "KTP",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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 type sent is not supported for backside verification. (083013)",
            "code": 5403,
            "operations": [
                "ocr",
                "idVerification"
            ]
        }
    ]
}
```

</details>

### Error - 5101 - No card detected.

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyKad",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "No card detected (023004)",
            "code": 5101,
            "operations": [
                "ocr"
            ]
        }
    ],
    "imageQualityResult": {
        ... //truncated response
    },
    "idVerificationResult": {
        ... //truncated response
    }
}
```

</details>

### Error - 5102 - Error processing input/output

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "MYS",
        "idType": "ID_CARD",
        "idSubtype": "MyKad",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "Error processing input/output (023001)",
            "code": 5102,
            "operations": [
                "ocr"
            ]
        }
    ],
    "imageQualityResult": {
        ... //truncated response
    },
    "idVerificationResult": {
        ... //truncated response
    }
}
```

</details>

### Error - 5103 - Bad Quality Image, Portrait Extraction Failed

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "IDN",
        "idType": "ID_CARD",
        "idSubtype": "KTP",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": "Bad Quality Image , Portrait Extraction Failed",
            "code": 5103,
            "operations": [
                "ocr"
            ]
        }
    ],
    "imageQualityResult": {
        "blurriness": {
            "score": 0.000071,
            "threshold": 0.95
        },
        ...... [TRUNCATED]
    },
    "idVerificationResult": {
        "spoofingResult": {
            "message": "Success",
            "code": 5000,
            "recapScore": {
                "score": 0.10072,
                "threshold": 0.95
            },
            ...... [TRUNCATED]
        },
        "landmarkResult": {
            "code": 5000,
            "message": "Success",
            "threshold": 0.95,
            "containerResult": [
                {
                    "position": {
                        "x": 339,
                        "y": 32,
                        "width": 132,
                        "height": 22
                    },
                    "name": "provinsi",
                    "score": 0.9914
                },
                ...... [TRUNCATED]
            ],
            "landmarkTags": [
                {
                    "name": "portrait_background_color",
                    "value": "red"
                }
            ],
            "landmarkVerification": [
                {
                    "name": "heuristic_check",
                    "status": "pass"
                }
            ]
        },
        "forgeryResult": {
            "code": 5000,
            "message": "Success",
            "summary": {
                "score": 0.000611,
                "threshold": 0.95
            }
        }
    },
    "ocrResult": {
        "data": {
            "idNumber": {
                "value": "123456789",
                "score": 0.989205,
                "threshold": 0.95
            },
            ...... [TRUNCATED]
            "validUntil": {
                "value": "SEUMUR HIDUP",
                "score": 0.978283,
                "threshold": 0.95
            }
            // NOTE: No portrait image in the response
        }
    }
}
```

</details>

### Error - 5104 - Minimum OCR fields

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "IDN",
        "idType": "ID_CARD",
        "idSubtype": "KTP",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>Response</summary>

```json
"errors": [
    {
      "message": "Minimum OCR fields did not meet the score threshold",
      "code": 5104,
      "operations": [
        "ocr"
      ]
    }
  ],
```

</details>

### Error - 5601 - Image Recaptured

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "IDN",
        "idType": "ID_CARD",
        "idSubtype": "KTP",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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 Recaptured",
            "code": 5601,
            "operations": [
                "idVerification"
            ]
        }
    ],
    "imageQualityResult": {
        "front": {
            "glare": {
                "score": 0,
                "threshold": 0.95
            },
            "blurriness": {
                "score": 0.000444,
                "threshold": 0.95
            },
            "lowLight": {
                "score": 0.065222,
                "threshold": 0.95
            }
        },
        "back": {
            "blurriness": {
                "score": 0.000132,
                "threshold": 0.95
            },
            "lowLight": {
                "score": 0,
                "threshold": 0.95
            }
        }
    },
    "ocrResult": {
        "front": {
            "data": {
                "idNumber": {
                    "value": "ID Number from ID Card",
                    "score": 0.997671,
                    "threshold": 0.95
                },
                "name": {
                    "value": "Name",
                    "score": 0.999914,
                    "threshold": 0.95
                },
                ------TRUNCATED------
                "portraitImage": "Base64 encoded image.."
            }
        },
        "back": {
            "data": {
                "extendedIdNumber": {
                    "value": "xxxxxx-xx-xxxx-xx-xx",
                    "score": 0.985544,
                    "threshold": 0.95
                }
            }
        }
    }
}
```

</details>

### Error - 5602 - Image B\&W or Photocopy

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "IDN",
        "idType": "ID_CARD",
        "idSubtype": "KTP",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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 either B&W or Photocopy",
            "code": 5602,
            "operations": [
                "idVerification"
            ]
        }
    ],
    "imageQualityResult": {
        "front": {
            "blurriness": {
                "score": 0.000002,
                "threshold": 0.95
            },
            "lowLight": {
                "score": 0.009899,
                "threshold": 0.95
            }
        }
    },
    "ocrResult": {
        "front": {
            "data": {
                "idNumber": {
                    "value": "ID Number from ID Card",
                    "score": 0.9757,
                    "threshold": 0.95
                },
                "name": {
                    "value": "Name",
                    "score": 0.98693,
                    "threshold": 0.95
                },
                -----TRUNCATED-----               
                "portraitImage": "Base64 encoded....."
            }
        }
    }
}
```

</details>

### Error - 5603 - Image Color Reprint

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "IDN",
        "idType": "ID_CARD",
        "idSubtype": "KTP",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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": [
                "ocr"
            ]
        }
    ],
    "imageQualityResult": {
        "front": {
            "glare": {
                "score": 0,
                "threshold": 0.95
            },
            "blurriness": {
                "score": 0.013282,
                "threshold": 0.95
            },
            "lowLight": {
                "score": 0.012254,
                "threshold": 0.95
            }
        }
    },
    "ocrResult": {
        "front": {
            "data": {
                "idNumber": {
                    "value": "ID NUMBER",
                    "score": 0.974472,
                    "threshold": 0.95
                },
                "name": {
                    "value": "NAME",
                    "score": 0.999658,
                    "threshold": 0.95
                },
                "address": {
                    "value": "ADDRESS",
                    "score": 0.998371,
                    "threshold": 0.95
                },
                "dob": {
                    "value": "YYYYMMDD",
                    "score": 0.974472,
                    "threshold": 0.95
                },
                "citizenship": {
                    "value": "CITIZENSHIP",
                    "score": 1,
                    "threshold": 0.95
                },
                "gender": {
                    "value": "Gender from ID Card (M/F/O)",
                    "score": 1,
                    "threshold": 0.95
                },
                "portraitImage": "Base64...",
        }
    }
}
```

</details>

### Error - 5604 - Image Screenshot

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "IDN",
        "idType": "ID_CARD",
        "idSubtype": "KTP",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>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 screenshot",
            "code": 5604,
            "operations": [
                "idVerification"
            ]
        }
    ],
    "imageQualityResult": {
        "front": {
            "blurriness": {
                "score": 0,
                "threshold": 0.95
            },
            "lowLight": {
                "score": 0.252711,
                "threshold": 0.95
            },
            "overExposure": {
                "score": 0.8494,
                "threshold": 0.95
            },
            "cardDimension": {
                "card_coordinates": {
                    "x1": 25,
                    "x2": 602,
                    "y1": 59,
                    "y2": 422
                },
                "card_width": 577,
                "card_height": 363
            }
        }
    }
}
```

</details>

### Error - 5611 - Minimum landmark checks

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "IDN",
        "idType": "ID_CARD",
        "idSubtype": "KTP",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>Response</summary>

```json
"errors": [
    {
      "message": "Minimum landmark checks did not meet the score threshold",
      "code": 5611,
      "operations": [
        "idVerification"
      ]
    }
  ],
```

</details>

### Error - 5612 - Card Edges Not Fully Visible

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "IDN",
        "idType": "ID_CARD",
        "idSubtype": "KTP",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>Response</summary>

```json
"errors": [
    {
      "message": "Card edges are not fully visible. Please re-capture the card with all four edges within the frame.",
      "code": 5612,
      "operations": [
        "idVerification"
      ]
    }
  ],
```

</details>

### Error - 5613 - Landmark Positions are not correct

<details>

<summary>Request</summary>

```json
{
    "operations": ["ocr","idVerification"],
    "payload": {
        "partnerTrxId": "{{$guid}}",
        "groupId":"{{$guid}}",
        "country": "IDN",
        "idType": "ID_CARD",
        "idSubtype": "KTP",
        "idFrontSideImage": "Base 64 image"
    },
    "userConsent": {
        "userIp": "226.80.211.232",
        "country": "MYS",
        "obtained": true,
        "obtainedAt": "1680700959"
    }
}
```

</details>

<details>

<summary>Response</summary>

```json
"errors": [
    {
      "message": "Landmark positions are not in correct arrangement.",
      "code": 5613,
      "operations": [
        "idVerification"
      ]
    }
  ],
```

</details>
