Skip to main content

Portal Proveedores — Dashboard & Tolerance

Aggregated dashboard metrics and tolerance analysis endpoints for the supplier portal.

Operator-scoped JWT

All endpoints filter results by the ciaid (tenant/company ID) embedded in the JWT. The Dashboard endpoint can optionally filter by a single provider.


Dashboard Report

Retrieve aggregated KPIs and chart data for the portal dashboard. Includes invoice/settlement counts, billing trends, variation analysis, and top providers.

GET/apidev/v1/reports/portal/dashboard
PermissionAPICLI_RPTPORTAL_DASHBOARD
Rate Limit10 req/min (sliding window)
Cache120s

Request Headers

Every request to a protected endpoint requires these headers:

HeaderRequiredDescription
AuthorizationYesBearer token obtained from the Login endpoint. Format: Bearer <token>
X-API-KeyYesCompany integration key provided during onboarding. Format: gtk_xxx...
tenantYesYour company hostname (e.g., yourcompany.geotareas.com)
Content-TypeConditionalapplication/json — required for POST and PUT requests

Query Parameters

ParameterTypeRequiredDefaultDescription
periodostringNocustomPreset period: 30d, 90d, 6m, 1a, custom
startdatestring (ISO 8601)NoStart date (required when periodo=custom)
enddatestring (ISO 8601)NoEnd date (required when periodo=custom)
provider_idstringNoSingle provider ID to scope the dashboard

Response Fields — data.kpis

FieldTypeDescription
pending_invoicesnumberCount of pending invoices
review_invoicesnumberCount of invoices in review
approval_ratenumberOverall approval rate (percentage)
avg_variationnumberAverage variation between system and provider amounts
active_settlementsnumberCount of active/open settlements
accumulated_differencenumberAccumulated net difference
active_providersnumberCount of active providers
total_invoicednumberTotal invoiced amount

Response Fields — data.charts

FieldTypeDescription
invoices_by_state[]array{ state, name, count, amount } — invoices grouped by state
monthly_billing[]array{ month, system, provider } — monthly billing comparison
variation_trend[]array{ month, variation_pct } — monthly variation trend
top_providers[]array{ provider_id, provider_name, amount, count } — top providers by amount
settlements_by_state[]array{ state, name, count, amount } — settlements grouped by state

Code Examples

curl -s -X GET "https://api.example.com/apidev/v1/reports/portal/dashboard?periodo=30d" \
-H "Authorization: Bearer $TOKEN" \
-H "X-API-Key: $APIKEY" \
-H "tenant: $TENANT"

Response Example

{
"success": true,
"data": {
"kpis": {
"pending_invoices": 15,
"review_invoices": 3,
"approval_rate": 87.5,
"avg_variation": 2.3,
"active_settlements": 2,
"accumulated_difference": 4500.00,
"active_providers": 8,
"total_invoiced": 250000.00
},
"charts": {
"invoices_by_state": [
{ "state": "PENDIENTE", "name": "Pendiente", "count": 15, "amount": 45000.00 },
{ "state": "CONCILIADO", "name": "Conciliado", "count": 120, "amount": 180000.00 }
],
"monthly_billing": [
{ "month": "2026-01", "system": 80000.00, "provider": 81200.00 },
{ "month": "2026-02", "system": 85000.00, "provider": 86100.00 }
],
"variation_trend": [
{ "month": "2026-01", "variation_pct": 1.5 },
{ "month": "2026-02", "variation_pct": 1.3 }
],
"top_providers": [
{ "provider_id": "5678", "provider_name": "Taller Sanca", "amount": 95000.00, "count": 42 }
],
"settlements_by_state": [
{ "state": "ABIERTA", "name": "Abierta", "count": 2, "amount": 12000.00 },
{ "state": "CERRADA", "name": "Cerrada", "count": 5, "amount": 85000.00 }
]
}
},
"meta": {}
}
CodeHTTP StatusDescriptionResolution
VALIDATION_ERROR400Request body or query parameters failed validationCheck the error.details field for specific validation failures
UNAUTHORIZED401Missing, expired, or invalid JWT token or API keyRe-authenticate via Login to get a fresh token
RATE_LIMITED429Too many requests — rate limit exceededWait until the Retry-After header time elapses. See Rate Limits
INTERNAL_ERROR500Unexpected server errorRetry after a brief delay. If persistent, contact support

Tolerance Report

Retrieve a paginated list of invoices with their tolerance analysis. Shows whether each invoice's provider amount falls within the configured tolerance for the provider.

GET/apidev/v1/reports/portal/tolerance
PermissionAPICLI_RPTPORTAL_TOLERANCIA
Rate Limit10 req/min (sliding window)
Cache300s

Query Parameters

ParameterTypeRequiredDefaultDescription
startdatestring (ISO 8601)YesStart date filter
enddatestring (ISO 8601)YesEnd date filter (max 93-day range)
providersstring|string[]NoComma-separated provider IDs (max 100)
anomalies_onlybooleanNoIf true, return only invoices outside tolerance
limitintegerNo25Records per page. Min: 1, Max: 100
offsetintegerNo0Number of records to skip

Response Fields — data.rows[]

FieldTypeDescription
invoice_idstringInvoice unique identifier
provider_idstringProvider ID
provider_namestringProvider display name
service_idstringRelated service/task ID
service_numberstringService display number
invoice_datestringInvoice date
system_amountnumberSystem-calculated amount
provider_amountnumberProvider-declared amount
differencenumberAbsolute difference
deviation_pctnumberDeviation as percentage
state_idnumber | nullInvoice state ID
state_namestring | nullInvoice state name
tolerance_configuredstringTolerance configuration description
tolerance_typestringTolerance type (e.g. PERCENTAGE, FIXED)
tolerance_valuenumberConfigured tolerance value
tolerance_originstringWhere the tolerance comes from
resultstringTolerance evaluation result
within_tolerancebooleanWhether the invoice is within tolerance

Response Fields — data.summary

FieldTypeDescription
total_invoicesnumberTotal invoice count
auto_approvednumberAuto-approved count
in_reviewnumberIn-review count
rejectednumberRejected count
avg_deviation_pctnumberAverage deviation percentage
providers_with_anomaliesnumberProviders with out-of-tolerance invoices

Code Examples

curl -s -X GET "https://api.example.com/apidev/v1/reports/portal/tolerance?startdate=2026-03-01&enddate=2026-03-31&anomalies_only=true" \
-H "Authorization: Bearer $TOKEN" \
-H "X-API-Key: $APIKEY" \
-H "tenant: $TENANT"

Response Example

{
"success": true,
"data": {
"rows": [
{
"invoice_id": "7234567890123456789",
"provider_id": "5678",
"provider_name": "Taller Sanca",
"service_id": "103878",
"service_number": "SRV-2026-0042",
"invoice_date": "2026-04-03T15:02:00",
"system_amount": 1098.00,
"provider_amount": 1500.00,
"difference": 402.00,
"deviation_pct": 36.61,
"state_id": 1,
"state_name": "Pendiente",
"tolerance_configured": "5%",
"tolerance_type": "PERCENTAGE",
"tolerance_value": 5.0,
"tolerance_origin": "ORIGIN_DEFAULT",
"result": "EXCEEDED",
"within_tolerance": false
}
],
"summary": {
"total_invoices": 1,
"auto_approved": 0,
"in_review": 0,
"rejected": 1,
"avg_deviation_pct": 36.61,
"providers_with_anomalies": 1
}
},
"meta": {
"total": 1,
"limit": 25,
"offset": 0
}
}

Errors

CodeHTTPDescription
INVALID_DATE_RANGE400Date range exceeds 93 days or dates are invalid