/v1/establishments/{id}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
- idstring (uuid)Required
The establishment's
establishmentId.
Request body
application/json, required
- kindstringRequired
head_office: where the company is seated; exactly one per company, and it stays the Head office.branch: a permanent establishment in another place.vat_registration: registered for VAT there, with no establishment. Null: not stated yet; a later version may state it.One ofhead_office,branch,vat_registration,null. - countrystringRequired
The country of the establishment, as an ISO 3166-1 code. It never changes: another country is another establishment.
- namestring or null
A name the company gives it, such as Berlin HQ.
- vatIdstring or null
Its VAT ID, starting with the prefix of an EU member state (Greece: EL). Spaces and dots are removed and letters made capitals. A new VAT ID is checked with VIES, the European Commission's VAT number check, and the answer is returned as
vies. - taxNumberstring or null
Its national tax number, such as a German Steuernummer.
- addressobject or null
Its postal address, as invoices state the seller's.
Show 4 child fields
- streetstring or null
- postcodestring or null
- citystring or null
- countrystring or null
An ISO 3166-1 country code.
- contactobject or null
Whom a buyer contacts about an invoice.
Show 3 child fields
- namestring or null
- phonestring or null
- emailstring or null
- electronicAddressobject or null
Where it receives e-invoices: the scheme and the address, both or neither.
Show 2 child fields
- schemestringRequired
A scheme of the official electronic address scheme list, such as 9930 or 0204.
- valuestringRequired
- factsobject
Each fact a country's rules ask of an establishment that this one states, named as the rules name it, such as where its supplies are usually made.
GET /v1/jurisdictionslists each fact with whom it is asked of, its type and values. A fact asked of the legal company goes in the company facts, and a buyer's with the buyer. Each value is checked against the rule file that defines it. Left out or empty: none stated.
Response
A 200 answer carries these fields.
- establishmentIdstring (uuid)Required
The establishment
- versionintegerRequired
- kindstringRequired
head_office: where the company is seated; exactly one per company, and it stays the Head office.branch: a permanent establishment in another place.vat_registration: registered for VAT there, with no establishment. Null: not stated yet; a later version may state it.One ofhead_office,branch,vat_registration,null. - countrystringRequired
The country of the establishment, as an ISO 3166-1 code. It never changes: another country is another establishment.
- namestring or nullRequired
A name the company gives it, such as Berlin HQ.
- vatIdstring or nullRequired
Its VAT ID, starting with the prefix of an EU member state (Greece: EL). Spaces and dots are removed and letters made capitals. A new VAT ID is checked with VIES, the European Commission's VAT number check, and the answer is returned as
vies. - viesobject or nullRequired
VIES's answer about the VAT ID; null when there is no VAT ID.
Show 4 child fields
- statusstringRequired
unavailablemeans VIES could not answer, never that the number is invalid.One ofvalid,invalid,unavailable. - requestDatestring (date-time) or nullRequired
- namestring or nullRequired
- addressstring or nullRequired
- taxNumberstring or nullRequired
Its national tax number, such as a German Steuernummer.
- addressobject or nullRequired
Its postal address, as invoices state the seller's.
Show 4 child fields
- streetstring or null
- postcodestring or null
- citystring or null
- countrystring or null
An ISO 3166-1 country code.
- contactobject or nullRequired
Whom a buyer contacts about an invoice.
Show 3 child fields
- namestring or null
- phonestring or null
- emailstring or null
- electronicAddressobject or nullRequired
Where it receives e-invoices: the scheme and the address, both or neither.
Show 2 child fields
- schemestringRequired
A scheme of the official electronic address scheme list, such as 9930 or 0204.
- valuestringRequired
- factsobjectRequired
Each fact a country's rules ask of an establishment that this one states, named as the rules name it, such as where its supplies are usually made.
GET /v1/jurisdictionslists each fact with whom it is asked of, its type and values. A fact asked of the legal company goes in the company facts, and a buyer's with the buyer. Each value is checked against the rule file that defines it. Left out or empty: none stated.
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. |
/v1/establishments/{id}curl -X PUT https://api.certinvo.com/v1/establishments/$ESTABLISHMENT_ID \
-H "Authorization: Bearer $CERTINVO_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @body.jsonimport { readFile } from 'node:fs/promises'
const establishmentId = '3f0c2a5e-8d1b-4c7a-9e2f-6b5d4a3c2b1a'
const response = await fetch(`https://api.certinvo.com/v1/establishments/${establishmentId}`, {
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
establishment_id = "3f0c2a5e-8d1b-4c7a-9e2f-6b5d4a3c2b1a"
response = requests.put(
f"https://api.certinvo.com/v1/establishments/{establishment_id}",
headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}", "Content-Type": "application/json"},
data=open("body.json", "rb"),
)
print(response.status_code, response.text){
"establishmentId": "3f0c2a5e-8d1b-4c7a-9e2f-6b5d4a3c2b1a",
"version": 0,
"kind": "head_office",
"country": "string",
"name": "string",
"vatId": "string",
"vies": {
"status": "valid",
"requestDate": "2026-09-17T09:30:00Z",
"name": "string",
"address": "string"
},
"taxNumber": "string",
"address": {
"street": "string",
"postcode": "string",
"city": "string",
"country": "string"
},
"contact": {
"name": "string",
"phone": "string",
"email": "string"
},
"electronicAddress": {
"scheme": "string",
"value": "string"
},
"facts": {}
}