Errors
Error codes
Use the HTTP status and code field to distinguish error types and decide on retry vs. fix.
Last updated: April 2026
Error response shape
JSON
{
"success": false,
"error": {
"code": "INVALID_DOCUMENT_TYPE",
"message": "Unsupported document type: 'receipt'. Use invoice, grn, bank_statement, aadhar_card, or pan_card.",
"status": 400
}
}Always check
error.code — not only the HTTP status — for precise error handling.Error reference
| HTTP | code | Meaning | Remediation |
|---|---|---|---|
| 400 | INVALID_DOCUMENT_TYPE | document.type query param is missing or unsupported | Use one of: invoice, grn, bank_statement, aadhar_card, pan_card |
| 400 | MISSING_FILE | No file or URL body in the request | Include file as multipart field or url in JSON body |
| 401 | UNAUTHORIZED | Authorization header missing or token invalid | Check Bearer token; refresh or replace API key |
| 403 | FORBIDDEN | Token valid but insufficient scope for this action | Contact support to verify key permissions |
| 404 | JOB_NOT_FOUND | jobId not visible in your account scope | Verify jobId was returned from an upload with the same API key |
| 413 | FILE_TOO_LARGE | File exceeds the 50 MB size limit | Compress or split the file; use /upload for multi-invoice PDFs |
| 429 | RATE_LIMITED | Request rate exceeded | Back off and retry — see Rate Limits page |
| 500 | INTERNAL_ERROR | Unexpected server error | Retry with exponential backoff; if persistent, contact support |
Retry decision tree
4xx (client errors)
Do not auto-retry. Fix the request — bad params, missing auth, wrong jobId. Retrying will produce the same error.
429 (rate limited)
Retry with exponential backoff. See the Rate Limits page for backoff code examples.
5xx (server errors)
Safe to retry with backoff. If errors persist beyond 3 retries, surface to the user and contact support.