Portal Dashboard
Executive dashboard with KPIs, charts, monthly billing trends, and variation analysis for the provider portal.
GET
/apidev/v1/reports/portal/dashboardPermissionAPICLI_RPTPORTAL_DASHBOARD
Rate Limit10 req/min (sliding window)
Cache120s (2 min)
Overview
Returns aggregated data about invoice states, settlements, top providers, and variation trends. Designed to power executive dashboards with a single API call.
- Period presets — use
periodofor quick ranges (30d,90d,6m,1a) orcustomwith explicit dates - Provider filtering — optionally restrict to a single provider
- Rich KPIs — pending invoices, approval rate, average variation, accumulated difference, and more
- Chart-ready data — invoices by state, monthly billing comparison, variation trends, top providers, settlements by state
Date range limit (custom mode only)
Period presets (30d, 90d, 6m, 1a) have no extra restriction — 1a covers a full year. When sending custom dates (periodo=custom or omitted), both startdate and enddate are required and the range must not exceed 93 days.
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
periodo | string | No | 30d | Period preset: 30d, 90d, 6m, 1a, custom |
startdate | string | No | — | ISO 8601 start date. Required when periodo=custom |
enddate | string | No | — | ISO 8601 end date. Required when periodo=custom. Max range 93 days |
provider_id | string | No | All | Filter by single provider ID |
Code Examples
- cURL
- JavaScript
- Python
curl -s "https://$TENANT/apidev/v1/reports/portal/dashboard?periodo=90d" \
-H "Authorization: Bearer $TOKEN" \
-H "X-API-Key: $APIKEY" \
-H "tenant: $TENANT"
const response = await fetch(
`https://${TENANT}/apidev/v1/reports/portal/dashboard?periodo=90d`,
{ headers }
);
const { data } = await response.json();
console.log(`Pending invoices: ${data.kpis.pending_invoices}`);
response = requests.get(
f"https://{TENANT}/apidev/v1/reports/portal/dashboard",
headers=headers,
params={"periodo": "90d"},
)
result = response.json()
kpis = result["data"]["kpis"]
Response Fields
KPIs
| Field | Type | Description |
|---|---|---|
pending_invoices | number | Count of invoices pending review |
review_invoices | number | Count of invoices currently in review |
approval_rate | number | Approval rate as percentage (0–100) |
avg_variation | number | Average variation percentage between system and provider amounts |
active_settlements | number | Count of open/active settlements |
accumulated_difference | number | Net accumulated difference (system − provider) |
active_providers | number | Count of providers with activity in the period |
total_invoiced | number | Total system-invoiced amount |
Charts
| Field | Type | Description |
|---|---|---|
charts.invoices_by_state[].state | string | State code |
charts.invoices_by_state[].name | string | Human-readable state name |
charts.invoices_by_state[].count | number | Number of invoices in this state |
charts.invoices_by_state[].amount | number | Total amount for this state |
charts.monthly_billing[].month | string | Month in YYYY-MM format |
charts.monthly_billing[].system | number | System-calculated billing total |
charts.monthly_billing[].provider | number | Provider-reported billing total |
charts.variation_trend[].month | string | Month in YYYY-MM format |
charts.variation_trend[].variation_pct | number | Variation percentage for the month |
charts.top_providers[].provider_id | string | Provider identifier |
charts.top_providers[].provider_name | string | Provider display name |
charts.top_providers[].amount | number | Total invoiced amount |
charts.top_providers[].count | number | Number of invoices |
charts.settlements_by_state[].state | string | Settlement state code |
charts.settlements_by_state[].name | string | Human-readable settlement state name |
charts.settlements_by_state[].count | number | Number of settlements |
charts.settlements_by_state[].amount | number | Total settlement amount |
Example Response
{
"success": true,
"data": {
"kpis": {
"pending_invoices": 47,
"review_invoices": 12,
"approval_rate": 82.5,
"avg_variation": 3.2,
"active_settlements": 8,
"accumulated_difference": 15420.75,
"active_providers": 23,
"total_invoiced": 1285600.00
},
"charts": {
"invoices_by_state": [
{ "state": "100", "name": "Pending", "count": 47, "amount": 234500.00 },
{ "state": "101", "name": "In Review", "count": 12, "amount": 89200.00 },
{ "state": "102", "name": "Approved", "count": 185, "amount": 845300.00 },
{ "state": "103", "name": "Rejected", "count": 9, "amount": 42100.00 }
],
"monthly_billing": [
{ "month": "2026-01", "system": 412000.00, "provider": 418500.00 },
{ "month": "2026-02", "system": 438000.00, "provider": 441200.00 },
{ "month": "2026-03", "system": 435600.00, "provider": 440800.00 }
],
"variation_trend": [
{ "month": "2026-01", "variation_pct": 1.58 },
{ "month": "2026-02", "variation_pct": 0.73 },
{ "month": "2026-03", "variation_pct": 1.19 }
],
"top_providers": [
{ "provider_id": "504210987600", "provider_name": "Transporte Rápido S.A.", "amount": 245800.00, "count": 42 },
{ "provider_id": "504210987601", "provider_name": "Logística del Norte", "amount": 198300.00, "count": 35 },
{ "provider_id": "504210987602", "provider_name": "ServiFlota Express", "amount": 167500.00, "count": 28 }
],
"settlements_by_state": [
{ "state": "200", "name": "Open", "count": 5, "amount": 312400.00 },
{ "state": "201", "name": "In Review", "count": 3, "amount": 178200.00 },
{ "state": "202", "name": "Closed", "count": 18, "amount": 795000.00 }
]
}
}
}
Errors
| Code | HTTP | Description |
|---|---|---|
BAD_REQUEST | 400 | Missing required headers or invalid periodo value |
VALIDATION_ERROR | 400 | Invalid date format, custom date range exceeds 93 days |
INVALID_DATE_RANGE | 400 | Custom range exceeds 93 days or only one of startdate/enddate provided |
UNAUTHORIZED | 401 | Invalid or expired JWT / API Key |
FORBIDDEN | 403 | User lacks APICLI_RPTPORTAL_DASHBOARD permission |
RATE_LIMITED | 429 | Exceeded 10 req/min |
INTERNAL_ERROR | 500 | Unexpected server error |
Related
- Portal Invoices — Invoice management endpoints
- Portal Settlements — Settlement management endpoints
- Differences Report — Detailed system vs provider comparison
- Billing Report — Billing aggregated by provider