---
name: validating-peppol-invoices
description: Validates Peppol UBL XML invoices and credit notes against EN16931 (CEN) and Peppol BIS Billing 3.0 schematron rules via the Peppol Validator API. Use when validating e-invoices, checking Peppol compliance, debugging UBL XML validation errors, or verifying invoices before sending via the Peppol network.
---

# Validating Peppol Invoices

POST XML to the Peppol Validator API and parse the JSON result.

## Endpoint

`POST https://peppolvalidator.com/api/v1/validate`

Send raw XML with `Content-Type: application/xml`:

```bash
curl -X POST https://peppolvalidator.com/api/v1/validate \
  -H "Content-Type: application/xml" \
  -d @invoice.xml
```

## Response

```json
{
  "status": "invalid",
  "invoiceNumber": "INV-2026-001",
  "sellerCountry": "BE",
  "errors": [
    {
      "rule": "BR-16",
      "severity": "error",
      "message": "An Invoice shall have at least one Invoice line (BG-25).",
      "location": "/Invoice"
    }
  ],
  "warnings": [],
  "infos": [],
  "validatedAt": "2026-02-17T12:00:00.000Z"
}
```

- **status** — `"valid"`, `"invalid"`, or `"error"`
- **errors/warnings/infos** — Each has `rule`, `severity`, `message`, `location` (XPath)
- **errorMessage** — Present only when status is `"error"` (e.g., not valid XML)

## Presenting results

Group issues by severity. Show rule ID and message for each. If fixing is needed, explain what the rule requires — rule IDs prefixed `BR-` are CEN EN16931, those prefixed `PEPPOL-EN16931-` are Peppol BIS 3.0.
