Validate XML documents without storing them: smart detection, multilingual assertions and custom rules.
The Validate API lets you validate an XML document without storing or sending it through the PSB. This makes it ideal as a pre-flight check before you actually send a document, or for testing documents while developing your integration.
POST /api/v1/generic/validate
Send the XML document as the request body with content type application/xml. The PSB analyses the document and returns a validation result.
The Validate API automatically recognises which document format you have submitted based on the XML content. You don't need to specify whether it is an NLCIUS invoice, a Peppol BIS Billing V3 invoice, a UBL Order or any other format. The API detects this itself and applies the correct validation rules.
This works for all document types the PSB supports: invoices, credit notes, orders, order responses and more.
The response contains an isValid boolean and a list of assertions:
{
"isValid": false,
"assertions": [
{
"artifact": "schema",
"flag": "error",
"text": "Element 'cbc:InvoiceTypeCode' is missing."
},
{
"artifact": "business-rules",
"flag": "warning",
"text": "BR-NL-10: TaxTotal should contain at least one TaxSubtotal."
}
]
}
Each assertion has a flag with one of the following values:
successwarningerrorThe validation checks both the XSD schema (structure) and business rules (content rules such as required fields and value ranges).
The PSB validates by default against the most recent version of the validation artefacts. If the document is not valid against the latest version but is valid against the previous version that is still accepted on the network, both results are returned. This way you know whether your document can still be sent now and whether you need to upgrade for future compatibility.
For specific validation needs you can include an optionId as a query parameter:
POST /api/v1/generic/validate?optionId=your-option-id
This activates a predefined set of validation rules, for example customer-specific requirements or industry standards. You can retrieve the available options via:
GET /api/v1/generic/validate/options
By default the assertions are in English. If you want to receive the validation messages in Dutch, include the X-EConnect-Language header:
X-EConnect-Language: nl
Supported languages include nl (Dutch) and en (English).
The Validate API is particularly useful in the following scenarios:
Note: The Validate API does not store the document in the PSB. The document is validated and the result is returned directly. No webhooks are triggered and no charges are incurred.
Check the full API specification at psb.econnect.eu for all parameters and example payloads.
Validate a document