> ## Documentation Index
> Fetch the complete documentation index at: https://learn.nexudus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Team Metrics

> Returns monthly financial and usage metrics for a team, including invoiced amounts, bookings, and check-in time.

# Get Team Metrics

Returns an array of monthly metric snapshots for a team. Each entry covers one calendar month and includes invoiced amounts, booking and check-in minutes, revenue, and outstanding charges. Used on the team dashboard to render trend charts.

## Authentication

Requires a valid customer bearer token. The customer must be a team administrator of the specified team.

## Path Parameters

**teamId** `number` *required*

Numeric identifier of the team. Returned as `Id` from [`GET /api/public/teams/my`](https://learn.nexudus.com/api/endpoints/teams/list-teams).

## Query Parameters

**\_shape** `string`

Comma-separated list of field paths to include in the response. When provided, only the
specified fields are returned — useful for reducing payload size. Supports nested paths
using dot notation.

## Response

**Metrics** `TeamMetric[]` *required*

Array of monthly metric snapshots, ordered chronologically.

### Per-Month Fields

**Metrics\[].Id** `number`

Unique identifier for the metric record.

**Metrics\[].MonthDate** `string`

ISO 8601 date representing the first day of the month this record covers.

**Metrics\[].CurrencyCode** `string`

ISO 4217 currency code for all monetary values in this record.

**Metrics\[].InvoicedAmount** `number`

Total invoiced amount for the member in this month.

**Metrics\[].TeamInvoicedAmount** `number`

Total invoiced amount across the entire team in this month.

**Metrics\[].Revenue** `number`

Total revenue for the team in this month.

**Metrics\[].CheckingMinutes** `number`

Member's checked-in time in minutes.

**Metrics\[].TeamCheckingMinutes** `number`

Total team checked-in time in minutes.

**Metrics\[].BookingMinutes** `number`

Member's booked time in minutes.

**Metrics\[].TeamBookingMinutes** `number`

Total team booked time in minutes.

**Metrics\[].TotalBookings** `number`

Total number of bookings.

**Metrics\[].TotalTariffs** `number`

Total number of active membership plans.

**Metrics\[].TotalOther** `number`

Total other charges.

**Metrics\[].TimePasses** `number`

Number of time passes used.

**Metrics\[].Bookings** `number`

Revenue from bookings.

**Metrics\[].TotalUnpaid** `number`

Total unpaid amount.

**Metrics\[].TotalUnpaidNexKiosk** `number`

Total unpaid NexKiosk charges.

**Metrics\[].TotalDue** `number`

Total amount currently due.

**Metrics\[].UnPaidAttendees** `number`

Unpaid event attendee charges.

**Metrics\[].NotInvoicedCharges** `number`

Total charges not yet invoiced.

**Metrics\[].UnInvoicedCharges** `number`

Uninvoiced miscellaneous charges.

**Metrics\[].UnInvoicedProducts** `number`

Uninvoiced product charges.

**Metrics\[].UnInvoicedTimePasses** `number`

Uninvoiced time pass charges.

**Metrics\[].UnInvoicedExtraServices** `number`

Uninvoiced extra service charges.

**Metrics\[].NextInvoice** `string | null`

ISO 8601 datetime of the next scheduled invoice, or `null` if none is scheduled.

**Metrics\[].DasySinceLastAccess** `number`

Days since the member's last portal access. Note the typo (`Dasy`) — it is preserved as-is in the API.

## Examples

### Fetch team metrics

```http theme={null}
GET /api/public/teams/55/metrics
Authorization: Bearer {token}
```

```json theme={null}
{
  "Metrics": [
    {
      "Id": 1001,
      "MonthDate": "2025-01-01T00:00:00",
      "CurrencyCode": "GBP",
      "InvoicedAmount": 1250.0,
      "TeamInvoicedAmount": 8500.0,
      "Revenue": 8500.0,
      "CheckingMinutes": 2400,
      "TeamCheckingMinutes": 18000,
      "BookingMinutes": 480,
      "TeamBookingMinutes": 3200,
      "TotalBookings": 15,
      "TotalTariffs": 12,
      "TotalOther": 0,
      "TimePasses": 3,
      "Bookings": 450.0,
      "TotalUnpaid": 200.0,
      "TotalUnpaidNexKiosk": 0,
      "TotalDue": 200.0,
      "UnPaidAttendees": 0,
      "NotInvoicedCharges": 50.0,
      "UnInvoicedCharges": 25.0,
      "UnInvoicedProducts": 15.0,
      "UnInvoicedTimePasses": 10.0,
      "UnInvoicedExtraServices": 0,
      "NextInvoice": "2025-02-01T00:00:00",
      "DasySinceLastAccess": 2
    }
  ]
}
```

## TypeScript Integration

```typescript theme={null}
import { endpoints } from '@/api/endpoints'
import { TeamMetrics } from '@/types/endpoints/TeamMetrics'
import { useData } from '@/hooks/useData'

const { resource: metricsData } = useData<TeamMetrics>(httpClient, endpoints.teams.metrics(teamId))
```

## Usage in Portal

| Context | Source file |
| - | - |
| Team dashboard metrics section (`/dashboard/team/{teamId}`) | `src/views/user/dashboards/team/components/TeamMetricsSection.tsx` |

## Error Responses

**401 Unauthorized** `error`

The customer is not authenticated or the session has expired.

**404 Not Found** `error`

Team with the specified ID does not exist.

## Related Endpoints

| Method | Endpoint | Description |
| - | - | - |
| `GET` | `/api/public/teams/{teamId}/kpi` | Per-member KPI data |
| `GET` | `/api/public/teams/{teamId}/attendance` | Team attendance data |
| `GET` | `/api/public/teams/{teamId}/profile` | Full team profile |
| `GET` | `/api/public/teams/my` | List the customer's teams |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.