Validation

Validate UBL XML against PEPPOL BIS 3.0 Schematron rules.

Validate your UBL documents against PEPPOL rules without sending them. This is useful for pre-flight checks, debugging, and integration testing.

Validate UBL XML

POST /bizzlink/document/validate

Validates a UBL 2.1 Invoice or Credit Note XML document against PEPPOL BIS 3.0 Schematron rules.

Request body is a JSON:API resource envelope with data.type = "validations", and data.attributes.to_validate containing the UBL XML. The response data.attributes has valid (boolean) and errors (list) — populated synchronously.

Request Body:

FieldTypeRequiredDescription
dataobjectYesResource envelope. 'attributes' holds the domain fields; 'meta.scope' declares whether the resource belongs to the whole tenant or to a specific legal entity (Peppol ID).
    attributesValidationRequestAttributesYesThe actual resource fields.
        to_validatestringYesUBL 2.1 Invoice or Credit Note XML content to validate.
    metaJsonApiMetaNoOptional JSON:API meta. Only used by scoped resources (e.g. email templates, notification emails) to declare their ownership scope.
        scopeJsonApiScopeYes
            typestringYesScope type. 'tenant' = applies to the whole tenant. 'legal-entity' = applies only to the Peppol ID given in 'value'. 'partner' = applies to all child tenants of the calling partner tenant; 'value' must be empty.
            valuestringNoRequired when type='legal-entity': the Peppol ID (scheme:identifier) that owns this resource, e.g. '9938:lu28079289'. Must belong to the requesting tenant. Ignored when type='tenant'. Must be empty when type='partner'.
    typestringNoMust be 'validations' for this endpoint.

Responses:

StatusDescription
200Validation completed
422Schematron validation error
500Internal server error

Response BodyJsonApiDocumentValidationResultAttributes:

FieldTypeDescription
dataJsonApiResourceValidationResultAttributes
    attributesValidationResultAttributesResource-specific fields.
        errorsValidationError[]List of validation errors (empty if valid).
            flagstringRaw schematron severity flag id (e.g. fatal_error, warn)
            idstringSchematron rule ID
            locationstringXPath location of the error in the XML
            severitystringParsed severity; ERROR/FATAL_ERROR block sending, WARNING/INFO do not
            textstringHuman-readable error message
        validbooleanWhether the XML passed Schematron validation.
    idstringUnique resource identifier (UUID). Use this value to poll the status endpoint or to reference the resource in subsequent requests.
    typestringResource type — matches the endpoint (e.g. 'invoices' for POST /documents/invoices, 'documents' for GET /documents/{id}/status).
cURL Request
curl -X POST https://gateway.vigasoft.lu/bizzlink/document/validate \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "X-Bizzlink-Signature: t=$TIMESTAMP,v1=$SIGNATURE" \
  -H "Content-Type: application/json" \
  -d '{
      "data": {}
  }'
Response 200 OK
{
    "data": {
      "attributes": {
        "errors": [
        {
            "flag": "fatal_error",
            "id": "BR-01",
            "location": "/Invoice/cac:AccountingSupplierParty",
            "severity": "FATAL_ERROR",
            "text": "An Invoice shall have a Specification identifier"
        }
        ],
        "valid": true
    },
      "id": "770e8400-e29b-41d4-a716-446655440000",
      "type": "invoices"
  }
}