API reference › Finance › Overview, clients and work items
Get service revenue chart data for the authenticated provider
GET /v1/finance/provider/service-revenue-chart
- Scope
finance:read- Roles
- admin, service-provider, scheduler
Retrieves service revenue data grouped by service type (ASL, CART, etc.) over time for the authenticated provider. Only accessible by users with service-provider role. Returns data formatted for ApexCharts multi-series line chart display.
Parameters
Query parameters
| Name | Type | Description |
|---|---|---|
period | string | Time period: all, today, this_week, this_month, daily, weekly, monthly. Default: monthly One of: |
startDate | string (date) | Start date for date range (YYYY-MM-DD) Example |
endDate | string (date) | End date for date range (YYYY-MM-DD) Example |
Every call also sends Authorization and X-Tenant-ID; see Getting started.
Example request
curl "https://api.fetchfido.ai/v1/finance/provider/service-revenue-chart" \
-H "Authorization: Bearer $FIDO_API_KEY" \
-H "X-Tenant-ID: $FIDO_TENANT_ID"Try it
Responses
200 Service revenue chart data retrieved successfully
Service revenue chart data retrieved successfully
{
"success": true,
"message": "Service revenue chart data retrieved successfully",
"data": {
"chart": {
"series": [
{
"name": "ASL",
"data": [
100,
150,
200,
290,
250,
240,
300
]
}
],
"categories": [
"Jan 2026",
"Feb 2026",
"Mar 2026",
"Apr 2026",
"May 2026",
"Jun 2026",
"Jul 2026"
]
}
}
}Response fields (8)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
data | object | |
data.chart | object | |
data.chart.series | array of object | |
data.chart.series[].name | string | Example |
data.chart.series[].data | array of number | |
data.chart.categories | array of string |
400 Bad request
Invalid parameters
{
"success": false,
"message": "Invalid period parameter"
}Response fields (2)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
401 Not signed in
Missing, invalid or expired API key.
{
"success": false,
"message": "Invalid API key. Org and user tier keys must send an X-Tenant-ID header naming the organization the key was issued for.",
"errors": null,
"code": "API_KEY_MISSING"
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Machine-readable reason, for branching on in client code. One of: |
403 Not allowed
Forbidden - user is not a provider
{
"success": false,
"message": "You don't have permission to access this endpoint. This API key is missing the 'finance:read' scope.",
"errors": null,
"code": ""
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Always empty on this status. Example |
429 Too many requests
Rate limit exceeded. See Retry-After.
{
"success": false,
"message": "You've exceeded this API key's rate limit of 120 requests per minute. Try again in 37 seconds.",
"errors": null,
"code": "RATE_LIMITED"
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Machine-readable reason, for branching on in client code. One of: |
500 Server error
Unexpected error
{
"success": false,
"message": "An unexpected error occurred."
}Response fields (2)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |