/v1/company/vat-idSaves the VAT ID of the company’s Head office and asks VIES whether it is valid. A company with no Head office yet gets one, in the company’s country. Spaces and dots are removed and letters are made capitals. The VAT ID must start with the prefix of an EU member state (Greece is EL), followed by 2 to 12 letters or digits with at least one digit; anything else is refused before VIES is asked. VIES’s answer is stored as the Head office’s next version that names the person, and returned. unavailable means VIES could not answer, never that the number is invalid. Nothing is blocked by the answer. Only a signed-in person can save it. An API key is refused with 401 session_required.
Request body
application/json, required
- vatIdstringRequired
Response
A 200 answer carries these fields.
- vatIdstring or nullRequired
The VAT ID as it was checked, without spaces or dots, for example
DE123456789. - statusstring or nullRequired
validandinvalidare what VIES said about the number.unavailablemeans VIES could not answer, never that the number is invalid.One ofvalid,invalid,unavailable,null. - requestDatestring (date-time) or nullRequired
When VIES answered
- namestring or nullRequired
The name VIES holds for the number. Null when VIES gives none; Germany never does.
- addressstring or nullRequired
The address VIES holds for the number
- versionintegerRequired
0 when no VAT ID was saved.
Status codes
| Status | Meaning |
|---|---|
200 |
The saved VAT ID with VIES’s answer. |
400 |
The body is not {"vatId": "..."}, or the VAT ID cannot be an EU VAT ID (invalid_vat_id). VIES was not asked and nothing was saved. |
401 |
No usable credential was sent (invalid_credentials), or an API key was used (session_required). |
501 |
This deployment has no database, so it keeps no VAT ID (no_database). Sending the same request again will not help. |
/v1/company/vat-idcurl -X PUT https://api.certinvo.com/v1/company/vat-id \
-H "Authorization: Bearer $CERTINVO_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @body.jsonimport { readFile } from 'node:fs/promises'
const response = await fetch(`https://api.certinvo.com/v1/company/vat-id`, {
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
response = requests.put(
"https://api.certinvo.com/v1/company/vat-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){
"vatId": "string",
"status": "valid",
"requestDate": "2026-09-17T09:30:00Z",
"name": "string",
"address": "string",
"version": 0
}