Skip to main content

Billing Report

Billing aggregated by provider — total invoiced, provider amounts, payment status, and approval rates.

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

Overview

Aggregates billing data by provider for the specified date range. Each row represents one provider with totals for invoiced amounts, provider-reported amounts, payment status, and approval/rejection counts.

  • Per-provider summary — task count, invoiced totals, payment status, approval rate
  • Grand totals — aggregate across all providers in the response
  • Provider filtering — restrict to specific providers (up to 100)

Query Parameters

ParameterTypeRequiredDefaultDescription
startdatestringYesISO 8601 start date
enddatestringYesISO 8601 end date. Max range 93 days
providersstringNoAllComma-separated provider IDs. Max 100

Code Examples

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

Response Fields

Rows

FieldTypeDescription
provider_idstringProvider identifier
provider_namestringProvider display name
task_countnumberNumber of tasks/services in the period
total_invoicednumberTotal system-calculated invoiced amount
total_providernumberTotal provider-reported amount
total_paidnumberTotal amount already paid
pending_paymentnumberAmount pending payment
approval_ratenumberApproval rate as percentage (0–100)
approved_countnumberNumber of approved invoices
rejected_countnumberNumber of rejected invoices
review_countnumberNumber of invoices in review

Grand Total

FieldTypeDescription
total_invoicednumberSum of all providers' invoiced amounts
total_providernumberSum of all providers' reported amounts
total_paidnumberSum of all paid amounts
pending_paymentnumberSum of all pending payments
task_countnumberTotal task count across all providers

Example Response

{
"success": true,
"data": {
"rows": [
{
"provider_id": "504210987600",
"provider_name": "Transporte Rápido S.A.",
"task_count": 42,
"total_invoiced": 245800.00,
"total_provider": 251200.00,
"total_paid": 198400.00,
"pending_payment": 47400.00,
"approval_rate": 88.10,
"approved_count": 37,
"rejected_count": 2,
"review_count": 3
},
{
"provider_id": "504210987601",
"provider_name": "Logística del Norte",
"task_count": 35,
"total_invoiced": 198300.00,
"total_provider": 199100.00,
"total_paid": 178500.00,
"pending_payment": 19800.00,
"approval_rate": 94.29,
"approved_count": 33,
"rejected_count": 1,
"review_count": 1
},
{
"provider_id": "504210987602",
"provider_name": "ServiFlota Express",
"task_count": 28,
"total_invoiced": 167500.00,
"total_provider": 169800.00,
"total_paid": 142000.00,
"pending_payment": 25500.00,
"approval_rate": 85.71,
"approved_count": 24,
"rejected_count": 2,
"review_count": 2
}
],
"grand_total": {
"total_invoiced": 611600.00,
"total_provider": 620100.00,
"total_paid": 518900.00,
"pending_payment": 92700.00,
"task_count": 105
}
}
}

Errors

CodeHTTPDescription
BAD_REQUEST400Missing required headers or startdate/enddate
VALIDATION_ERROR400Date range exceeds 93 days, > 100 providers
UNAUTHORIZED401Invalid or expired JWT / API Key
FORBIDDEN403User lacks APICLI_RPTPORTAL_FACTURACION permission
RATE_LIMITED429Exceeded 10 req/min
INTERNAL_ERROR500Unexpected server error