PUT
/v1/workspace/profileSaves the workspace’s company: its name, its address, and its VAT ID, or vatId: null for “we have no VAT ID”. Every field is trimmed; the country is the two-letter code, in capitals. A VAT ID is read and checked exactly as PUT /v1/company/vat-id does it, and VIES’s answer is stored there; nothing is blocked by it. Each save is a new version that names the person. The answer says the workspace’s state afterwards: a new workspace waits for review. Only a signed-in person can save it. An API key is refused with 401 session_required.
Request body
application/json, required
- namestringRequired
- vatIdstring or nullRequired
- addressobjectRequired
Show 4 child fields
- streetstringRequired
- postcodestringRequired
- citystringRequired
- countrystringRequired
Response
A 200 answer carries these fields.
- versionintegerRequired
- statestringRequiredOne of
profile,review,open.
Status codes
| Status | Meaning |
|---|---|
200 |
The saved version and the workspace’s state. |
400 |
The body is not a company (invalid_workspace_profile), 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 company (no_database). Sending the same request again will not help. |
PUT
/v1/workspace/profileExample
curl -X PUT https://api.certinvo.com/v1/workspace/profile \
-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/workspace/profile`, {
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/workspace/profile",
headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}", "Content-Type": "application/json"},
data=open("body.json", "rb"),
)
print(response.status_code, response.text)200
application/json
{
"version": 0,
"state": "profile"
}Success response