# Performance Expense Stats

> Get expense performance comparison between the current and previous month, broken down by expense type.

Source: https://docs.fleetwork.vn/en/dashboard/dashboard-performance-expense-stat

**GET** `https://live.fleetwork.vn/api/v1/workspace/dashboard/performance-expense-stat`

The month is derived from the `toTime` parameter.

## Query Parameters

| Parameter  | Required     | Type | Description                              |
| ---------- | ------------ | ---- | ---------------------------------------- |
| `fromTime` | **Required** | long | Used to resolve date context (Unix ms)   |
| `toTime`   | **Required** | long | Target month derived from this (Unix ms) |

## Example

### Request

```bash
curl -X GET \
  "https://live.fleetwork.vn/api/v1/workspace/dashboard/performance-expense-stat?fromTime=1711900800000&toTime=1714492800000" \
  -H "API-KEY: <your-key>"
```

### Response

```json
{
  "code": "OK",
  "message": null,
  "data": {
    "currentMonth": {
      "year": 2026,
      "month": 4,
      "totalCost": 4200000.0
    },
    "previousMonth": {
      "year": 2026,
      "month": 3,
      "totalCost": 3750000.0
    },
    "totalCostChange": 450000.0,
    "totalCostChangePercent": 12.0,
    "expenseTypes": [
      {
        "expenseType": "Fuel",
        "currentCost": 2100000.0,
        "previousCost": 1900000.0,
        "costChange": 200000.0,
        "costChangePercent": 10.53
      },
      {
        "expenseType": "Repair",
        "currentCost": 1500000.0,
        "previousCost": 1350000.0,
        "costChange": 150000.0,
        "costChangePercent": 11.11
      },
      {
        "expenseType": "Injury",
        "currentCost": 300000.0,
        "previousCost": 250000.0,
        "costChange": 50000.0,
        "costChangePercent": 20.0
      },
      {
        "expenseType": "Other",
        "currentCost": 300000.0,
        "previousCost": 250000.0,
        "costChange": 50000.0,
        "costChangePercent": 20.0
      }
    ]
  }
}
```
