curl --request GET \
--url https://api.melso.ai/v1/companies/{company_id}/corporate-tax/{year} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/corporate-tax/{year}"
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}/corporate-tax/{year}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"year": 123,
"version": 123,
"result_before_tax": "121.00",
"adjustments_total": "121.00",
"capitalization_reserve": "121.00",
"losses_offset": "121.00",
"taxable_base": "121.00",
"rate": "<string>",
"gross_tax": "121.00",
"net_tax": "121.00",
"withholdings": "121.00",
"instalments_paid": "121.00",
"to_pay": "121.00",
"instalments": [
{
"period": "2026-Q3",
"amount": "121.00",
"deadline": "2023-12-25"
}
],
"review": [
"<string>"
]
}{
"error": "invalid token",
"code": "unauthorized",
"request_id": "req_01JAB3K9X2"
}{
"error": "Review and approve in the authenticated web application",
"code": "person_required",
"request_id": "req_01JAB3K9X2"
}Get the corporate tax
The year’s corporate tax (Impuesto sobre Sociedades, modelo 200) as Melso calculates it from the books and the saved inputs: result before tax, adjustments, capitalization reserve, negative bases offset, taxable base, rate, cuota íntegra and líquida, withholdings, instalments paid and what is left to pay, and the deferred tax; plus the modelo 202 instalments that build on it, with their deadlines.
curl --request GET \
--url https://api.melso.ai/v1/companies/{company_id}/corporate-tax/{year} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/corporate-tax/{year}"
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}/corporate-tax/{year}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"year": 123,
"version": 123,
"result_before_tax": "121.00",
"adjustments_total": "121.00",
"capitalization_reserve": "121.00",
"losses_offset": "121.00",
"taxable_base": "121.00",
"rate": "<string>",
"gross_tax": "121.00",
"net_tax": "121.00",
"withholdings": "121.00",
"instalments_paid": "121.00",
"to_pay": "121.00",
"instalments": [
{
"period": "2026-Q3",
"amount": "121.00",
"deadline": "2023-12-25"
}
],
"review": [
"<string>"
]
}{
"error": "invalid token",
"code": "unauthorized",
"request_id": "req_01JAB3K9X2"
}{
"error": "Review and approve in the authenticated web application",
"code": "person_required",
"request_id": "req_01JAB3K9X2"
}Authorizations
Your partner secret key, mk_live_… for real companies or mk_test_…
for test companies. Keep it on your servers. See
Authentication.
Path Parameters
The company's ID. Every company-scoped call works in exactly this company.
The fiscal year, such as 2025.
2000 <= x <= 2100Response
The calculation.
An amount in euros as a decimal string with two decimals, such as "121.00".
^-?[0-9]+\.[0-9]{2}$"121.00"
An amount in euros as a decimal string with two decimals, such as "121.00".
^-?[0-9]+\.[0-9]{2}$"121.00"
An amount in euros as a decimal string with two decimals, such as "121.00".
^-?[0-9]+\.[0-9]{2}$"121.00"
An amount in euros as a decimal string with two decimals, such as "121.00".
^-?[0-9]+\.[0-9]{2}$"121.00"
An amount in euros as a decimal string with two decimals, such as "121.00".
^-?[0-9]+\.[0-9]{2}$"121.00"
A decimal number as a string, such as "21" or "0.5".
^-?[0-9]{1,10}(\.[0-9]{1,6})?$An amount in euros as a decimal string with two decimals, such as "121.00".
^-?[0-9]+\.[0-9]{2}$"121.00"
An amount in euros as a decimal string with two decimals, such as "121.00".
^-?[0-9]+\.[0-9]{2}$"121.00"
An amount in euros as a decimal string with two decimals, such as "121.00".
^-?[0-9]+\.[0-9]{2}$"121.00"
An amount in euros as a decimal string with two decimals, such as "121.00".
^-?[0-9]+\.[0-9]{2}$"121.00"
An amount in euros as a decimal string with two decimals, such as "121.00".
^-?[0-9]+\.[0-9]{2}$"121.00"
The modelo 202 instalments of the next year that build on this result.
Show child attributes
Show child attributes