Skip to main content
GET
/
api
/
reports
Get Reports Overview
curl --request GET \
  --url https://api.example.com/api/reports
{
  "kpis": {
    "totalRevenue": 123,
    "totalClients": 123,
    "totalProducts": 123,
    "totalSales": 123
  },
  "revenueTrend": [
    {
      "month": "<string>",
      "revenue": 123
    }
  ],
  "paymentMethods": [
    {
      "name": "<string>",
      "value": 123
    }
  ],
  "topItems": [
    {
      "name": "<string>",
      "quantity": 123
    }
  ]
}

Overview

The reports overview endpoint provides aggregated analytics data for your beauty center operations. This endpoint returns key performance indicators (KPIs), revenue trends over the last 6 months, payment method distribution, and top-selling items.
This endpoint aggregates data from completed sales only (carts with status completed).

Authentication

This endpoint requires authentication. Include a valid Bearer token in the Authorization header.
Authorization: Bearer YOUR_TOKEN

Request

none
none
This endpoint does not accept any query parameters.

Example Request

curl --request GET \
  --url https://your-domain.com/api/reports \
  --header 'Authorization: Bearer YOUR_TOKEN'

Response

The endpoint returns a JSON object containing four main sections: KPIs, revenue trend, payment methods distribution, and top-selling items.
kpis
object
Key Performance Indicators summarizing overall business metrics
revenueTrend
array
Monthly revenue data for the last 6 months
paymentMethods
array
Distribution of payment methods used across all completed sales
topItems
array
Top 5 best-selling items by quantity sold

Example Response

{
  "kpis": {
    "totalRevenue": 45280.50,
    "totalClients": 127,
    "totalProducts": 89,
    "totalSales": 312
  },
  "revenueTrend": [
    {
      "month": "OCT",
      "revenue": 6420.75
    },
    {
      "month": "NOV",
      "revenue": 7815.30
    },
    {
      "month": "DIC",
      "revenue": 9125.40
    },
    {
      "month": "ENE",
      "revenue": 8240.15
    },
    {
      "month": "FEB",
      "revenue": 6890.25
    },
    {
      "month": "MAR",
      "revenue": 6788.65
    }
  ],
  "paymentMethods": [
    {
      "name": "Tarjeta",
      "value": 178
    },
    {
      "name": "Efectivo",
      "value": 94
    },
    {
      "name": "Mixto",
      "value": 32
    },
    {
      "name": "Transferencia",
      "value": 8
    }
  ],
  "topItems": [
    {
      "name": "Tratamiento Facial Hidratante",
      "quantity": 145
    },
    {
      "name": "Masaje Relajante",
      "quantity": 132
    },
    {
      "name": "Manicura Completa",
      "quantity": 118
    },
    {
      "name": "Depilación Láser",
      "quantity": 97
    },
    {
      "name": "Pack Belleza Premium",
      "quantity": 84
    }
  ]
}

Use Cases

Dashboard Analytics

Use this endpoint to populate your main dashboard with real-time business metrics and visualizations.

Business Intelligence

Analyze revenue trends, payment preferences, and product performance to make informed business decisions.

Performance Tracking

Monitor KPIs over time to track business growth and identify areas for improvement.

Build docs developers (and LLMs) love