Complyance Logo

Error Codes Reference

Platform Error Codes

CodeMeaningAction
AUTH_INVALID_API_KEYAPI key is invalid or doesn't match the environmentCheck your key and that env matches
AUTHORIZATION_ERRORYou are not authorised to perform this actionVerify your key has the right permissions
VALIDATION_ERROROne or more request fields failed validationCheck the errors array for details
REQ_INVALID_INPUTA specific field has an invalid or missing valueCheck the path in the error object
LOGICAL_TYPE_UNSUPPORTEDlogicalDocumentType is not valid for the countryUse a supported document type for your country
COUNTRY_RULE_NOT_SUPPORTEDThe country is not supported for the requested operationVerify the country code is in the supported list
VALIDATION_FAILEDInvoice payload failed country-specific rulesReview your invoice data against country requirements
SUBMISSION_FAILEDInvoice was valid but the government submission failedRetry or contact support with the requestId
BULK_ABORTEDBulk request was stopped due to an error (continueOnError: false)Fix the failing invoice and resubmit
DOCUMENT_NOT_FOUNDDocument lookup failed for given documentId and authenticated clientVerify documentId belongs to your workspace/client
NOT_FOUNDThe requested document was not foundVerify the uuid and documentId are correct
INTERNAL_ERRORUnexpected server errorRetry with exponential backoff; contact support if it persists

Validation Engine Codes (Invoice-Level, Country-Specific)

In addition to the generic platform codes above, Unify can return country validation-engine codes in:

  • data.results[].errors[]
  • data.results[].validation.errors[]
  • errors[] (for top-level validation failures)

These are actual invoice/business-rule codes from documents-service validators.

Code ExampleCategoryMeaning (Typical)
SYS.VALIDATOR_FAILUREValidation systemValidator failed unexpectedly
GETS-GEN-001GETS generalSchema validation failed
GETS-HEAD-010GETS headerDuplicate document number
AE-MANDATORY-001UAE mandatoryMissing invoice number
KSA-DOC-001KSA documentKSA duplicate document number
MY-DOC-001Malaysia documentMalaysia duplicate document number
MY-TOTAL-001Malaysia totalsInvoice total mismatch
AE-CALC-001UAE calculationInvalid total calculation
DE-PAYMENT-002Germany paymentInvalid IBAN
BE-PAYMENT-002Belgium paymentInvalid IBAN

Understanding Error Responses

Error Response Structure

{
  "status":    "error",
  "code":      "VALIDATION_ERROR",
  "message":   "Request validation failed",
  "requestId": "01J...",
  "timestamp": "2026-02-26T10:00:00.000Z",
  "data":      null,
  "errors": [
    {
      "code":    "REQ_INVALID_INPUT",
      "message": "documentId is required for list action",
      "path":    ["filters", "documentId"]
    }
  ]
}

Troubleshooting Steps

  1. Check the code — Tells you the error category
  2. Read the message — Explains what went wrong
  3. Check the path — Points to the problematic field in your request
  4. Review requestId — Provide this when contacting support

Common Scenarios

API Key Issues

  • Error: AUTH_INVALID_API_KEY
  • Fix: Verify your API key is correct and matches the environment (sandbox vs production)

Missing Required Fields

  • Error: REQ_INVALID_INPUT with path pointing to a required field
  • Fix: Add the missing field to your request

Unsupported Country

  • Error: COUNTRY_RULE_NOT_SUPPORTED
  • Fix: Use a supported country code: SA, MY, BE, AE, SG, DE

Validation Failed

  • Error: VALIDATION_FAILED with country-specific error code in results[].validation.errors[]
  • Fix: Review your invoice data against country-specific requirements

Bulk Request with continueOnError: false

  • Error: BULK_ABORTED when one invoice fails
  • Fix: Set "continueOnError": true to process remaining invoices, or fix the failing invoice and resubmit

Source of Truth in Codebase

For the complete list of error codes and their definitions, see:

  • services/documents_service/src/validation/constants/error-codes.ts
  • services/documents_service/src/services/validation/validation.service.ts

SDK Error Codes

The SDK and Direct API share the same error codes. When you use the SDK, error responses from pushToUnify will contain the same errorCode values documented here. See the SDK Guides for language-specific error handling patterns.

Notes

  • Exact code depends on country, validator, and failing field/business rule.
  • Treat code format prefixes (GETS-, MY-, AE-, DE-, BE-, KSA-, SYS.) as stable classification.
  • Use message + path together with code for actionable UI messages.