Skip to content

API reference

Get the validation policy

Settings API

GET/v1/validation-policy

Returns which rulebooks check this company’s invoices, and how much each one counts, for each side: received for documents that arrive, rulebooks for invoices the company makes. Each pinned rulebook is set to one of:

  • REQUIRED: it runs, and a failure rejects the invoice.
  • OPTIONAL: it runs and its result is shown, but it cannot reject the invoice.
  • OFF: it does not run.

The invoice’s own Specification identifier (BT-24) is recorded but does not decide which rulebooks run. Two rulebooks apply only to an invoice whose Specification identifier names them: XRechnung Extension and XRechnung CVD. On any other file they do not run, and on a file that claims one of them core XRechnung does not run. The report lists such a rulebook in notApplicable, and a REQUIRED one rejects the invoice. A company that never set a policy gets its country’s default, returned as version 1 with createdBy: null. Only DE has one, and a company anywhere else gets the German one. The German default grades invoices you make with EN16931 and XRechnung REQUIRED, and received documents with EN16931 REQUIRED and XRechnung OPTIONAL. A version 1 frozen before the received side existed grades both sides alike until a new version is saved. Any credential may read it, so a system sending invoices can check what will apply.

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 as ubl, cii, zugferd-pdf and peppol.

    • A key left out keeps its default: ubl and cii are made. zugferd-pdf, peppol, en16931-ubl and en16931-cii are not.
    • en16931-ubl and en16931-cii are 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-x is the PDF/A-3 that carries that CII (EN 16931 profile). It is kept on the same condition as its CII.
    • extended-cii is the CII in FeRD's ZUGFeRD EXTENDED profile and zugferd-extended the PDF/A-3 that carries it. Only the ZUGFeRD EXTENDED rulebook checks them, so it must be REQUIRED when 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 be REQUIRED, 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.

  • filesobjectRequired

    The files an invoice we make gets, per buyer type: B2B a business, B2C a consumer, B2G a public buyer, each a list of file ids as GET /v1/invoices/{id}/files names them, such as factur-x or ubl and cii. 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: hold keeps 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
    • ublstring
      One of hold, accept.
    • ciistring
      One of hold, accept.
    • pdfstring
      One of hold, accept.
    • checksobject

      Each check runs on received invoices only when named, with its action: warn shows its finding on the invoice; hold also 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-changedstring
        One of warn, hold.
      • pdf-xml-account-disagreestring
        One 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 current version.
401 No usable credential was sent (invalid_credentials).
404 Nothing is stored in this deployment, so there is no policy to read (no_policy). Checks here are graded under the German default.
GET/v1/validation-policy
Example
curl https://api.certinvo.com/v1/validation-policy \
  -H "Authorization: Bearer $CERTINVO_API_KEY"
const response = await fetch(`https://api.certinvo.com/v1/validation-policy`, {
  headers: {
    Authorization: `Bearer ${process.env.CERTINVO_API_KEY}`,
  },
})
console.log(response.status, await response.json())
import os

import requests

response = requests.get(
    "https://api.certinvo.com/v1/validation-policy",
    headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}"},
)
print(response.status_code, response.text)
200
application/json
{
  "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"
  ]
}
Success response
GET
/v1/validation-policy
Get the validation policy
All
›AuthenticationRequiredBearerAuth

Provide your API key in the Authorization: Bearer <key> header. Keys are stored locally in your browser.

›Headers2
›Code Snippet
curl -X GET "https://api.certinvo.com/v1/validation-policy" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
Response

No request sent yet

Configure parameters and click Send to view the response.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close