Remove an alternative meal
DELETE/api/public/nutrition-menus/{menuId}/meals/{mealId}/alternatives/{alternativeId}
Remove one alternative meal from a meal. Take mealId and alternativeId from GET /nutrition-menus/{menuId}. Does not cascade: copies duplicated from this menu keep their own alternatives.
Authentication
Requires an API key, sent as Authorization: Bearer cp_live_....
API keys carry scopes. Get the catalog of scopes and webhook events lists every scope.
Path parameters
| Name | Type | Description |
|---|---|---|
menuIdrequired | string | |
mealIdrequired | string | |
alternativeIdrequired | string |
Query parameters
| Name | Type | Description |
|---|---|---|
applyToAllSharedTrainees | boolean | Required (true) to edit a menu shared by multiple trainees; the alternative is then removed for all of them. Without it, a shared menu returns 409. |
Header parameters
| Name | Type | Description |
|---|---|---|
Idempotency-Key | string | 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 examples
curl --request DELETE \
--url 'https://api.coach-platform.com/api/public/nutrition-menus/<menuId>/meals/<mealId>/alternatives/<alternativeId>' \
--header 'Authorization: Bearer cp_live_...'const response = await fetch('https://api.coach-platform.com/api/public/nutrition-menus/<menuId>/meals/<mealId>/alternatives/<alternativeId>', {
method: 'DELETE',
headers: {
Authorization: 'Bearer cp_live_...',
},
});
const data = await response.json();Responses
200 OK
The OpenAPI spec does not describe a response body here.
More Nutrition Menus endpoints
This page is also available as Markdown. Browse it in the interactive explorer or download the OpenAPI spec.