Goal
Understand the health and shape of your validation traffic: success rate, latency, volume trends, and which counterparties appear most frequently. Use this data to identify error patterns, flag unusual traffic, and optimize retry policies.
Prerequisites
- An active API key (
mxcep_…) withinsights:read_self.
Steps
1. Start with the KPI overview
GET /v1/insights/overview provides a snapshot of the key indicators for the last 24–48 hours: total validations, today's and yesterday's counts, success rate, and average latency.
curl 'https://api.example.com/v1/insights/overview' \
-H 'Authorization: Bearer mxcep_••••'{
"data": {
"type": "insights_overview",
"attributes": {
"total_validations": 4821,
"today": 143,
"yesterday": 118,
"success_rate_pct": 91.4,
"avg_latency_ms_24h": 1320,
"verdict_distribution_7d": {
"valid": 87.2,
"not_found": 9.1,
"cep_unavailable": 2.5,
"error": 1.2
}
}
}
}2. Drill into time-series trends
GET /v1/insights/trends returns bucketed time-series data. Choose the time range and metric:
| range | Bucket size |
|---|---|
24h | Per hour |
7d | Per day |
30d | Per day |
90d | Per week (weeks start on Monday) |
Volume trend (last 30 days):
curl 'https://api.example.com/v1/insights/trends?range=30d&metric=volume' \
-H 'Authorization: Bearer mxcep_••••'Latency percentiles (last 7 days):
curl 'https://api.example.com/v1/insights/trends?range=7d&metric=latency' \
-H 'Authorization: Bearer mxcep_••••'The latency metric returns p50, p95, and p99 per bucket. A rising p99 while p50 stays stable indicates intermittent Banxico upstream slowness rather than a systematic issue.
3. Identify top banks by volume or errors
GET /v1/insights/top-banks lists the most frequent banks in your validations over the last 30 days:
# Top 10 banks by volume
curl 'https://api.example.com/v1/insights/top-banks?metric=volume&limit=10' \
-H 'Authorization: Bearer mxcep_••••'
# Top banks by error count — useful for flagging problematic routes
curl 'https://api.example.com/v1/insights/top-banks?metric=errors&limit=10' \
-H 'Authorization: Bearer mxcep_••••'4. Identify top beneficiaries
GET /v1/insights/top-beneficiaries lists the accounts that appear most frequently as destinations in your validations:
curl 'https://api.example.com/v1/insights/top-beneficiaries' \
-H 'Authorization: Bearer mxcep_••••'What's next
- Export financial statements for the same period: see Generate finance reports.
- Check quota consumption alongside volume trends: see Monitor usage.