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/validateValidates 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
| Field | Type | Description |
|---|---|---|
| required | object | Resource 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). |
| required | ValidationRequestAttributes | The actual resource fields. |
to_validaterequired | string | UBL 2.1 Invoice or Credit Note XML content to validate. |
JsonApiMeta | Optional JSON:API meta. Only used by scoped resources (e.g. email templates, notification emails) to declare their ownership scope. | |
| required | JsonApiScope | |
typerequired | string | Scope 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. |
value | string | Required 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'. |
type | string | Must be 'validations' for this endpoint. |
Responses
| Status | Description |
|---|---|
200 | Validation completed |
422 | Schematron validation error |
500 | Internal server error |
Response Body — JsonApiDocumentValidationResultAttributes
| Field | Type | Description |
|---|---|---|
JsonApiResourceValidationResultAttributes | ||
ValidationResultAttributes | Resource-specific fields. | |
ValidationError[] | List of validation errors (empty if valid). | |
flag | string | Raw schematron severity flag id (e.g. fatal_error, warn) |
id | string | Schematron rule ID |
location | string | XPath location of the error in the XML |
severity | string | Parsed severity; ERROR/FATAL_ERROR block sending, WARNING/INFO do not |
text | string | Human-readable error message |
valid | boolean | Whether the XML passed Schematron validation. |
id | string | Unique resource identifier (UUID). Use this value to poll the status endpoint or to reference the resource in subsequent requests. |
type | string | Resource 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": "validations"
}
}