Skip to main content
GET
Get Trend Data

Authentication

This endpoint requires authentication. Include your access token in the Authorization header.

Query Parameters

string
Filter trends by profile ID
number
Year to retrieve trends for (defaults to current year)
enum
default:"año-actual"
View mode for the trend data:
  • año-actual: Only the selected year up to the current month (default)
  • últimos-12-meses: Rolling window of the last 12 months
  • año-completo: All 12 months of the selected year
  • comparar-anterior: Current year plus last 3 months of previous year
number
Cutoff month (1-12) to limit data up to a specific month. Automatically clamped to current month if in current year.
string
Filter by tax regime code

Response

Returns an array of monthly data points:
array
Array of monthly trend data points

Example Requests

Get last 12 months rolling window

Get full year with comparison

Get year up to specific month

Example Response

Error Responses

Period View Modes

año-actual (Default)

Returns only the selected year up to the current month (or mes_corte if specified). This is the most common view for tracking year-to-date performance. Example: For March 2026, returns data for January, February, and March 2026 only.

últimos-12-meses

Returns a rolling 12-month window ending at the current month. Useful for seeing trends without year boundaries. Example: For March 2026, returns April 2025 through March 2026.

año-completo

Returns all 12 months of the selected year, regardless of the current date. Months without data return zero values. Example: Returns January through December of the selected year.

comparar-anterior

Returns the current year plus the last 3 months of the previous year for comparison. Only works when viewing the current year. Example: For March 2026, returns October-December 2025 and January-March 2026.

Notes

  • The endpoint aggregates metrics data from multiple months into a single response
  • Data points with no activity will have zero values for all numeric fields
  • Trends use the same cash flow and accrual calculations as the metrics endpoint
  • The response is sorted chronologically (oldest to newest)
  • When using mes_corte in the current year, it automatically clamps to the current month
  • Trend data is useful for charts and visualizations showing financial performance over time