> 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-v1/http-status-and-error-codes.md).

# HTTP Status and Error Codes

The APIs utilize HTTPS response codes to indicate the outcome of an API request, signaling either success or failure. In addition to these standard codes, VIDA also provides internal custom codes that are specifically designed to identify and categorize any encountered errors.

## Error Codes

The below tables offers a clear overview of the various error codes, their corresponding HTTP status codes, and the associated error messages. This can be particularly useful for developers for debugging and error handling.

**Note:** For detailed examples of different scenarios please refer to the below pages:

OCR+IDV : [All Error Scenarios related to OCR+IDV](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md)

Also each error code mentioned in the table is already linked to the appropriate example in the page above.

### Generic Code for MyKad, NonMyKad, Passport and KTP cards

**Note:** The messages mentioned in the below table's may vary depending on validation checks, flow errors, and other conditions. This message is intended to provide a general idea of what the error code represents. Sample messages can be found on the referenced page above. **Please do not use the error messages for the processing of the requests instead rely on the error codes.**

| Error Code                                                                                                                                                                                                                                                        | HTTP Status Code | Message                                                                                             |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | --------------------------------------------------------------------------------------------------- |
| [5000](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md)                                                                                   | 200              | Success                                                                                             |
| [5001](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5001-missing-required-fields-in-the-request-parameter)                       | 400              | Missing required field                                                                              |
| [5002](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5002-unable-to-decode-string-in-request-body)                                | 400              | Unable to decode string.                                                                            |
| [5003](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#id-5003-validation-errors-examples)                                                | 400              | Invalid request parameter or Missing request parameter.                                             |
| [5005](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5005-internal-server-error)                                                  | 500              | Internal server error                                                                               |
| [5006](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5006-unsupported-image-format-detected)                                      | 400              | Unsupported image format detected.                                                                  |
| 5007                                                                                                                                                                                                                                                              | 400              | Score is below threshold                                                                            |
| [5008](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5008-data-processing-error)                                                  | 500              | Data processing error.                                                                              |
| [5009](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5009-wrong-input-format-of-the-image-given)                                  | 400              | Wrong input format                                                                                  |
| [5010](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5010-invalid-image-specification)                                            | 400              | Invalid Image Specification                                                                         |
| [5012](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5012-score-is-above-threshold)                                               | 400              | Score is above threshold                                                                            |
| [5014](/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#error-5104-minimum-ocr-fields)                                                 | 400              | Image Quality is too low, Kindly ensure the image is well lit and is placed in the right angle      |
| [5016](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5016-invalid-card-detected-make-sure-the-lighting-and-orientation-is-proper) | 400              | Invalid card, Kindly ensure the image is well lit and is placed in the right angle                  |
| [5020](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5020-when-the-image-sent-doesnt-contain-a-card)                              | 400              | No card detected                                                                                    |
| [5022](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5022-internal-server-error-occurred)                                         | 500              | Internal server error while fetching the details.                                                   |
| [5024](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5024-forgery-failed)                                                         | 400              | The given card is forged                                                                            |
| [5029](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5029-critical-landmarks-fields-missing)                                      | 400              | Critical landmarks are not visible. Please make sure the landmarks are properly visible on the card |

### Generic Code for KTP cards

| Error Code                                                                                                                                                                                                                    | Http Status Code | Message                                                                              |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | ------------------------------------------------------------------------------------ |
| [5201](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5201-no-portrait-image-present)          | 400              | No portrait is present on the card                                                   |
| [5202](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5202-image-is-too-blurry)                | 400              | Image Quality check failed as image is too blurry                                    |
| [5203](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5203-image-is-too-dark)                  | 400              | Image of the card is too dark                                                        |
| [5204](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5204-image-is-too-bright)                | 400              | Image of the card is too bright                                                      |
| [5205](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5205-image-of-the-card-is-too-small)     | 400              | Image of card is too small, try taking a closer image                                |
| [5206](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5206-provinsi-title-is-missing)          | 400              | No PROVINSI title is present, make sure all card’s edge is present within the image  |
| [5301](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5301-image-resolution-is-very-small)     | 400              | Card resolution is smaller than (400x300), the recommended image size is (800x600))  |
| [5302](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5302-image-resolution-is-very-big)       | 400              | Card resolution is larger than (4000x3000), the recommended image size is (800x600)) |
| [5303](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5303-image-size-is-larger-than-3-mb)     | 400              | Image size is larger than max allowed 3MB                                            |
| [5322](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5322-send-backside-image-in-v1)          | 400              | Card back side verification is not supported on V1 endpoint, please switch to V2.    |
| [5401](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5401-unknown-card-orientation)           | 400              | Orientation unknown, take image of card on a flat surface in upright position        |
| [5613](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5613-landmark-positions-are-not-correct) | 400              | Landmark positions are not in correct arrangement                                    |

### Specific Code for Non-Malaysian & NonKTP cards

| Error Code                                                                                                                                                                                                   | HTTP Status Code | Message            |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------- | ------------------ |
| [5005](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5005-extraction_failed) | 500              | extraction\_failed |

### **Error codes for document verification via Summary endpoint**

| Error Code                                                                                                                                                                                                                    | Http Status Code | Message                                                                                                    |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------- |
| [5025](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5025-the-card-failed-the-idverification) | 400              | "The card failed the idVerification"                                                                       |
| [5026](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5026-extraction-failure-for-ocr-fields)  | 400              | "Extraction failed for the below ocr field. Please make sure the fields are properly visible on the card." |

### **Generic OCR Codes for Malaysian card and KTP cards**

| Error Code                                                                                                                                                                                                               | Http Status Code | Message                                           |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------- | ------------------------------------------------- |
| [5023](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5023-idnumber-extraction-failed)    | 400              | "Bad Quality Image , Id Number Extraction Failed" |
| [5101](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5101-no-card-detected)              | 400              | "No card detected"                                |
| [5102](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5102-error-processing-input-output) | 500              | "Error processing input/output"                   |

### **Specific OCR Codes for KTP cards**

| Error Code                                                                                                                                                                                                                              | Http Status Code | Message                                        |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | ---------------------------------------------- |
| [5103](/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/http-status-and-error-codes/all-error-scenarios-related-to-ocr+idv.md#error-5103-bad-quality-image-portrait-extraction-failed) | 400              | Bad Quality Image,  Portrait Extraction Failed |

## Warning Codes

### **Image Quality Check for MyKad Cards**

For the V1 endpoint, the following warning codes will be returned. These warnings will be accompanied by additional error codes which will result in transaction failure.

| Warning Code | HTTP status code | Message                                                                                |
| ------------ | ---------------- | -------------------------------------------------------------------------------------- |
| 10024        | 400              | Image submitted is blurred                                                             |
| 10025        | 400              | Image submitted has glare                                                              |
| 10026        | 400              | Image submitted is too dark to process                                                 |
| 10027        | 400              | Input card image is too small in resolution to process. min resolution : \[275 \* 176] |

### **OCR warning code for Malaysian cards and NonKTP cards**

| Warning Code | HTTP status code | Message                                                                                        |
| ------------ | ---------------- | ---------------------------------------------------------------------------------------------- |
| 10028        | 200              | Low confidence score for ocr, please check \[name] from ocrResult for more details             |
| 10029        | 200              | Low confidence score for ocr, please check \[address] from ocrResult for more details          |
| 10030        | 200              | Low confidence score for ocr, please check \[citizenship] from ocrResult for more details      |
| 10031        | 200              | Low confidence score for ocr, please check \[dob] from ocrResult for more details              |
| 10032        | 200              | Low confidence score for ocr, please check \[gender] from ocrResult for more details           |
| 10033        | 200              | Low confidence score for ocr, please check \[idNumber] from ocrResult for more details         |
| 10034        | 200              | Low confidence score for ocr, please check \[religion] from ocrResult for more details         |
| 10119        | 200              | Low confidence score for ocr, please check \[personalIdNumber] from ocrResult for more details |
| 10120        | 200              | Low confidence score for ocr, please check \[dateOfExpiry] from ocrResult for more details     |
| 10121        | 200              | Low confidence score for ocr, please check \[dateOfIssuance] from ocrResult for more details   |
| 10122        | 200              | Low confidence score for ocr, please check \[issuerName] from ocrResult for more details       |
| 10123        | 200              | Low confidence score for ocr, please check \[issuerCountry] from ocrResult for more details    |
| 10124        | 200              | Low confidence score for ocr, please check \[issuingAuthority] from ocrResult for more details |
| 10125        | 200              | Low confidence score for ocr, please check \[militaryId] from ocrResult for more details       |
| 10126        | 200              | Low confidence score for ocr, please check \[militaryRank] from ocrResult for more details     |
| 10127        | 200              | Low confidence score for ocr, please check \[militaryDivision] from ocrResult for more details |
| 10128        | 200              | Low confidence score for ocr, please check \[extendedIdNumber] from for more details           |
| 10129        | 200              | Low confidence score for ocr, please check \[countryOfOrigin] from for more details            |
| 10130        | 200              | Low confidence score for ocr, please check \[address1] from for more details                   |
| 10131        | 200              | Low confidence score for ocr, please check \[address2] from for more details                   |
| 10132        | 200              | Low confidence score for ocr, please check \[zipCode] from for more details                    |
| 10133        | 200              | Low confidence score for ocr, please check \[state] from for more details                      |

### **Spoof codes for Malaysian cards**

In the V1 endpoint, a single spoof detection returns HTTP 200 with a warning code, while multiple spoof detections result in HTTP 400.

| Warning Code | HTTP status code | Message                                     |
| ------------ | ---------------- | ------------------------------------------- |
| 10007        | 200              | Image submitted is either B\&W or Photocopy |
| 10008        | 200              | Image submitted is Recaptured               |
| 10207        | 200              | Image submitted is color reprint            |

### **Landmark codes for Malaysian cards**

| Warning Code | HTTP status code | Message                                                                                        |
| ------------ | ---------------- | ---------------------------------------------------------------------------------------------- |
| 10012        | 200              | Image has Occlusion \[kad\_pengenalan\_header], please check landmark details for more details |
| 10013        | 200              | Image has Occlusion \[card\_logo], please check landmark details for more details              |
| 10014        | 200              | Image has Occlusion \[hibiscus], please check landmark details for more details                |
| 10015        | 200              | Image has Occlusion \[microchip], please check landmark details for more details               |
| 10017        | 200              | Image has Occlusion \[msg\_logo], please check landmark details for more details               |
| 10018        | 200              | Image has Occlusion \[my\_flag], please check landmark details for more details                |
| 10020        | 200              | Image has Occlusion \[ghost], please check landmark details for more details                   |
| 10021        | 200              | Image has Occlusion \[portrait], please check landmark details for more details                |
| 10022        | 200              | Image has Occlusion \[name], please check landmark details for more details                    |
| 10023        | 200              | Image has Occlusion \[id\_number], please check landmark details for more details              |

### **Image Quality Check for KTP Card**

For the V1 endpoint, the following warning codes will be returned. These warnings will be accompanied by additional error codes which will result in transaction failure.

| Warning Code | HTTP status code | Message                                                                                      |
| ------------ | ---------------- | -------------------------------------------------------------------------------------------- |
| 10004        | 200              | "Image submitted is too bright to process"                                                   |
| 10005        | 200              | "Incorrect card supplied"                                                                    |
| 10006        | 200              | "Unknown Orientation"                                                                        |
| 10024        | 200              | "Image submitted is blurred"                                                                 |
| 10025        | 200              | "Image submitted has glare"                                                                  |
| 10026        | 200              | "Image submitted is too dark to process"                                                     |
| 10027        | 200              | "Submitted card image is too small in resolution to process. min resolution : \[275 \* 176]" |

### **OCR Codes for KTP cards**

| Warning Code | Http Status Code | Message                                                                                                      |
| ------------ | ---------------- | ------------------------------------------------------------------------------------------------------------ |
| 10028        | 200              | "Low confidence score for ocr, please check \[name] from ocrResult for more details"                         |
| 10029        | 200              | "Low confidence score for ocr, please check \[address] from ocrResult for more details"                      |
| 10031        | 200              | "Low confidence score for ocr, please check \[dob] from ocrResult for more details"                          |
| 10032        | 200              | "Low confidence score for ocr, please check \[gender] from ocrResult for more details"                       |
| 10033        | 200              | "Low confidence score for ocr, please check \[idNumber] from ocrResult for more details"                     |
| 10034        | 200              | "Low confidence score for ocr, please check \[religion] from ocrResult for more details"                     |
| 10108        | 200              | "Low confidence score for ocr, please check \[province] from ocrResult for more details"                     |
| 10109        | 200              | "Low confidence score for ocr, please check \[city] from ocrResult for more details"                         |
| 10110        | 200              | "Low confidence score for ocr, please check \[placeOfBirth] from ocrResult for more details"                 |
| 10111        | 200              | "Low confidence score for ocr, please check \[bloodType] from ocrResult for more details"                    |
| 10112        | 200              | "Low confidence score for ocr, please check \[neighborhoodAssociationGroup] from ocrResult for more details" |
| 10113        | 200              | "Low confidence score for ocr, please check \[village] from ocrResult for more details"                      |
| 10114        | 200              | "Low confidence score for ocr, please check \[subDistrict] from ocrResult for more details"                  |
| 10115        | 200              | "Low confidence score for ocr, please check \[maritalStatus] from ocrResult for more details"                |
| 10116        | 200              | "Low confidence score for ocr, please check \[occupation] from ocrResult for more details"                   |
| 10117        | 200              | "Low confidence score for ocr, please check \[nationality] from ocrResult for more details"                  |
| 10118        | 200              | "Low confidence score for ocr, please check \[validUntil] from ocrResult for more details"                   |

### **Spoof codes for KTP Card**

In the V1 endpoint, a single spoof detection returns HTTP 200 with a warning code, while multiple spoof detections result in HTTP 400.

| Warning Code | HTTP status code | Message                                       |
| ------------ | ---------------- | --------------------------------------------- |
| 10007        | 200              | "Image submitted is either B\&W or Photocopy" |
| 10008        | 200              | "Image submitted is Recaptured"               |
| 10207        | 200              | "Image submitted is color reprint"            |
| 10208        | 200              | "Image submitted is screenshot"               |

### **Landmark codes for KTP Card**

| Warning Code | HTTP status code | Message                                                                                       |
| ------------ | ---------------- | --------------------------------------------------------------------------------------------- |
| 10411        | 200              | "Image has Occlusion, please check \[provinsi] from landmarkResult for more details"          |
| 10412        | 200              | "Image has Occlusion, please check \[nik] from landmarkResult for more details"               |
| 10413        | 200              | "Image has Occlusion, please check \[nama] from landmarkResult for more details"              |
| 10414        | 200              | "Image has Occlusion, please check \[tampat-tgl-lahir] from landmarkResult for more details"  |
| 10415        | 200              | "Image has Occlusion, please check \[jenis-kelamin] from landmarkResult for more details"     |
| 10416        | 200              | "Image has Occlusion, please check \[alamat] from landmarkResult for more details"            |
| 10417        | 200              | "Image has Occlusion, please check \[rt-rw] from landmarkResult for more details"             |
| 10418        | 200              | "Image has Occlusion, please check \[kel-desa] from landmarkResult for more details"          |
| 10419        | 200              | "Image has Occlusion, please check \[kecamatan] from landmarkResult for more details"         |
| 10420        | 200              | "Image has Occlusion, please check \[agama] from landmarkResult for more details"             |
| 10421        | 200              | "Image has Occlusion, please check \[status-perkawinan] from landmarkResult for more details" |
| 10422        | 200              | "Image has Occlusion, please check \[pekerjaan] from landmarkResult for more details"         |
| 10423        | 200              | "Image has Occlusion, please check \[kewarganegaraan] from landmarkResult for more details"   |
| 10424        | 200              | "Image has Occlusion, please check \[berlaku-hingga] from landmarkResult for more details"    |
| 10425        | 200              | "Image has Occlusion, please check \[gol-darah] from landmarkResult for more details"         |
| 10435        | 200              | Image has Occlusion, please check \[signature] from landmark Result for more details          |
| 10436        | 200              | Landmark positions are not in correct arrangement                                             |
