Skip to content

Invoices · How-to guide

Change the validation policy

Learn how to choose which rulebooks check your invoices, how strictly, and which files are made.

A company’s validation policy says which rulebooks check its invoices, how strictly, and which files an outgoing invoice gets by default. This guide shows how to change it in the console and over the API, and what a change does to invoices already checked.

The policy is the company’s validation scope: what the company asks to be checked. That is a separate question from what the invoice says about itself.

Before you begin

  • Only a signed-in person can change the policy. An API key can read it but not change it.
  • Each rulebook gets one of three strengths:
    • Required: the rulebook runs, and if it rejects the file, the invoice is rejected.
    • Optional: the rulebook runs and its findings are shown, but it never rejects the invoice.
    • Off: the rulebook does not run.

In the console

  1. Open Settings, then Company, then Validation policy (/settings?tab=rules; in German Unternehmen, Prüfrichtlinie). The table lists each country your locations fall under, with the rules active. Open a country.
  2. Under Rules, each rule is listed by name as Active or Disabled. Under each one, a closed Recommendations section gives its format and where to read it. Untick a rule to disable it, with a note if you want one, and set the extra checks: Required, Shown only or Off.
  3. Under Output formats, choose a format for each buyer type: Business buyer, Consumer and Public buyer, each Default or a format such as “ZUGFeRD EN 16931 (PDF)” or “XRechnung (UBL + CII)”. A buyer type on Default follows the standard. A set of files no format names, saved before, shows as Custom and is kept. Formats are set on each location’s own country only; the EU page has its rules and no formats. On a country page where a rule makes a file, such as France’s, each file is listed instead, and the one an active rule makes is ticked and locked, with the line “Default format”, until you disable that rule. Under Rejected incoming invoices, choose what happens to a received invoice the validator rejects, per format (XRechnung or Peppol XML (UBL), XRechnung or ZUGFeRD XML (CII), ZUGFeRD or Factur-X PDF). Accept and include in the DATEV export treats it like any other invoice. Hold out of the DATEV export until released keeps it readable and out of DATEV until someone releases it under Needs attention. Under Advanced checks, set New bank account and Bank account not on the PDF to Off, Warn or Hold. Both are Off by default, and an off check does not run. Warn shows the finding on the invoice; Hold also holds the invoice until a person releases it.
  4. Click Save. The settings apply to every location in that country, and the policy gets its next version. The console offers to check earlier invoices again.

Over the API

Read the current policy with any credential:

curl -s -H "Authorization: Bearer <token>" "https://<api-host>/v1/validation-policy"

Change it with PUT. This works only with a signed-in person’s session. An API key gets 401 session_required. The body names every rulebook:

{
  "rulebooks": {
    "EN16931": "REQUIRED",
    "EN16931 XRechnung": "REQUIRED",
    "EN16931 XRechnung Extension": "OPTIONAL",
    "EN16931 XRechnung CVD": "OFF",
    "Peppol Billing BIS 3": "OPTIONAL",
    "ZUGFeRD EXTENDED": "OFF",
    "France EN16931": "OFF",
    "France EXTENDED-CTC-FR": "OFF"
  },
  "received": {
    "EN16931": "REQUIRED",
    "EN16931 XRechnung": "OPTIONAL",
    "EN16931 XRechnung Extension": "OPTIONAL",
    "EN16931 XRechnung CVD": "OFF",
    "Peppol Billing BIS 3": "OPTIONAL",
    "ZUGFeRD EXTENDED": "OFF",
    "France EN16931": "OFF",
    "France EXTENDED-CTC-FR": "OFF"
  },
  "files": { "B2B": ["ubl", "cii"] }
}
Field What it sets
rulebooks The strengths for the invoices you make, and for a finished invoice you file as outbound. It must name every rulebook, the eight in the example, each REQUIRED, OPTIONAL or OFF.
received The strengths for the documents that arrive, under the same rules. Optional. Left out, it is the same as rulebooks.
files Optional. Which files an outgoing invoice gets, per buyer type: B2B a business, B2C a consumer, B2G a public buyer. Each is a list of file ids: ubl, cii, zugferd-pdf, en16931-ubl, en16931-cii, factur-x, extended-cii and zugferd-extended. A buyer type left out follows the default: the Factur-X PDF for a business or a consumer, XRechnung for a public buyer. A setting changes only the buyer type it names. Left out of a save, the stored files are kept.
produce Optional. The switches that are no e-invoice file, today peppol.

In the example, a supplier’s plain EN 16931 invoice is graded by the EN 16931 rules, while your own XRechnung files stay held to XRechnung. Business invoices are made as XRechnung; consumer and public buyer invoices keep their defaults.

Rules a policy must follow

  • On each side, at least one XRechnung-line rulebook must be REQUIRED: EN16931, EN16931 XRechnung, EN16931 XRechnung Extension or EN16931 XRechnung CVD.
  • Each buyer type that files names gets at least one file: XRechnung UBL or CII, the ZUGFeRD PDF, a plain EN 16931 file, the Factur-X PDF, or a ZUGFeRD EXTENDED file. The check runs on every save, for the company, each location block and the group defaults, on the files of each buyer type merged over the layers below.
  • If only plain EN 16931 files are made, EN16931 must be REQUIRED. It is the only rulebook that checks them.
  • If extended-cii or zugferd-extended is made, ZUGFeRD EXTENDED must be REQUIRED. It is the only rulebook that checks them.
  • On each side, at most one of EN16931 XRechnung, EN16931 XRechnung Extension and EN16931 XRechnung CVD is REQUIRED. No file can pass two of them, so two would reject every invoice.
  • A policy saved before files existed named its files as switches in produce. They were converted once to the same files for every buyer type, so each kept the files it had, and the company’s Settings showed a note saying so once (GET /v1/validation-policy/notices, closed with POST /v1/validation-policy/notices/{notice}/seen).

A policy that breaks a rule is refused with 400 invalid_policy. The message names the problem.

Rulebooks bound to a label

EN16931 XRechnung Extension and EN16931 XRechnung CVD run only on a file whose own label names them. On any other file the report lists them in notApplicable.

  • Set to REQUIRED, either one rejects every invoice whose label does not name it.
  • The other way round, EN16931 XRechnung does not run on a file whose label names the Extension or CVD. Set to REQUIRED, it rejects such a file.

ZUGFeRD EXTENDED

ZUGFeRD EXTENDED holds FeRD’s rules for the EXTENDED profile of ZUGFeRD 2.5.2 / Factur-X 1.09.2. Its one scenario matches only a CII file that claims EXTENDED. The default has it OFF. You may turn it on in Settings, where a sentence says what it checks.

Certinvo writes two EXTENDED files, both off by default: extended-cii, the CII, and zugferd-extended, the PDF/A-3 that carries it. To make either, first set ZUGFeRD EXTENDED to REQUIRED in the Made column. Then choose it for a buyer type under Output formats in Settings, tick it on the create form, or name it in files or a conversion’s outputs. An invoice with sub-lines gets both, its sub-lines written as FeRD writes them; the other CII files and their PDFs refuse it.

France

France EN16931 and France EXTENDED-CTC-FR hold FNFE-MPE’s French business rules, for CII files only. France EN16931 matches a CII file that claims plain EN 16931, and France EXTENDED-CTC-FR one that claims the French extension EXTENDED-CTC-FR. The default has both OFF. Keep them OFF: France has no default policy of its own yet, so a company in France may not turn them on.

Companies outside Germany

Today only Germany has an active rule set. France’s is pinned, but not active yet. A company in any other country may save only one policy: EN16931 REQUIRED and every other rulebook OFF, on both sides. Any other policy gets 400 invalid_policy, and the message names the country. The country is the head office’s, else the company’s own, as for the default.

Until it saves a policy, such a company starts on that same policy, EN16931 alone, as its country’s default. Its checks name no jurisdiction, because no rule set of its country is active. Making that country’s rule set active lifts the limit.

The decision picks the rulebooks

Each invoice’s rulebooks are picked from its countries’ rules, and they run as required. There is no setting to choose another way. The strengths you set count for the extra checks the rules allow on top, today Peppol BIS, ZUGFeRD EXTENDED and the two French rulebooks, and for an invoice the rules cannot decide yet. A save is checked against the rules in force on your company’s day of the save: an extra check a legal rule shuts out for your invoices gets 400 invalid_policy, and the message names the rule and its source. Nothing is saved.

Each company fact you did not save is assumed by the rule files. For Germany: a buyer the invoice addresses by a Leitweg-ID is a public body unless its address is in another country than Germany, a buyer with a VAT ID or in Germany is a business, you are established where your address is, and your prior-year turnover was more than 800 000 euro. Whether a public buyer is a federal authority is never assumed: set it on the buyer card. The invoice leaves on its verdict either way. Change any of them on the Company details in Settings (or a location’s page under Locations), or per customer.

Received files the gate rejects

incoming in the PUT body says, per format a received file arrives as (ubl, cii or pdf), what happens when the gate rejects it: accept (the default) accepts it with its findings; hold keeps it out of DATEV exports until a person releases it.

incoming.checks turns on the advanced checks, each with its action: warn shows its finding on the invoice; hold also holds the invoice. A check left out is off and does not run. Such a hold keeps the invoice out of DATEV exports and out of the forward to your own system, which answers 409 invoice_on_hold.

{ "incoming": { "pdf": "hold", "checks": { "seller-account-changed": "hold", "pdf-xml-account-disagree": "warn" } } }

A person releases a hold, or dismisses it at .../dismiss with the same body. A dismissed invoice stays held for good:

curl -s -X POST -H "Authorization: Bearer <session>" -H "content-type: application/json" \
  -d '{"reason": "Checked with the supplier by phone."}' "https://<api-host>/v1/invoices/<id>/release"

The verdict stays the gate’s. A held invoice stays readable everywhere.

One block per establishment

establishments holds one block per establishment, by its id: only what differs from the company, its files and produce, its incoming and off, the duties it turns off. A PUT that leaves out incoming or establishments keeps the stored ones. The group defaults at GET and PUT /v1/group-defaults hold the files, the incoming handling and the extra checks every company of the workspace starts from; a company’s policy and an establishment’s block win over them.

Disable a rule

To disable a rule for one establishment’s invoices, list it in that establishment’s block by the id GET /v1/rule-sets gives it, with a note if you want one:

{ "establishments": { "<id>": { "off": [{ "obligation": "FR_E_INVOICE", "note": "<optional>" }] } } }

The answer stamps it with the policy version that turned it off, who saved it and when. Its rule set no longer checks as required, and the files stay those of the establishment’s own country. The gate still checks every file that is made. Leave it out of a later save to turn it back on.

What a change does

  • Every save creates a new version. Nothing is overwritten.
  • New checks use the newest version. Each check result records which version it used.
  • Earlier verdicts are not recomputed. To apply the new policy to a filed invoice, check it again with POST /v1/invoices/<id>/validations.
  • To check every invoice the new policy left behind, use POST /v1/rechecks. GET /v1/rechecks says how many there are. An invoice is behind when its newest check used an older version and none of its files has left Certinvo: it was not emailed, downloaded, sent by webhook or SFTP, exported to DATEV, archived, or reported as sent. The re-checks run in the background, one at a time. Each adds a new check and keeps the earlier one.
  • In the console, Settings asks after a save whether to check those invoices again, and shows how many are still behind. Once you say yes, it says how many the API queued.
  • An invoice already sent keeps the verdict it was sent with. You can still check it again by hand with POST /v1/invoices/<id>/validations, and the result is stored with its policy version. It is information only: its files stay downloadable while the check it was sent with accepted it. Sending it again needs the newest check to accept it. Its record’s sent names the check it was sent with, and the invoice page shows both.
  • An invoice the rules could not decide, because a fact was missing, is checked again when you save the company facts or the customer list. It needs no policy change, and nothing is held while it waits.
  • A new check grades the files the invoice already has, the ones its first check graded, under the new strengths for that invoice’s side. It grades the stored bytes as they are. A file the first check graded but did not store is written again by today’s writer.
  • A files change decides what the next invoice is written as. It cannot add a file to an invoice already filed.
  • A new validation or conversion freezes the newest policy version when it is accepted. A change made while it runs cannot change its files or verdict.
  • To check a stored invoice under an older version, use POST /v1/invoices/<id>/validations?policyVersion=<n>. The answer is stored nowhere and changes nothing: whatever decided whether its files may leave still decides it. An unknown version is refused with unknown_policy_version. Certinvo never falls back to the current policy.

GET answers both sides. A version saved before received existed graded both sides alike, so it answers the same strengths in received as in rulebooks.

If there is no policy

A company without a saved policy gets its own country’s default, the country of its head office. A country with no default of its own gets EN16931 alone. It is saved as version 1 the first time it is read. There is one default per country. Only Germany has one.

Rulebook Invoices you make Documents you receive
EN16931 Required Required
EN16931 XRechnung Required Optional
EN16931 XRechnung Extension Optional Optional
EN16931 XRechnung CVD Off Off
Peppol Billing BIS 3 Optional Optional
ZUGFeRD EXTENDED Off Off
France EN16931 Off Off
France EXTENDED-CTC-FR Off Off

On the received side, EN16931 XRechnung is optional. So a supplier’s valid EN 16931 invoice passes, and the XRechnung findings are listed. A version 1 saved before the received side existed is not rewritten. It grades both sides alike until you save a new version.

Who may

Only an owner or an admin of the workspace changes the validation policy. Anyone else, Process invoices and Read only included, gets 403 role_required.

See also

Navigation

Type to search…

↑↓ navigate↵ selectEsc close