---
title: "Replace active nutrition plan metrics"
method: PUT
path: "/patients/{patient_id}/nutrition-plan/active-metrics"
tags: ["nutrition-plan"]
---

# Replace active nutrition plan metrics

`PUT /patients/{patient_id}/nutrition-plan/active-metrics`

## Path parameters

- `patient_id` integer, required

## Request body

- NutritionPlanReplaceActiveMetricsRequest
  - `metric_ids` string[], required — Active nutrition metric IDs to store.

## Response `200`

successful operation

- NutritionPlanActiveMetricsResponse
  - `default_metric_ids` string[], required
  - `metric_ids` string[], required
  - `patient_id` integer, required
  - `recommended_metrics` NutritionPlanRecommendedMetricResponse[], required
    - `id` string, required
    - `priority_tier` integer, required
  - `recommended_pinned_health_targets` NutritionPlanRecommendedPinnedHealthTargetResponse[], required
    - `rank` integer, required
    - `source` 'nutrition_plan' | 'default', required
    - `source_metric_id` string, nullable, required
    - `target` PatientHealthTargetRequest, required
      - `archive_reason` string, nullable
      - `category` string
      - `id` integer, nullable
      - `is_pinned` boolean, nullable
      - `meal_slots` string[], nullable — When target_period is meal; default breakfast, lunch, dinner
      - `patient_id` integer
      - `target_aggregator` 'avg' | 'min' | 'max' | 'sum' | 'count'
      - `target_name` string
      - `target_period` string — Allowed values depend on the target category. Nutrient and water targets use week, day, breakfast, lunch, dinner, snack, and meal (same target per configured meal slot). Other categories use their category-specific supported periods.
      - `target_range_high` number, nullable
      - `target_range_low` number, nullable
      - `target_range_type` 'above' | 'below' | 'within'
  - `selection_mode` 'automatic' | 'manual', required

---

[API](https://skmtc.dev/rxfoodapp/apis/inneranalytics-mnt-server.md) · [All operations](https://skmtc.dev/rxfoodapp/apis/inneranalytics-mnt-server/llms.txt) · [OpenAPI document](https://skmtc.dev/rxfoodapp/apis/inneranalytics-mnt-server/revisions/081a2697c0f1?raw)
