Validate E-Invoice XML
validate_einvoice_xmlValidate e-invoice XML documents against schema and business rules to catch errors before dispatch. Returns validation results with error details.
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.
NOTE: Stub response — real CF endpoint https://api.frihet.io/v1/einvoice/validate wired in transport Wave. / 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 |