Skip to content

API reference

Update the group defaults

Other routes API

PUT/v1/group-defaults

Saves the group defaults as a new version with its own number. It changes no company’s policy version. Only a signed-in person may call this; an API key is refused with 401 session_required.

Request body

application/json, required

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

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

    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.

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 saved version.
400 The body names something group defaults do not hold, such as a fact (invalid_group_defaults). Nothing was saved.
401 No usable credential was sent (invalid_credentials), or an API key was used (session_required).
PUT/v1/group-defaults
Example
curl -X PUT https://api.certinvo.com/v1/group-defaults \
  -H "Authorization: Bearer $CERTINVO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @body.json
import { readFile } from 'node:fs/promises'

const response = await fetch(`https://api.certinvo.com/v1/group-defaults`, {
  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/group-defaults",
    headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}", "Content-Type": "application/json"},
    data=open("body.json", "rb"),
)
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
PUT
/v1/group-defaults
Update the group defaults
All
›AuthenticationRequiredBearerAuth

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

›Headers2
›Bodyapplication/json
›Code Snippet
curl -X PUT "https://api.certinvo.com/v1/group-defaults" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "produce": {},
  "files": {
    "B2B": [
      "ubl"
    ],
    "B2C": [
      "ubl"
    ],
    "B2G": [
      "ubl"
    ]
  },
  "incoming": {
    "ubl": "hold",
    "cii": "hold",
    "pdf": "ho...'
Response

No request sent yet

Configure parameters and click Send to view the response.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close