# Validate v1-beta

The validator can be used to validate XML documents against specifications and customer specific or additional rules without storing the document in the PSB. The validator can be used on the econnect.eu website (opens new window) or within the PSB Control.

First, the validator checks against the most recent validation artifacts. If the most recent validation artifacts are not valid but the previous validation artifact is still accepted in the networks, the file will also be validated against the previous artifact.

# Options

By default, the validation is done based on smart document detection. This is the best pratice. However, in some cases it is usefull to use a predefined validation. For example to test a custom CSV against the Peppol validations. These predefined validations can be retrieved using the validate/options api. Each option contains a unique id which can be used in the validate call.

An example response:

[
  {
    "id": "validation-id",
    "name": "Custom validation",
    "state": "inherited => on",
    "createdOn": "2025-01-01"
  }
]

# Upload file

Upload a file to POST /api/v1-beta/generic/validate using a multipart body or xml body upload. Use the optionId to select a predefined validation. For example: POST /api/v1-beta/generic/validate?optionId=validation-id. Use the HTTP header X-EConnect-Language to get the assertion messages in the requested language. It is also possible to specify the document type id of your payload using the sourceFormat. For example:

POST /api/v1-beta/generic/validate?sourceFormat=urn%3Aoasis%3Anames%3Aspecification%3Aubl%3Aschema%3Axsd%3AInvoice-2%3A%3AInvoice%23%23urn%3Acen.eu%3Aen16931%3A2017%23compliant%23urn%3Afdc%3Apeppol.eu%3A2017%3Apoacc%3Abilling%3A3.0%3A%3A2.1

# Request

POST /api/v1-beta/generic/validate HTTP/1.1
Authorization: Bearer <token>
X-EConnect-Language: en
Content-Type: application/xml

<Invoice>...</Invoice>

# Response

{
  "isValid": true,
  "source": {
    "typeId": "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1",
    "typeName": "Peppol BIS Billing UBL Invoice V3",
    "profileId": "urn:fdc:peppol.eu:2017:poacc:billing:01:1.0"
  },
  "assertions": [
    {
      "artifact": {
        "type": "schema",
        "name": "UBL v2.1"
      },
      "flag": "success",
      "text": "The 'UBL v2.1' schema validation has passed without errors."
    },
    {
      "artifact": {
        "type": "business",
        "name": "Peppol BIS Billing v1.0.18 (Nov24) UBL EN16931 (CEN)"
      },
      "flag": "success",
      "text": "The 'Peppol BIS Billing v1.0.18 (Nov24) UBL EN16931 (CEN)' business validation has passed without errors."
    },
    {
      "artifact": {
        "type": "business",
        "name": "Peppol BIS Billing v1.0.18 (Nov24) UBL EN16931 (Peppol)"
      },
      "flag": "success",
      "text": "The 'Peppol BIS Billing v1.0.18 (Nov24) UBL EN16931 (Peppol)' business validation has passed without errors."
    }
  ]
}
© 2025 eConnect International B.V.