---
title: "Save a new version of an establishment"
description: "Other routes 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.

# Save a new version of an establishment

{/* 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/establishments/&#123;id&#125;</code>
</div>
</div>

Saves the whole establishment as its next version, naming the key or the person; earlier versions are kept unchanged. An establishment keeps its country, and a save does not move the Head office: to move it, make a branch the Head office with `POST /v1/establishments/{id}/head-office`. A `kind` not stated yet may be stated. The same VAT ID keeps VIES's answer it had; a new one is checked with VIES once.

## Path parameters

## Request body

`application/json`, required

## Response

A `200` answer carries these fields.

## Status codes

| Status | Meaning |
|---|---|
| `200` | The saved version. |
| `400` | The establishment was refused (`invalid_establishment`), its country or a Head office changed included. The message names the field. Nothing was saved. |
| `401` | No usable credential was sent (`invalid_credentials`). |
| `404` | This company has no establishment by that id (`not_found`). |
| `409` | Someone saved a version of it meanwhile (`version_conflict`). Read it again, then save. |
| `501` | This deployment has no database, so it keeps no establishments (`no_database`). Sending the same request again will not help. |

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

</div>
</div>

Source: https://docs.certinvo.com/reference/api/other/save-a-new-version-of-an-establishment/index.mdx
