Skip to content

Metrics Create or Update

François Dupont edited this page Jun 9, 2026 · 6 revisions

Create or update a Nolio user metric

  • If no metric exists for a given date, a new metric will be created

  • If a metric exists for a given date, the metric will be updated

Endpoint:

  • /update/metric/
  • HTTP Method: POST

Example:

Production:
https://www.nolio.io/api/update/metric/

Parameters :

  • metric_id: integer, required. The id for the corresponding Nolio metric
  • new_value: number (integer or decimal), required. Must be finite and positive. Some metrics have an upper bound:
    • Weight (metric_id 2): 0–200
    • Body fat percent (metric_id 3): 0–100
    • all other metrics: positive, no upper bound
    • NaN and Infinity are rejected with a 400
  • date_start: string, required. date of the metric. YYYY-MM-DD format
  • athlete_id: integer, optional. If provided, the metric will be created/updated for the specified athlete (you must be their coach). You can retrieve athlete ids with the Get Athletes route.

Example:

  {
    "metric_id": 1,
    "new_value": 3600,
    "date_start": "2020-08-31",
    "athlete_id": 42
  }

Response

A JSON containing the metrics data that was created or updated

Specific status code

  • 400 Bad request

    • metric_id doesn’t correspond to any metric

Clone this wiki locally