---
title: "Update the validation policy"
description: "Settings API"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.certinvo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update the validation policy

{/* Generated by apps/docs/scripts/generate.ts from contracts/api/openapi.yaml. Do not edit. */}
<div class="cvo-op">
<div class="cvo-op-main">

<div class="cvo-op-header">
<div class="cvo-op-path-row">
<span class="cvo-method" data-method="put">PUT</span>
<code class="cvo-op-path-code">/v1/validation-policy</code>
</div>
</div>

Saves 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

## Response

A `200` answer carries these fields.

## 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`). |

</div>
<div class="cvo-op-aside">

</div>
</div>

Source: https://docs.certinvo.com/reference/api/settings/update-the-validation-policy/index.mdx
