Skip to main content

Progress

Metrics

What a client tracks over time, like weight, waist or body fat, and every entry.

A metric is something a client tracks over time, like weight, waist or body fat, in the unit the coach set. Clients log entries in the app or through check-in answers, one value for a day. To compare clients' metrics over a period, use GET /client-summaries with include=metrics.

Body metrics on a client's profile.
In the HubFit appBody metrics on a client's profile.

Attributes

  • idstring

    Its unique ID.

  • namestring
  • unitstringnullable

    The unit the coach set, as they wrote it (kg, cm, %). null if they left it blank. Values are never converted.

  • entryCountinteger
  • lastEntryobjectnullable

    The entry for the latest day, and of that day's entries the last added. null if it has none.

    Show 3 child attributes
    • idstring

      Its unique ID.

    • datedate

      The client's own calendar day the entry is for.

    • valuenumber

      In the metric's unit.

Metric object
{
  "id": "6ad6af776298037662967079",
  "name": "Weight",
  "unit": "lb",
  "entryCount": 24,
  "lastEntry": {
    "id": "6ad6af4305c6094205c47641",
    "date": "2026-10-26",
    "value": 182.4
  }
}

Attributes

  • idstring

    Its unique ID.

  • datedate

    The client's own calendar day the entry is for.

  • valuenumber

    In the metric's unit.

Metric entry object
{
  "id": "6ad6afb5dd068db4dd04fab3",
  "date": "2026-10-26",
  "value": 182.4
}
GET/v1/clients/{clientId}/metrics

The metrics the client tracks, in the order the coach added them, each with how many entries it has and the last one. A client has no more than 25 (MAX_METRICS_PER_CLIENT), so they all come in one response, without paging; a client given more before that limit still gets every one. Empty if the coach turned metrics off for the client. Requires clients:read.

Path parameters

Returns

Every metric the client tracks.

GET /v1/clients/{clientId}/metrics
curl https://api.hubfit.com/v1/clients/6ad6af41d3199442d31b2743/metrics \
  -H "Authorization: Bearer $HUBFIT_API_KEY"
Response200 OK
{
  "data": [
    {
      "id": "6ad6af776298037662967079",
      "name": "Weight",
      "unit": "lb",
      "entryCount": 24,
      "lastEntry": {
        "id": "6ad6af4305c6094205c47641",
        "date": "2026-10-26",
        "value": 182.4
      }
    }
  ]
}
GET/v1/metrics/{metricId}/entries

What the client logged for one metric, latest day first, and of one day's entries the last added first. 404 if the coach turned metrics off for the client. Requires clients:read.

Path parameters

  • metricIdstringRequired

    A metric id from GET /clients/{clientId}/metrics.

Query parameters

  • Only days from this date, included, as YYYY-MM-DD. Days are the client's own calendar days.

  • Only days up to this date, included, as YYYY-MM-DD.

  • limitinteger

    How many results to return, from 1 to 100.

    Default 25
  • cursorstring

    The nextCursor from the previous page.

Returns

A page of the metric's entries.

GET /v1/metrics/{metricId}/entries
curl -G https://api.hubfit.com/v1/metrics/6ad6af776298037662967079/entries \
  -H "Authorization: Bearer $HUBFIT_API_KEY" \
  -d startDate=2026-09-01
Response200 OK
{
  "data": [
    {
      "id": "6ad6afb5dd068db4dd04fab3",
      "date": "2026-10-26",
      "value": 182.4
    }
  ],
  "nextCursor": "eyJpZCI6IjZhZDZhZjNmMjljNTk3ZjE1In0",
  "totalCount": 48
}