dambel

دمبل

shevron
ورود | ثبت نام

API Docs / training / diet-plans / meals / create



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

You can create a meal for a diet plan using this API.

Permissions

  • diet_plan_meals.create: to create meals for your diet plans
  • diet_plans.update: to be able to update your own diet plans

Params

  • title: Title of the training service (maxlength 255)
  • ingredients: Ingredietnts (maxlength 2000)
  • description: An optional description for the training service (maxlength 2000)
  • protein: Protein of the meal in integer (grams)
  • carb: Carbs of the meal in integer (grams)
  • fat: Fat of the meal in integer (grams)
  • calories: Calories of the meal in integer
  • meal_index: Index (option per row) of the meal
  • category_index: Category (table) of the meal

Response

201 Created

<diet plan meal resource>

Diet Plan Meal Resource

422 Unprocessable Entity

Validation error

401 Unauthorized

Authentication error

404 Not Found

Not-found error

403 Forbidden

Permission error

footer wave
logo

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

LinkedinInstagramXYoutube