The reports endpoints give you aggregated analytics about your revenue, outstanding invoices, and per-client performance. All amounts are returned in cents.
Revenue report
GET /report/revenue
Returns revenue earned from paid invoices within a date range, broken down by period.
| Query parameter | Required | Description |
|---|---|---|
| from | Yes | Start date in ISO 8601 format (e.g. 2026-01-01) |
| to | Yes | End date in ISO 8601 format (e.g. 2026-03-31) |
| period | No | Grouping: monthly (default) or weekly |
| include_invoices | No | Set to true to include individual invoice records in the response |
curl "https://rebill-api-896466068278.africa-south1.run.app/report/revenue?from=2026-01-01&to=2026-03-31&period=monthly" \ -H "Authorization: Bearer sk_your_secret_key"
Response:
{
"total_revenue": 450000,
"invoice_count": 9,
"average_invoice": 50000,
"revenue_by_currency": {
"ZAR": 450000
},
"period_breakdown": [
{
"period": "2026-01",
"label": "Jan 2026",
"revenue": 150000,
"count": 3,
"amounts": { "ZAR": 150000 }
}
]
}| Response field | Type | Description |
|---|---|---|
| total_revenue | integer | Total revenue in cents (primary currency) |
| invoice_count | integer | Number of paid invoices |
| average_invoice | integer | Average invoice value in cents |
| revenue_by_currency | object | Revenue broken down by currency code |
| period_breakdown | array | Revenue grouped by period (month or week) |
| invoices | array | Individual paid invoices (only if include_invoices=true) |
Outstanding (aging) report
GET /report/outstanding
Returns outstanding invoice balances grouped into aging buckets: current (not yet due), 1โ30 days overdue, 31โ60 days, 61โ90 days, and 90+ days overdue.
curl https://rebill-api-896466068278.africa-south1.run.app/report/outstanding \ -H "Authorization: Bearer sk_your_secret_key"
Response:
{
"total_outstanding": 320000,
"buckets": [
{ "label": "Current", "days": "0", "amount": 150000, "count": 3 },
{ "label": "1-30 days", "days": "1-30", "amount": 80000, "count": 2 },
{ "label": "31-60 days", "days": "31-60","amount": 60000, "count": 1 },
{ "label": "61-90 days", "days": "61-90","amount": 30000, "count": 1 },
{ "label": "90+ days", "days": "90+", "amount": 0, "count": 0 }
]
}Client revenue report
GET /report/clients
Returns a breakdown of revenue earned per client, sorted by total revenue descending.
curl https://rebill-api-896466068278.africa-south1.run.app/report/clients \ -H "Authorization: Bearer sk_your_secret_key"
Response:
{
"clients": [
{
"client_id": "xyz789",
"client_name": "Acme Corp",
"total_revenue": 250000,
"invoice_count": 5
}
]
}Expense report
GET /report/expenses
Returns expense totals broken down by category and by period, with an optional profit summary comparing expenses against invoiced revenue.
| Query parameter | Required | Type | Description |
|---|---|---|---|
| from | Yes | date | Start of range (YYYY-MM-DD) |
| to | Yes | date | End of range (YYYY-MM-DD) |
| period | No | string | monthly (default), quarterly, or yearly |
| include_profit | No | boolean | Include a profit summary comparing revenue against expenses |
curl "https://rebill-api-896466068278.africa-south1.run.app/report/expenses?from=2026-01-01&to=2026-03-31&period=monthly&include_profit=true" \ -H "Authorization: Bearer sk_your_secret_key"
Response:
{
"total_expenses": 185000,
"expense_count": 12,
"by_category": [
{
"category_id": "cat-001",
"category_name": "Travel & Transport",
"total": 75000,
"count": 5
}
],
"period_breakdown": [
{
"period": "2026-01",
"label": "Jan 2026",
"total": 62000,
"count": 4
}
],
"profit_summary": {
"revenue": 450000,
"expenses": 185000,
"net_profit": 265000
}
}The profit_summary field is only present when include_profit=true. Revenue is calculated from invoices issued within the date range.