Get the fiscal profile
curl --request GET \
--url https://api.melso.ai/v1/companies/{company_id}/fiscal-profile \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/fiscal-profile"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.melso.ai/v1/companies/{company_id}/fiscal-profile', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"fiscal_profile": {
"tax_id": "<string>",
"legal_name": "<string>",
"trade_name": "<string>",
"address": "<string>",
"postal_code": "<string>",
"city": "<string>",
"province": "<string>",
"tax_territory": "comun",
"activity_type": "profesional",
"activity_description": "<string>",
"iae_code": "<string>",
"activities": [
{
"iae_code": "<string>",
"id": "<string>",
"activity_type": "profesional",
"description": "<string>",
"vat_regime": "general",
"started_on": "2023-12-25",
"ended_on": "2023-12-25"
}
],
"client_types": [
"es_business"
],
"eu_operator": true,
"vat_regime": "general",
"vat_sii": true,
"vat_redeme": true,
"is_large_company": true,
"irpf_method": "directa_simplificada",
"irpf_retention_rate": 50,
"registration_status": "alta",
"registered_on": "<string>",
"invoice_series": "<string>",
"next_invoice_number": 2,
"iban": "<string>"
},
"deduced": [
"<string>"
],
"errors": [
{
"field": "<string>",
"error": "<string>"
}
],
"missing": [
"<string>"
]
}{
"error": "The API key is missing, revoked or invalid",
"code": "invalid_api_key",
"request_id": "req_8f14e45fceea167a5a36dedd"
}{
"error": "invoices is not available in this company",
"code": "tool_unavailable",
"next_action": "check_company_and_access",
"request_id": "req_8f14e45fceea167a5a36dedd"
}{
"error": "invoice not found",
"code": "not_found",
"next_action": "refresh_record",
"request_id": "req_8f14e45fceea167a5a36dedd"
}{
"error": "Too many requests: a key makes at most 600 a minute",
"code": "rate_limited",
"request_id": "req_8f14e45fceea167a5a36dedd"
}Fiscal profile
Get the fiscal profile
Returns the company’s fiscal profile and what Melso still needs.
GET
/
companies
/
{company_id}
/
fiscal-profile
Get the fiscal profile
curl --request GET \
--url https://api.melso.ai/v1/companies/{company_id}/fiscal-profile \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/fiscal-profile"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.melso.ai/v1/companies/{company_id}/fiscal-profile', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"fiscal_profile": {
"tax_id": "<string>",
"legal_name": "<string>",
"trade_name": "<string>",
"address": "<string>",
"postal_code": "<string>",
"city": "<string>",
"province": "<string>",
"tax_territory": "comun",
"activity_type": "profesional",
"activity_description": "<string>",
"iae_code": "<string>",
"activities": [
{
"iae_code": "<string>",
"id": "<string>",
"activity_type": "profesional",
"description": "<string>",
"vat_regime": "general",
"started_on": "2023-12-25",
"ended_on": "2023-12-25"
}
],
"client_types": [
"es_business"
],
"eu_operator": true,
"vat_regime": "general",
"vat_sii": true,
"vat_redeme": true,
"is_large_company": true,
"irpf_method": "directa_simplificada",
"irpf_retention_rate": 50,
"registration_status": "alta",
"registered_on": "<string>",
"invoice_series": "<string>",
"next_invoice_number": 2,
"iban": "<string>"
},
"deduced": [
"<string>"
],
"errors": [
{
"field": "<string>",
"error": "<string>"
}
],
"missing": [
"<string>"
]
}{
"error": "The API key is missing, revoked or invalid",
"code": "invalid_api_key",
"request_id": "req_8f14e45fceea167a5a36dedd"
}{
"error": "invoices is not available in this company",
"code": "tool_unavailable",
"next_action": "check_company_and_access",
"request_id": "req_8f14e45fceea167a5a36dedd"
}{
"error": "invoice not found",
"code": "not_found",
"next_action": "refresh_record",
"request_id": "req_8f14e45fceea167a5a36dedd"
}{
"error": "Too many requests: a key makes at most 600 a minute",
"code": "rate_limited",
"request_id": "req_8f14e45fceea167a5a36dedd"
}Beta. Melso does not serve this operation yet, and its fields can still change. See what is live.
missing lists the fields to send before Melso can do its taxes, such as iae_code, postal_code or certificate.Authorizations
companyApiKeypartnerApiKey
A company API key, mk_live_…, that the company's owner creates in the
Melso app under Settings, Connect your AI, API keys. It works in that
one company with the owner's authority. Test keys (mk_test_…) are not
issued. Keep the key on your servers. See
Authentication.
Path Parameters
Response
The fiscal profile.