/api/v1/training/diet-plans/{diet-plan-id}Update a diet plan.
| Permission | Description |
|---|---|
diet_plans.update | Update your own or trainee's diet plans |
| Name | Type | Required | Description |
|---|---|---|---|
title | string | No | Title of the diet plan (max 255) |
description | string | No | Description (max 2000, optional) |
is_active | boolean | No | Set as active plan (optional, default false). It changes all other plans to false if is set to true |
target_daily_water | float | No | Suggest the daily water consumption in liters |
All parameters are optional. If omitted, they will not be updated. You can set them to null if desired.
Note: Current active plan will automatically get deactivated if you set
is_activeto true.
<diet plan resource>
| Status | Error Type | Reference |
|---|---|---|
| 422 | Validation Error | Validation error |
| 401 | Unauthorized | Authentication error |
| 403 | Forbidden | Permission error |