List journal entries
curl --request GET \
--url https://api.melso.ai/v1/companies/{company_id}/journal-entries \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/journal-entries"
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}/journal-entries', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entry_date": "2023-12-25",
"number": "<string>",
"concept": "<string>",
"kind": "normal",
"source_type": "expense",
"source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lines": [
{
"account": "<string>",
"account_name": "<string>",
"concept": "<string>",
"debit": "121.00",
"credit": "121.00"
}
]
}
],
"next_cursor": "<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"
}Accounting
List journal entries
The company’s journal (libro diario) in date order, as Melso keeps it from its expenses, income, invoices, reconciliations and depreciation, plus the entries imported from earlier books.
GET
/
companies
/
{company_id}
/
journal-entries
List journal entries
curl --request GET \
--url https://api.melso.ai/v1/companies/{company_id}/journal-entries \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/journal-entries"
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}/journal-entries', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entry_date": "2023-12-25",
"number": "<string>",
"concept": "<string>",
"kind": "normal",
"source_type": "expense",
"source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lines": [
{
"account": "<string>",
"account_name": "<string>",
"concept": "<string>",
"debit": "121.00",
"credit": "121.00"
}
]
}
],
"next_cursor": "<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"
}Live capability. Melso runs this in production today. Partner keys reach it once your partner account is enabled. See Availability.
account, only the
entries that move accounts starting with those digits: that account’s
ledger (libro mayor).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
From this date, inclusive.
Up to this date, inclusive.
An account or its first digits, such as 572.
Pattern:
^[0-9]{1,12}$Required range:
1 <= x <= 500The next_cursor of the previous page.