/v1/validation-policySaves the policy as a new, immutable version. Earlier versions are never edited. Every validation records the policy version it ran under, so a verdict can always be read against the rules that produced it. rulebooks must list every rulebook of the pinned configuration, by the names GET /v1/validation-policy returns. A missing rulebook is refused, not treated as OFF. received names the strengths for documents that arrive, under the same rules. Left out, they are the same as rulebooks. At least one rulebook must be REQUIRED, on each side. A company whose country has no pinned rule set (every country but DE today) may save only EN16931 REQUIRED with every other rulebook OFF, on both sides. incoming says, per format a received file arrives as, what happens when the gate rejects it: hold keeps it out of DATEV until a person releases it, accept (the default) accepts it with its findings. establishments holds one block per establishment of the company, only what differs from the company: its files, its incoming handling and off, the items of GET /v1/rule-sets the company turns off for it, each with an optional note. Left out, the stored incoming and establishments are kept, so a save that does not name them turns no item back on. An item newly turned off is stamped with this version, the person and the time; one already off keeps its stamp. A check of an invoice reads the group defaults, then this policy, then the block of the establishment the invoice follows; the nearest that says something wins. The decision for each invoice picks the rulebooks it requires; the company’s strengths add extra checks, and grade an invoice the rules cannot decide. An extra check a rule shuts out is refused (invalid_policy), naming the rule and its source. Only a signed-in person may call this, as for /v1/keys. An API key is refused with 401 session_required. The new version records the person as createdBy.
Request body
application/json, required
- rulebooksobjectRequired
A map from rulebook name to strength, for example
{"EN16931": "REQUIRED", "EN16931 XRechnung Extension": "OPTIONAL"}. The names come from the pinned configuration. They change when the pinned configuration changes. - receivedobject
A map from rulebook name to strength, for example
{"EN16931": "REQUIRED", "EN16931 XRechnung Extension": "OPTIONAL"}. The names come from the pinned configuration. They change when the pinned configuration changes. - produceobject
Which files an outbound invoice gets, for example
{"ubl": false, "cii": true, "zugferd-pdf": true, "peppol": false}. The keys are the ids of the formats Certinvo writes, such asubl,cii,zugferd-pdfandpeppol.- A key left out keeps its default:
ublandciiare made.zugferd-pdf,peppol,en16931-ublanden16931-ciiare not. en16931-ublanden16931-ciiare plain EN 16931 files: they carry the standard's own Specification identifier (BT-24) and no Business process type (BT-23). Only the EN16931 rulebook checks them, and they are kept only when it did not reject them.factur-xis the PDF/A-3 that carries that CII (EN 16931 profile). It is kept on the same condition as its CII.extended-ciiis the CII in FeRD's ZUGFeRD EXTENDED profile andzugferd-extendedthe PDF/A-3 that carries it. Only the ZUGFeRD EXTENDED rulebook checks them, so it must beREQUIREDwhen either is chosen; otherwise the update is refused (invalid_policy). Not made by default.
At least one file must be made. If no XRechnung file (
ubl,cii,zugferd-pdf) is chosen, the EN16931 rulebook must beREQUIRED, because only it checks the plain files. Otherwise the update is refused (invalid_policy). Only the chosen files are stored and checked. The CII is still checked when only the PDF is chosen, because the PDF carries it. A conversion freezes the company's current policy version when the operation is accepted. Request parameters cannot override this list for individual items. - A key left out keeps its default:
- filesobject
The files an invoice we make gets, per buyer type:
B2Ba business,B2Ca consumer,B2Ga public buyer, each a list of file ids asGET /v1/invoices/{id}/filesnames them, such asfactur-xorublandcii. A buyer type left out follows the next layer, and at the last the country default: the Factur-X PDF for a business or a consumer and XRechnung for a public buyer. A setting changes only the buyer type it names. Every save checks the files of each buyer type, merged over the layers below it, against the rulebooks that grade them.Show 3 child fields
- B2Barray of string
- B2Carray of string
- B2Garray of string
- incomingobject
Per format a received file arrives as, what happens when the gate rejects it:
holdkeeps it out of DATEV until a person releases it;accept, the default, accepts it with its findings.checks: advanced checks beyond the validator, each off unless named here.Show 4 child fields
- ublstringOne of
hold,accept. - ciistringOne of
hold,accept. - pdfstringOne of
hold,accept. - checksobject
Each check runs on received invoices only when named, with its action:
warnshows its finding on the invoice;holdalso keeps the invoice out of DATEV and the forward to your own system until a person releases it. A check left out is off and does not run.seller-account-changed: the invoice pays to an account none of the same seller's earlier received invoices named.pdf-xml-account-disagree: the XML inside a PDF pays to an account its page does not show.Show 2 child fields
- seller-account-changedstringOne of
warn,hold. - pdf-xml-account-disagreestringOne of
warn,hold.
- establishmentsobject
One block per establishment, by its id, holding only what differs from the company.
Response
A 200 answer carries these fields.
- produceobjectRequired
Which files an outbound invoice gets, for example
{"ubl": false, "cii": true, "zugferd-pdf": true, "peppol": false}. The keys are the ids of the formats Certinvo writes, such asubl,cii,zugferd-pdfandpeppol.- A key left out keeps its default:
ublandciiare made.zugferd-pdf,peppol,en16931-ublanden16931-ciiare not. en16931-ublanden16931-ciiare plain EN 16931 files: they carry the standard's own Specification identifier (BT-24) and no Business process type (BT-23). Only the EN16931 rulebook checks them, and they are kept only when it did not reject them.factur-xis the PDF/A-3 that carries that CII (EN 16931 profile). It is kept on the same condition as its CII.extended-ciiis the CII in FeRD's ZUGFeRD EXTENDED profile andzugferd-extendedthe PDF/A-3 that carries it. Only the ZUGFeRD EXTENDED rulebook checks them, so it must beREQUIREDwhen either is chosen; otherwise the update is refused (invalid_policy). Not made by default.
At least one file must be made. If no XRechnung file (
ubl,cii,zugferd-pdf) is chosen, the EN16931 rulebook must beREQUIRED, because only it checks the plain files. Otherwise the update is refused (invalid_policy). Only the chosen files are stored and checked. The CII is still checked when only the PDF is chosen, because the PDF carries it. A conversion freezes the company's current policy version when the operation is accepted. Request parameters cannot override this list for individual items. - A key left out keeps its default:
- filesobjectRequired
The files an invoice we make gets, per buyer type:
B2Ba business,B2Ca consumer,B2Ga public buyer, each a list of file ids asGET /v1/invoices/{id}/filesnames them, such asfactur-xorublandcii. A buyer type left out follows the next layer, and at the last the country default: the Factur-X PDF for a business or a consumer and XRechnung for a public buyer. A setting changes only the buyer type it names. Every save checks the files of each buyer type, merged over the layers below it, against the rulebooks that grade them.Show 3 child fields
- B2Barray of string
- B2Carray of string
- B2Garray of string
- incomingobjectRequired
Per format a received file arrives as, what happens when the gate rejects it:
holdkeeps it out of DATEV until a person releases it;accept, the default, accepts it with its findings.checks: advanced checks beyond the validator, each off unless named here.Show 4 child fields
- ublstringOne of
hold,accept. - ciistringOne of
hold,accept. - pdfstringOne of
hold,accept. - checksobject
Each check runs on received invoices only when named, with its action:
warnshows its finding on the invoice;holdalso keeps the invoice out of DATEV and the forward to your own system until a person releases it. A check left out is off and does not run.seller-account-changed: the invoice pays to an account none of the same seller's earlier received invoices named.pdf-xml-account-disagree: the XML inside a PDF pays to an account its page does not show.Show 2 child fields
- seller-account-changedstringOne of
warn,hold. - pdf-xml-account-disagreestringOne of
warn,hold.
- establishmentsobjectRequired
One block per establishment, by its id, holding only what differs from the company.
- versionintegerRequired
Starts at 1 and counts up per company. Each validation records the version it ran under.
- rulebooksobjectRequired
How hard each rulebook counts for the invoices the company makes, and for a finished invoice it files as outbound.
- receivedobjectRequired
How hard each rulebook counts for the documents the company receives. A version saved before this setting existed grades both sides alike, and answers the same strengths here as in
rulebooks. - createdAtstring (date-time)Required
- createdBystring (uuid) or nullRequired
The signed-in person who set it. Null for the product default, which nobody chose.
- legacyInvalidarray of stringRequired
Why the rules today would refuse this version, one line per side, or empty. A version saved before a rule existed is kept as it was and still grades; save a corrected version to fix it.
Status codes
| Status | Meaning |
|---|---|
200 |
The new version, which is now current. |
400 |
The policy was refused (invalid_policy). The message names the rulebook, the strength, or the company’s country when it may not save this policy. Nothing was changed. |
401 |
No usable credential was sent (invalid_credentials), or an API key was used (session_required). |
/v1/validation-policycurl -X PUT https://api.certinvo.com/v1/validation-policy \
-H "Authorization: Bearer $CERTINVO_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @body.jsonimport { readFile } from 'node:fs/promises'
const response = await fetch(`https://api.certinvo.com/v1/validation-policy`, {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.CERTINVO_API_KEY}`,
'Content-Type': 'application/json',
},
body: await readFile('body.json'),
})
console.log(response.status, await response.json())import os
import requests
response = requests.put(
"https://api.certinvo.com/v1/validation-policy",
headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}", "Content-Type": "application/json"},
data=open("body.json", "rb"),
)
print(response.status_code, response.text){
"produce": {},
"files": {
"B2B": [
"ubl"
],
"B2C": [
"ubl"
],
"B2G": [
"ubl"
]
},
"incoming": {
"ubl": "hold",
"cii": "hold",
"pdf": "hold",
"checks": {
"seller-account-changed": "warn",
"pdf-xml-account-disagree": "warn"
}
},
"establishments": {},
"version": 0,
"rulebooks": {},
"received": {},
"createdAt": "2026-09-17T09:30:00Z",
"createdBy": "3f0c2a5e-8d1b-4c7a-9e2f-6b5d4a3c2b1a",
"legacyInvalid": [
"string"
]
}