---
title: "Get ingredient swap suggestions for a meal plan slot"
method: POST
path: "/patients/{patient_id}/meal-plans/{meal_plan_id}/swap-ingredient"
tags: ["meal-plan"]
---

# Get ingredient swap suggestions for a meal plan slot

`POST /patients/{patient_id}/meal-plans/{meal_plan_id}/swap-ingredient`

## Request

- Base URL: `https://api.rxfoodapp.com/api`
- URL: `https://api.rxfoodapp.com/api/patients/{patient_id}/meal-plans/{meal_plan_id}/swap-ingredient`
- Auth: HTTP bearer

## Path parameters

- `patient_id` integer, required
- `meal_plan_id` integer, required

## Request body

- SwapIngredientRequest
  - `ingredient_index` integer, required
  - `keyword` string, required
  - `slot_id` integer, required

## Response `200`

successful operation

- SwapIngredientResponse
  - `suggestions` object[], required
    - `food_name` string
    - `ingredient_line` string

## Other responses

- `400`: invalid request
- `404`: meal plan or slot not found

---

[API](https://skmtc.dev/rxfoodapp/apis/inneranalytics-mnt-server.md) - [All operations](https://skmtc.dev/rxfoodapp/apis/inneranalytics-mnt-server/llms.txt) - [OpenAPI document](https://skmtc.dev/rxfoodapp/apis/inneranalytics-mnt-server/revisions/c3d8e22b22e8?raw)
