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

HTTPcodeMeaningRemediation
400INVALID_DOCUMENT_TYPEdocument.type query param is missing or unsupportedUse one of: invoice, grn, bank_statement, aadhar_card, pan_card
400MISSING_FILENo file or URL body in the requestInclude file as multipart field or url in JSON body
401UNAUTHORIZEDAuthorization header missing or token invalidCheck Bearer token; refresh or replace API key
403FORBIDDENToken valid but insufficient scope for this actionContact support to verify key permissions
404JOB_NOT_FOUNDjobId not visible in your account scopeVerify jobId was returned from an upload with the same API key
413FILE_TOO_LARGEFile exceeds the 50 MB size limitCompress or split the file; use /upload for multi-invoice PDFs
429RATE_LIMITEDRequest rate exceededBack off and retry — see Rate Limits page
500INTERNAL_ERRORUnexpected server errorRetry 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.