Skip to content

Companies

Companies represent the legal entities that send invoices through Mandato. Each company has a VAT number, a country, and can have one or more connections to government e-invoicing systems.

You must create at least one company before submitting invoices.

{
"id": "comp_a1b2c3d4e5f6",
"name": "TechVision SRL",
"vatNumber": "RO12345678",
"country": "RO",
"currency": "RON",
"isActive": true,
"createdAt": "2025-01-10T09:00:00.000Z"
}
FieldTypeDescription
idstringUnique company identifier
namestringLegal company name
vatNumberstringVAT identification number (with country prefix)
countrystringISO 3166-1 alpha-2 country code
currencystringDefault currency (ISO 4217)
isActivebooleanWhether the company is active
createdAtstringISO 8601 creation timestamp

POST /v1/companies

Registers a new company under your account. The VAT number format is validated against the country’s rules.

FieldTypeRequiredDescription
namestringYesLegal company name
vatNumberstringYesVAT number with country prefix (e.g., RO12345678)
countrystringYesISO 3166-1 alpha-2 code (RO, IT, BE, PL, FR, DE)
registrationNumberstringNoTrade register / company registration number
addressobjectNoCompany address (see below)
currencystringNoDefault currency (defaults to EUR)
contactsobjectNoContact details (see below)
FieldTypeRequiredDescription
streetstringNoStreet address
citystringNoCity
postalCodestringNoPostal code
countrystringYesISO 3166-1 alpha-2 country code
stateOrProvincestringNoState, province, or county
FieldTypeRequiredDescription
emailstringNoContact email address
phonestringNoContact phone number
Terminal window
curl -X POST https://api.getmandato.dev/v1/companies \
-H "Authorization: Bearer sk_test_your_key" \
-H "Content-Type: application/json" \
-d '{
"name": "TechVision SRL",
"vatNumber": "RO12345678",
"country": "RO",
"registrationNumber": "J40/1234/2020",
"address": {
"street": "Strada Exemplu 42",
"city": "Bucharest",
"postalCode": "010101",
"country": "RO"
},
"currency": "RON",
"contacts": {
"email": "billing@techvision.ro",
"phone": "+40712345678"
}
}'
{
"data": {
"id": "comp_a1b2c3d4e5f6",
"name": "TechVision SRL",
"vatNumber": "RO12345678",
"country": "RO",
"currency": "RON",
"isActive": true,
"createdAt": "2025-01-10T09:00:00.000Z"
}
}
StatusTypeDescription
400validation_errorInvalid VAT number format, missing fields, etc.
403limit_exceededMaximum company limit reached for your plan

GET /v1/companies

Returns all companies for your account.

Terminal window
curl https://api.getmandato.dev/v1/companies \
-H "Authorization: Bearer sk_test_your_key"
{
"data": [
{
"id": "comp_a1b2c3d4e5f6",
"name": "TechVision SRL",
"vatNumber": "RO12345678",
"country": "RO",
"currency": "RON",
"isActive": true,
"createdAt": "2025-01-10T09:00:00.000Z"
},
{
"id": "comp_f6e5d4c3b2a1",
"name": "TechVision Italia S.r.l.",
"vatNumber": "IT12345678901",
"country": "IT",
"currency": "EUR",
"isActive": true,
"createdAt": "2025-01-12T14:30:00.000Z"
}
]
}

GET /v1/companies/:id

Retrieves a single company by ID.

ParameterTypeDescription
idstringCompany ID (e.g., comp_a1b2c3d4e5f6)
Terminal window
curl https://api.getmandato.dev/v1/companies/comp_a1b2c3d4e5f6 \
-H "Authorization: Bearer sk_test_your_key"
{
"data": {
"id": "comp_a1b2c3d4e5f6",
"name": "TechVision SRL",
"vatNumber": "RO12345678",
"country": "RO",
"currency": "RON",
"isActive": true,
"createdAt": "2025-01-10T09:00:00.000Z"
}
}
StatusTypeDescription
404not_foundCompany not found or belongs to a different account

PATCH /v1/companies/:id

Updates a company’s mutable fields. The vatNumber and country cannot be changed after creation — create a new company instead.

ParameterTypeDescription
idstringCompany ID

All fields are optional. Only include the fields you want to update.

FieldTypeDescription
namestringUpdated company name
addressobjectUpdated address
currencystringUpdated default currency
contactsobjectUpdated contact details
Terminal window
curl -X PATCH https://api.getmandato.dev/v1/companies/comp_a1b2c3d4e5f6 \
-H "Authorization: Bearer sk_test_your_key" \
-H "Content-Type: application/json" \
-d '{
"name": "TechVision Romania SRL",
"contacts": {
"email": "invoices@techvision.ro"
}
}'
{
"data": {
"id": "comp_a1b2c3d4e5f6",
"name": "TechVision Romania SRL",
"vatNumber": "RO12345678",
"country": "RO",
"currency": "RON",
"isActive": true,
"createdAt": "2025-01-10T09:00:00.000Z"
}
}
StatusTypeDescription
400validation_errorInvalid field values
404not_foundCompany not found or belongs to a different account

DELETE /v1/companies/:id

Soft-deletes a company. The company is marked as inactive and can no longer be used for new invoices. Existing invoices are not affected.

ParameterTypeDescription
idstringCompany ID
Terminal window
curl -X DELETE https://api.getmandato.dev/v1/companies/comp_a1b2c3d4e5f6 \
-H "Authorization: Bearer sk_test_your_key"
{
"data": {
"id": "comp_a1b2c3d4e5f6",
"deleted": true
}
}
StatusTypeDescription
404not_foundCompany not found or belongs to a different account