Get Metrics
Invoices
Get Metrics
Retrieve financial metrics for a specific period
GET
Get Metrics
Documentation Index
Fetch the complete documentation index at: https://docs.contafy.com.mx/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
This endpoint requires authentication. Include your access token in the Authorization header.Query Parameters
Filter metrics by profile ID
Month to retrieve metrics for (1-12)
Year to retrieve metrics for
Filter by tax regime code
Response
Period information
Cash flow metrics (base de flujo - actual payments)
Accrual metrics (base devengada - invoice date basis)
Tax metrics
Pending amounts
Example Request
Example Response
Error Responses
401 Unauthorized
404 Not Found
When the user has no subscription or no data for the specified period, the endpoint returns default metrics with all values set to zero.
500 Internal Server Error
Notes
- Metrics are calculated based on two accounting methods:
- Flujo (Cash basis): Based on actual payment dates from payment complements
- Devengado (Accrual basis): Based on invoice dates
- Tax metrics include both collected/paid amounts and accrued amounts
- If no period parameters are provided, metrics for the current month are returned
- The endpoint handles missing data gracefully by returning zero values