---
title: "POST /api/public/nutrition-menus/{menuId}/meals/{mealId}/alternatives"
method: POST
path: "/api/public/nutrition-menus/{menuId}/meals/{mealId}/alternatives"
tags: ["Nutrition Menus"]
---

# POST /api/public/nutrition-menus/{menuId}/meals/{mealId}/alternatives

`POST /api/public/nutrition-menus/{menuId}/meals/{mealId}/alternatives`

## Request

- Base URL: `https://api.coach-platform.com`
- URL: `https://api.coach-platform.com/api/public/nutrition-menus/{menuId}/meals/{mealId}/alternatives`
- Auth: HTTP bearer

Add an alternative meal to one meal of a menu — the same "add alternative meal" the dashboard offers. Take mealId from the meals array of GET /nutrition-menus/{menuId}. The alternative carries its own foods and macros and does not change the menu totals. Returns the alternative including its id. Does not cascade: copies duplicated from this menu keep their own alternatives — repeat the call against the menuId of each copy to update them.

## Path parameters

- `menuId` string, required
- `mealId` string, required

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `title` string, required: Alternative name, e.g. "Omelette instead".
  - `foodItems` object[]
    - `name` string: Food name, e.g. "Chicken breast".
    - `quantity` number: Amount in the given unit, e.g. 150.
    - `unit` string: Unit of the quantity, e.g. "g", "ml", "unit".
    - `unitWeight` number: Grams in one unit. The app scales macros as quantity * unitWeight / 100 * the per-100g values, so send it whenever unit is not grams. Take it from the matching entry in the units array of GET /food-items. Defaults to 100.
    - `productCode` number: Food database code, from GET /food-items. Send it to link the food to its catalog entry so replacements and portion data behave like they do in the dashboard.
    - `caloriesPer100g` number
    - `proteinPer100g` number
    - `carbsPer100g` number
    - `fatPer100g` number
  - `calories` number, required: Total calories for the alternative. Required.
  - `protein` number, required: Grams of protein. Required.
  - `carbs` number, required: Grams of carbs. Required.
  - `fat` number, required: Grams of fat. Required.
  - `notes` string
  - `applyToAllSharedTrainees` boolean: Required (true) to edit a menu shared by multiple trainees; the alternative is then added for all of them. Without it, a shared menu returns 409.

## Response `201`

Created

- object: Created
  - `data` object: An alternative the trainee may eat instead of the meal it belongs to. Its macros do not count towards the menu totals.
    - `id` string: Alternative id. Read-only; pass it to DELETE /nutrition-menus/{menuId}/meals/{mealId}/alternatives/{alternativeId}. Not stable: saving the menu from the dashboard gives every alternative a new id, so read it fresh rather than caching it.
    - `title` string: Alternative name, e.g. "Omelette instead".
    - `foodItems` object[]
      - `name` string: Food name, e.g. "Chicken breast".
      - `quantity` number: Amount in the given unit, e.g. 150.
      - `unit` string: Unit of the quantity, e.g. "g", "ml", "unit".
      - `unitWeight` number: Grams in one unit. The app scales macros as quantity * unitWeight / 100 * the per-100g values, so send it whenever unit is not grams. Take it from the matching entry in the units array of GET /food-items. Defaults to 100.
      - `productCode` number: Food database code, from GET /food-items. Send it to link the food to its catalog entry so replacements and portion data behave like they do in the dashboard.
      - `caloriesPer100g` number
      - `proteinPer100g` number
      - `carbsPer100g` number
      - `fatPer100g` number
    - `calories` number: Total calories for the alternative.
    - `protein` number
    - `carbs` number
    - `fat` number
    - `notes` string
    - `isTrainingDay` boolean: true when this alternative is the training-day version of the meal. On a training day the app shows it in place of the meal. At most one alternative per meal; extra tags are dropped.
  - `warnings` object[]: Non-fatal problems with follow-up writes. The resource was created, but each listed field was not applied.
    - `field` string
    - `message` string

## Other responses

- `400`: Default Response
- `401`: Default Response
- `403`: Default Response
- `404`: Default Response
- `409`: Default Response
- `429`: Default Response
- `500`: Default Response

## Changes

- **2026-11-01** `c75a8bd18dee`: 1 info
  - added the optional property `data/isTrainingDay` to the response with the `201` status

[Operation history](https://skmtc.dev/coach-platform/apis/coach-platform-api/changes/api/public/nutrition-menus/:menuId/meals/:mealId/alternatives/post.md)

---

[API](https://skmtc.dev/coach-platform/apis/coach-platform-api.md) - [All operations](https://skmtc.dev/coach-platform/apis/coach-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/coach-platform/apis/coach-platform-api/revisions/c75a8bd18dee?raw)
