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

NameTypeDescription
periodstring

Time period: all, today, this_week, this_month, daily, weekly, monthly. Default: monthly

One of: all, today, this_week, this_month, daily, weekly, monthly. Default "monthly".

startDatestring (date)

Start date for date range (YYYY-MM-DD)

Example 2026-01-01.

endDatestring (date)

End date for date range (YYYY-MM-DD)

Example 2026-07-31.

Every call also sends Authorization and X-Tenant-ID; see Getting started.

Example request

Shell
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

JSON
{
  "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)
FieldTypeDescription
successboolean

Example true.

messagestring

Example Service revenue chart data retrieved successfully.

dataobject
data.chartobject
data.chart.seriesarray of object
data.chart.series[].namestring

Example ASL.

data.chart.series[].dataarray of number
data.chart.categoriesarray of string
400 Bad request

Invalid parameters

JSON
{
  "success": false,
  "message": "Invalid period parameter"
}
Response fields (2)
FieldTypeDescription
successboolean

Example false.

messagestring

Example Invalid period parameter.

401 Not signed in

Missing, invalid or expired API key.

JSON
{
  "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)
FieldTypeDescription
successboolean

Example false.

messagestring

Example Invalid API key. Org and user tier keys must send an X-Tenant-ID header naming the organization the key was issued for..

errorsany or null

Null on this status.

codestring

Machine-readable reason, for branching on in client code.

One of: API_KEY_MISSING, API_KEY_INVALID, API_KEY_EXPIRED. Example API_KEY_MISSING.

403 Not allowed

Forbidden - user is not a provider

JSON
{
  "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)
FieldTypeDescription
successboolean

Example false.

messagestring

Example You don't have permission to access this endpoint. This API key is missing the 'finance:read' scope..

errorsany or null

Null on this status.

codestring

Always empty on this status.

Example .

429 Too many requests

Rate limit exceeded. See Retry-After.

JSON
{
  "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)
FieldTypeDescription
successboolean

Example false.

messagestring

Example You've exceeded this API key's rate limit of 120 requests per minute. Try again in 37 seconds..

errorsany or null

Null on this status.

codestring

Machine-readable reason, for branching on in client code.

One of: RATE_LIMITED. Example RATE_LIMITED.

500 Server error

Unexpected error

JSON
{
  "success": false,
  "message": "An unexpected error occurred."
}
Response fields (2)
FieldTypeDescription
successboolean

Example false.

messagestring

Example An unexpected error occurred..