Skip to main content

Portal Proveedores — Invoice Reports

The Portal Proveedores API exposes read-only report endpoints that allow API consumers to query billing summaries and invoice-level differences for providers within their tenant.

Operator-scoped JWT

All endpoints filter results by the ciaid (tenant/company ID) embedded in the JWT. Optional providers filter narrows down to specific provider IDs.


Billing Report

Retrieve a billing summary grouped by provider for a date range. Returns per-provider totals (invoiced, paid, pending) and a grand total across all providers.

GET/apidev/v1/reports/portal/billing
PermissionAPICLI_RPTPORTAL_FACTURACION
Rate Limit10 req/min (sliding window)
Cache300s

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
startdatestring (ISO 8601)YesStart date filter
enddatestring (ISO 8601)YesEnd date filter (max 93-day range)
providersstring|string[]NoComma-separated provider IDs to filter (max 100)

Response Fields — data.rows[]

FieldTypeDescription
provider_idstringProvider ID
provider_namestringProvider display name
task_countnumberNumber of tasks/services
total_invoicednumberSystem-calculated total invoiced
total_providernumberTotal entered by provider
total_paidnumberTotal amount paid
pending_paymentnumberPending payment amount
approval_ratenumberApproval rate (percentage)
approved_countnumberNumber of approved invoices
rejected_countnumberNumber of rejected invoices
review_countnumberNumber of invoices in review

Response Fields — data.grand_total

FieldTypeDescription
total_invoicednumberGrand total invoiced
total_providernumberGrand total entered by providers
total_paidnumberGrand total paid
pending_paymentnumberGrand total pending
task_countnumberGrand total task count

Code Examples

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

Response Example

{
"success": true,
"data": {
"rows": [
{
"provider_id": "5678",
"provider_name": "Taller Sanca",
"task_count": 42,
"total_invoiced": 125000.00,
"total_provider": 126200.00,
"total_paid": 98000.00,
"pending_payment": 27000.00,
"approval_rate": 85.7,
"approved_count": 36,
"rejected_count": 2,
"review_count": 4
}
],
"grand_total": {
"total_invoiced": 125000.00,
"total_provider": 126200.00,
"total_paid": 98000.00,
"pending_payment": 27000.00,
"task_count": 42
}
},
"meta": {
"total": 1
}
}
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

Differences Report

Retrieve a paginated list of invoices with their system vs. provider amount differences. Useful for auditing discrepancies.

GET/apidev/v1/reports/portal/differences
PermissionAPICLI_RPTPORTAL_DIFERENCIAS
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)
statesstring|string[]NoComma-separated state IDs (max 10)
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_amountnumber | nullProvider-declared amount
differencenumberAbsolute difference
difference_pctnumberDifference as percentage
state_codestring | nullInvoice state code
state_namestring | nullInvoice state name
provider_invoice_numberstring | nullProvider's invoice number
provider_invoice_datestring | nullProvider's invoice date

Response Fields — data.summary

FieldTypeDescription
total_systemnumberSum of system amounts
total_providernumberSum of provider amounts
net_differencenumberNet difference
avg_variation_pctnumberAverage variation percentage
total_invoicesnumberTotal invoice count
invoices_with_differencenumberInvoices with non-zero difference

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": 1100.00,
"difference": 2.00,
"difference_pct": 0.18,
"state_code": "PENDIENTE",
"state_name": "Pendiente",
"provider_invoice_number": "FAC-2026-001",
"provider_invoice_date": "2026-04-03"
}
],
"summary": {
"total_system": 1098.00,
"total_provider": 1100.00,
"net_difference": 2.00,
"avg_variation_pct": 0.18,
"total_invoices": 1,
"invoices_with_difference": 1
}
},
"meta": {
"total": 1,
"limit": 25,
"offset": 0
}
}

Errors

CodeHTTPDescription
INVALID_DATE_RANGE400Date range exceeds 93 days or dates are invalid