---
title: "Update the customers"
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 customers

{/* 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/customers</code>
</div>
</div>

Saves the whole customer list as a new, immutable version. Earlier versions are never edited. Two customers with the same id are refused. On save, each customer's VAT ID is asked of VIES and its electronic address of the Peppol registry, and the answers are kept as `lookups`. A customer whose VAT ID and address did not change keeps the answers it had. A registry that cannot be asked is kept as `unavailable`, and the save goes on. The answers never change a customer's type. A customer with no electronic address is looked up in the Peppol registry by its VAT ID, in the scheme the official EAS list names for its country, and by a Leitweg-ID in its buyer reference. Exactly one registered participant becomes its electronic address, and `lookups.directory` says so with the date; none or several change nothing. A customer delivered by Peppol needs a Peppol participant ID, and so does the company's head office, as its electronic address. Without either, the list is refused with 422 `peppol_participant_missing`, naming which one. Only a signed-in person may call this, as for `/v1/datev-settings`. 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 list was refused (`invalid_customers`). The message names the field or the repeated id. Nothing was changed. |
| `401` | No usable credential was sent (`invalid_credentials`), or an API key was used (`session_required`). |
| `422` | A customer is delivered by Peppol and it or the company's head office has no Peppol participant ID (`peppol_participant_missing`). Nothing was changed. |

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

</div>
</div>

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