Get the trial balance
curl --request GET \
--url https://api.melso.ai/v1/companies/{company_id}/reports/trial-balance \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/reports/trial-balance"
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}/reports/trial-balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"year": 123,
"from": "2023-12-25",
"to": "2023-12-25",
"accounts": [
{
"account": "<string>",
"name": "<string>",
"opening": "121.00",
"debit": "121.00",
"credit": "121.00",
"closing": "121.00"
}
],
"debit": "121.00",
"credit": "121.00"
}{
"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"
}Accounting
Get the trial balance
The year’s trial balance (balance de sumas y saldos) from 1 January to to, by account.
GET
/
companies
/
{company_id}
/
reports
/
trial-balance
Get the trial balance
curl --request GET \
--url https://api.melso.ai/v1/companies/{company_id}/reports/trial-balance \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/reports/trial-balance"
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}/reports/trial-balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"year": 123,
"from": "2023-12-25",
"to": "2023-12-25",
"accounts": [
{
"account": "<string>",
"name": "<string>",
"opening": "121.00",
"debit": "121.00",
"credit": "121.00",
"closing": "121.00"
}
],
"debit": "121.00",
"credit": "121.00"
}{
"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"
}Live capability. Melso runs this in production today. Partner keys reach it once your partner account is enabled. See Availability.
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.
Query Parameters
Required range:
2000 <= x <= 2100Group accounts by this many digits. Defaults to 4.
Required range:
0 <= x <= 12Only accounts starting with these digits, in full.
Response
The trial balance.
Show child attributes
Show child attributes
An amount in euros as a decimal string with two decimals, such as "121.00".
Pattern:
^-?[0-9]+\.[0-9]{2}$Example:
"121.00"
An amount in euros as a decimal string with two decimals, such as "121.00".
Pattern:
^-?[0-9]+\.[0-9]{2}$Example:
"121.00"