Skip to content

API reference

Add an establishment

Other routes API

POST/v1/establishments

Adds an establishment as its version 1, naming the key or the person. A company has exactly one Head office: a second one is refused. A VAT ID is checked with VIES once, and its answer is returned as vies; nothing is blocked by it.

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 of head_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/jurisdictions lists 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 201 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 of head_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

      unavailable means VIES could not answer, never that the number is invalid.

      One of valid, 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/jurisdictions lists 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
201 The establishment, as saved.
400 The establishment was refused (invalid_establishment). The message names the field. Nothing was saved.
401 No usable credential was sent (invalid_credentials).
409 The company has its Head office already (head_office_exists). Nothing was saved.
501 This deployment has no database, so it keeps no establishments (no_database). Sending the same request again will not help.
POST/v1/establishments
Example
curl -X POST https://api.certinvo.com/v1/establishments \
  -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/establishments`, {
  method: 'POST',
  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.post(
    "https://api.certinvo.com/v1/establishments",
    headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}", "Content-Type": "application/json"},
    data=open("body.json", "rb"),
)
print(response.status_code, response.text)
201
application/json
{
  "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": {}
}
Success response
POST
/v1/establishments
Add an establishment
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 POST "https://api.certinvo.com/v1/establishments" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "kind": "head_office",
  "country": "string",
  "name": "string",
  "vatId": "string",
  "taxNumber": "string",
  "address": {
    "street": "string",
    "postcode": "string",
    "city": "string...'
Response

No request sent yet

Configure parameters and click Send to view the response.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close