Document & Format Validator
Check your electronic documents before sending them.
B2Brouter provides two ways to validate an electronic document: an online tool for manual checks, and an API endpoint for programmatic validation. Both apply the same validation rules.
Online validator
Section titled “Online validator”The online validator is a free web tool for checking documents manually, without writing any code.
Access it at app.b2brouter.net/en/validation.
How to use it
Section titled “How to use it”- Go to app.b2brouter.net/en/validation.
- Upload your XML file.
- Click Validate.
The tool returns a list of errors and warnings, each with the XPath location of the problematic element and a description of the rule that failed.
API endpoint
Section titled “API endpoint”The /documents/validate endpoint lets you validate documents programmatically. Use it to integrate validation into your application, CI pipeline, or automated workflow.
See the full API reference at developer.b2brouter.net/reference/validate-document.
Authentication is required. The endpoint accepts a document file and returns structured validation results.
What gets validated
Section titled “What gets validated”Both the online tool and the API endpoint check:
- Schema compliance — whether the XML structure matches the format specification (e.g. UBL 2.1, CII D16B).
- Business rules — whether mandatory fields are present and values are within allowed ranges.
- Schematron rules — format-specific validation rules defined by the standard (e.g. Peppol BIS rules, EN 16931).
- Model DB — field-level checks against our database in relation to what the tax authority requires.
- Tax report — for invoices that generate a tax report, validation of the invoice values needed to produce a valid tax report.
Neither tool checks whether the receiver exists or whether the routing information is correct — that happens at sending time.
Validation when creating a document via API
Section titled “Validation when creating a document via API”The same validation runs automatically when you submit a document through the API (e.g. POST /documents). If the document does not pass, the API returns a validation error and the document is rejected before it enters the system.
This means you do not need to call /documents/validate separately before every submission — but it is useful for debugging and pre-flight checks during development.
Reading the results
Section titled “Reading the results”| Result | Meaning |
|---|---|
| Valid | The document passes all schema and business rules for the selected format. |
| Warning | The document is technically valid but contains values that may cause issues with some receivers. |
| Error | The document does not conform to the format. It will be rejected if submitted. |
Fix all errors before using the document in a real integration. Warnings are informational but should be reviewed.
Supported formats
Section titled “Supported formats”Both the online tool and the API support the main formats accepted by B2Brouter, including:
- Peppol BIS Billing 3.0 (UBL)
- EN 16931 (European standard)
- Factura-e (Spain)
- FatturaPA (Italy)
- UBL 2.1 Invoice / Credit Note
The full list of available formats is shown in the format selector on the validation page.
Common use cases
Section titled “Common use cases”- Before going live — validate sample documents from your ERP or billing system to catch integration issues early.
- Debugging API errors — if the API returns a format validation error, use the online tool to get a detailed breakdown.
- Testing new formats — when adding support for a new country or format, validate your output before running end-to-end tests.
- Automated pre-flight checks — call
/documents/validatefrom your CI pipeline or integration layer before submitting documents to production.