Error Codes
HTTP status codes and VLens-specific error codes for debugging and error handling
Every Vlens response uses the same envelope. Errors are signalled by the error_code field — not the HTTP status. A 200 OK response with error_code set is still an error.
Handling errors
Always check error_code before treating a response as successful:
JavaScript
Python
HTTP Error Codes
VLens Error Codes
Document Validation (3xxx)
Bundle & Quota (4xxx)
General & Document Errors (5xxx)
Identity & Contract Errors (6xxx)
Card & OCR Service Errors (7xxx)
Retry strategy
Helpful Tips
API Debugging: Use the error messages to pinpoint and resolve issues quickly. Check both the HTTP status code and the error_code in the response body — the error_code is always the authoritative signal.
Image & Document Uploads: Ensure documents are clear, well-lit, and compress each image to under 500 KB before uploading for best performance. The hard API limits are 3 MB and 25 MP per image.
Subscription Management: Regularly monitor your bundle and subscription status to avoid interruptions in service (see error codes 4002–4007).
Validation errors
When request fields fail validation, the response may include structured field-level details in error_descriptions:
Iterate error_descriptions to surface field-level errors in your UI.
Getting help
If you encounter an error not listed here, contact support@vlenseg.com with:
- The endpoint URL and method
- The full request body (redact images and PII)
- The full response body including
error_codeanderror_message - Your tenant name and approximate UTC timestamp

