ورود | ثبت نام
  • FA
  • EN

API Docs

/api/v1/training/diet-plans/{diet-plan-id}

Update a diet plan.


Permissions

PermissionDescription
diet_plans.updateUpdate your own or trainee's diet plans

Request Body Parameters

NameTypeRequiredDescription
titlestringNoTitle of the diet plan (max 255)
descriptionstringNoDescription (max 2000, optional)
is_activebooleanNoSet as active plan (optional, default false). It changes all other plans to false if is set to true
target_daily_waterfloatNoSuggest 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_active to true.


Response

200 OK

<diet plan resource>

Error Responses

StatusError TypeReference
422Validation ErrorValidation error
401UnauthorizedAuthentication error
403ForbiddenPermission error

footer wave
logo

دمبل، دنیای هوشمند ورزش و تغذیه

LinkedinInstagramXYoutubeTelegram