validate_invoice_be
Validate UBL 2.1 XML invoices against Belgian business rules for Peppol BIS 3, PINT-EU, or Mercurius profiles. Checks EN16931 base rules and overlay rules, returning structured per-rule errors and warnings to ensure compliance.
Instructions
Validate a UBL 2.1 XML invoice against Belgian business rules.
For 'peppol-bis-3'/'pint-eu': checks the CEN EN16931 base rules (structural + arithmetic/totals, ~50 BR-* rules) via a compiled Schematron. Does NOT check the Peppol-specific overlay (profile ID registration, EndpointID scheme, narrowed code lists) — the result's metadata.scope is "en16931-base-only", and a warning is included. This is not a full Peppol BIS3 conformance check; a document that passes may still be rejected by a real Peppol Access Point. See context-library/decisions/peppol-schematron-artifact.md for why. For 'mercurius': applies the Mercurius-specific overlay rules only (endpoint scheme, PO reference) — also not full EN16931/Peppol base compliance. Returns a structured result with per-rule error and warning messages.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml | Yes | Raw UBL 2.1 XML invoice content | |
| profile | No | Validation profile: 'peppol-bis-3' (default), 'pint-eu', or 'mercurius' | peppol-bis-3 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||