Skip to content

API reference

Get the group defaults

Other routes API

GET/v1/group-defaults

Returns the defaults every company of this workspace starts from: the files to make, what happens to a received file the gate rejects, per format, and the extra checks for a company that never saved a policy of its own. They hold settings only, never a fact about a company. A company’s policy and an establishment’s block win over them. Version 0, with nothing set, means the group saved none. Any credential may read it.

Response

A 200 answer carries these fields.

  • versionintegerRequired

    Counts up per workspace

  • 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.

  • filesobject

    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.
  • extraChecksobjectRequired

    A strength for each extra check the group sets, on both sides, for a company that never saved a policy of its own. Only the rulebooks no decision picks are extra checks.

Status codes

Status Meaning
200 The newest group defaults.
401 No usable credential was sent (invalid_credentials).
GET/v1/group-defaults
Example
curl https://api.certinvo.com/v1/group-defaults \
  -H "Authorization: Bearer $CERTINVO_API_KEY"
const response = await fetch(`https://api.certinvo.com/v1/group-defaults`, {
  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/group-defaults",
    headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}"},
)
print(response.status_code, response.text)
200
application/json
{
  "version": 0,
  "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"
    }
  },
  "extraChecks": {}
}
Success response
GET
/v1/group-defaults
Get the group defaults
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/group-defaults" \
  -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