Charts



Base URL

https://api.rentila.com/landlord/charts

Endpoints

1. Get Charts

Endpoint:
GET https://api.rentila.com/landlord/charts
Description: Retrieves the income and expense data for the last year and last 5 years.
Response Example:
{
"code": 200,
"status": "success",
"data": {
"ChartLastYear": {
"month_names": ["Jan", "Feb", "Mar", "Apr"],
"month_labels": ["Jan 24", "Feb 24", "Mar 24", "Apr 24"],
"incomes_data": [1000, 1200, 1100, 1300],
"expenses_data": [500, 600, 550, 700]
},
"ChartLast5Years": {
"labels": [2019, 2020, 2021, 2022, 2023],
"income": [12000, 15000, 14000, 16000, 18000],
"expenses": [7000, 8000, 7500, 9000, 9500]
}
},
"message": "OK"
}


2. Get Income and Expenses (Last Year)

Endpoint:
GET https://api.rentila.com/landlord/charts/incomeexpense
Description: Retrieves detailed income and expense data for the last 12 months.
Query Parameters:
  • year (optional): Year for which data is required.
  • building_id (optional): Filter data for a specific building.
  • property_id (optional): Filter data for a specific property.
  • lease_id (optional): Filter data for a specific lease.
Response Example:
{
"code": 200,
"status": "success",
"data": {
"month_names": ["Jan", "Feb", "Mar", "Apr"],
"month_labels": ["Jan 24", "Feb 24", "Mar 24", "Apr 24"],
"incomes_data": [1000, 1200, 1100, 1300],
"expenses_data": [500, 600, 550, 700]
},
"message": "OK"
}


3. Get Income and Expenses (Last 5 Years)

Endpoint:
GET https://api.rentila.com/landlord/charts/incomeexpense5year
Description: Retrieves aggregated income and expense data for the last 5 years.
Query Parameters:
  • p (optional): Property ID or Building ID filter.
Response Example:
{
"code": 200,
"status": "success",
"data": {
"labels": [2019, 2020, 2021, 2022, 2023],
"income": [12000, 15000, 14000, 16000, 18000],
"expenses": [7000, 8000, 7500, 9000, 9500]
},
"message": "OK"
}