Guide · Updated May 2026
Markdown exportProgrammatic Handling of E-Invoice Schema Errors
Parse validation error arrays, resolve structural XML issues, handle UBL/CII namespace mismatches, and automate corrections programmatically.
Parsing the validation payload
When an invoice fails schema validation, the API returns a structured JSON payload containing a detailed list of errors instead of a converted XML file. Programmatic handling allows your system to automatically fix simple issues or route complex errors to human reviewers.
The error response contains a VALIDATION_FAILED status code along with an array of error objects. Each object provides a specific path to the failing field, the value that caused the error, and a human-readable description of the compliance rule that was violated (e.g., BR-CO-13).
Automating common resolutions
Use these points as the practical checks for this section.
- For missing BuyerReference, query your customer database for the default Leitweg-ID and retry.
- For rounding mismatches (e.g. PayableAmount differences), review the source document and correct the underlying line amounts or VAT figures; only accept values that match the invoice.
- For a missing unit code, Invoice Converter defaults the line to C62 and flags it for review; confirm the flagged unit matches the source invoice before accepting.
Retry vs. manual escalation
Use these points as the practical checks for this section.
- Automated Retry: Safe for temporary connection errors, rate limits, or quick schema fixes.
- Manual Review: Required when totals are significantly different, bank details are missing, or tax categories are ambiguous.