Validate E-Invoice XML
validate_einvoice_xmlValidate e-invoice XML documents against format-specific schema and Schematron rules, returning detailed errors with severity and location. Catch invoice errors before dispatch to avoid network transmission costs.
Instructions
Validate an e-invoice XML document against the specified format's schema and schematron rules. Returns a list of errors with severity, XPath location, message, and rule ID. Runs KOSIT validator (XRechnung), Mustang (EN16931), XSD, or Schematron depending on format.
Use before dispatch to catch errors early without incurring network transmission costs. A valid=true response means the document passes all schema + business rule checks.
If the validation backend is not deployed for this workspace, returns an honest 'unavailable' response — never a fabricated valid=true. / Valida un documento XML de factura electronica contra el esquema y reglas schematron del formato especificado.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml | Yes | Raw XML string of the e-invoice document to validate / Contenido XML de la factura electronica | |
| format | Yes | Format to validate against. Determines which validator and ruleset to apply. / Formato a validar. Determina el validador y conjunto de reglas a aplicar. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| valid | Yes | Whether the XML passes all validation rules | |
| errors | Yes | List of validation findings (empty if valid) | |
| validator | Yes | Validation engine used | |
| durationMs | Yes | Validation duration in milliseconds |