Validate API: validate documents without sending

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.

Endpoint
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.

Smart document detection

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.

Validation result

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:

FlagMeaningsuccessValidation rule passed successfullywarningPoint of attention, but not a blocking errorerrorValidation error, document will not be accepted

The validation checks both the XSD schema (structure) and business rules (content rules such as required fields and value ranges).

Dual validation

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.

Custom validation rules (optionId)

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
Language settings

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).

When to use?

The Validate API is particularly useful in the following scenarios:

  • During development: test your documents before calling the send endpoint
  • Pre-flight check: validate documents in your own application before they are sent to the PSB, so you can give your users direct feedback
  • Batch validation: check a large set of documents for errors before sending them

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