curatedapi
Browse the docs

Guides

Finance

Excel functions

Late payments

E-invoices

Accounting

Number checks

VAT and GST

Billing and pricing

Money and currencies

Dates and time

Math

Unit conversion

Everyday

Health

Peppol BIS 3.0 invoice validator API

Check a UBL invoice or credit note against Peppol BIS Billing 3.0 with OpenPeppol's official rules.

POST https://api.curatedapi.com/v1/validate/einvoice/peppol-bis

Runs the UBL 2.1 schema, the EN 16931 rules in the copy Peppol ships, and the Peppol BIS Billing 3.0 rules (PEPPOL-EN16931-R…, country rules for Norway, Denmark, Italy, Sweden, Greece, Iceland, the Netherlands and Germany). Peppol BIS 3.0 documents are UBL only.

  • Peppol's rules are compiled from OpenPeppol's Schematron with SchXslt, the compiler KoSIT uses; the result is checked against OpenPeppol's own unit tests.

Inputs

An invoice that breaks a rule still gets HTTP 200, with "valid": false and the findings (see e-invoice validation).

InputTypeDescription
xml required string The invoice XML, as text.

Result

Under result in the answer, next to validator and rules (the official artefacts used, with their versions).

ResultTypeDescription
validbooleantrue when the document matched a scenario and no check reported an error.
scenario['string', 'null']Which set of rules applied, chosen from the document's own type and specification ID; null when none applies.
document_type['string', 'null']UBL Invoice, UBL CreditNote or UN/CEFACT CII.
specification_id['string', 'null']The CustomizationID (UBL) or guideline ID (CII), BT-24, as found.
errorsintegerMessages at level error.
warningsintegerMessages at level warning.
noticesintegerMessages at level information.
error_ruleslist of stringThe distinct rules that reported an error, sorted.
checkslist of objectEach check in the order it ran, and whether it passed (a schema failure skips the rules, as in KoSIT's validator).
messageslist of objectUp to 500 findings.
messages_truncatedboolean

Examples

An official sample (peppol-base-creditnote-correction.xml)

Requestcurl
jq -Rs '{xml: .}' peppol-base-creditnote-correction.xml |
  curl https://api.curatedapi.com/v1/validate/einvoice/peppol-bis \
    -H "Authorization: Bearer $CURATEDAPI_KEY" \
    -H "Content-Type: application/json" \
    --data-binary @-
200 OKResponse
{
  "validator": "einvoice/peppol-bis@1",
  "result": {
    "valid": true,
    "scenario": "Peppol BIS Billing 3.0 (UBL CreditNote)",
    "document_type": "UBL CreditNote",
    "specification_id": "urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0",
    "errors": 0,
    "warnings": 0,
    "notices": 0,
    "error_rules": [],
    "checks": [
      {
        "check": "XML syntax",
        "passed": true
      },
      {
        "check": "UBL 2.1 CreditNote schema",
        "passed": true
      },
      {
        "check": "EN 16931 rules (Peppol BIS 3.0.22 copy)",
        "passed": true
      },
      {
        "check": "Peppol BIS Billing 3.0.22 rules",
        "passed": true
      }
    ],
    "messages": [],
    "messages_truncated": false
  },
  "rules": [
    {
      "name": "OpenPeppol BIS Billing 3.0 Schematron (compiled with SchXslt 1.10.1)",
      "version": "3.0.22",
      "url": "https://github.com/OpenPEPPOL/peppol-bis-invoice-3/releases/tag/3.0.22"
    }
  ]
}

Rules used

A check shows whether the invoice passes the official rule sets listed, at the versions listed. It is not legal or tax advice, and passing does not promise that a tax authority or buyer will accept the invoice. See the terms.

Errors share one format; see errors. Billing, retries and batches work the same for every endpoint.