Nutrition Menus

POST /api/public/nutrition-menus

Changed on

Create a nutrition menu. Provide traineeId (or escortId) to attach it to a coaching period, or omit both to leave it unassigned. Set isTemplate to save it as a reusable template. The daily macro totals (totalCalories/totalProtein/totalCarbs/totalFat) are required. Optionally add a meals breakdown: each meal has a title and a foodItems array, and each food carries per-100g macros so the app can scale by quantity.

Request

  • Base URL
    https://api.coach-platform.com
  • Auth
    HTTP bearer

Headers

Idempotency-Keystring

Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate.

Request body

traineeIdstring

Owning trainee id. Omit both traineeId and escortId to leave the menu unassigned.

isTemplateboolean

Save as a reusable template. A template cannot be assigned, so omit traineeId and escortId.

escortIdstring

Optional coaching period id

namestring required
descriptionstring
goal'Weight Loss' | 'Muscle Gain' | 'Weight Maintenance' | 'Other'
type'Vegetarian' | 'Vegan' | 'Keto' | 'Paleo' | 'Low Carbs' | 'Gluten Free' | 'Mediterranean'
totalCaloriesnumber required

Calories/day. Required.

totalProteinnumber required

Grams of protein/day. Required.

totalCarbsnumber required

Grams of carbs/day. Required.

totalFatnumber required

Grams of fat/day. Required.

Response

Created

Changes

    • info

      added the new optional request property ////

    • info

      added the new optional request property //

    • info

      added the optional property ///// to the response with the status

    1 more change in this revision