Login | Sign Up
  • FA
  • EN

API Docs

/api/v1/training/diet-plans

Create a new diet plan.


Permissions

PermissionDescription
diet_plans.createCreate diet plan for yourself or a trainee

Request Body Parameters

NameTypeRequiredDescription
titlestringYesTitle 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
trainee_idintNoTrainee ID (if creating for a trainee)

Note: Current active plan will automatically get deactivated if you set is_active to true.


Response

201 Created

{ /* diet plan resource */ }

Error Responses

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

footer wave
logo

Dambel, the smart world of fitness and nutrition

LinkedinInstagramXYoutubeTelegramGitHub