curl --request PUT \
--url https://api.example.com/meal-detail/{meal_detail_id}{
"id": 123,
"recipe_id": 123,
"schedule": 123,
"status": 123,
"meal_type": "<string>",
"recipe": {
"id": 123,
"name": "<string>",
"calories": 123,
"protein": 123,
"carbs": 123,
"fat": 123,
"image_url": "<string>",
"recipe_url": "<string>",
"recipe_id": 123,
"ingredients": "<string>",
"meal_types": [
{
"id": 123,
"name": "<string>"
}
],
"diet_types": [
{
"id": 123,
"name": "<string>"
}
]
}
}Update the recipe associated with a specific meal detail
curl --request PUT \
--url https://api.example.com/meal-detail/{meal_detail_id}{
"id": 123,
"recipe_id": 123,
"schedule": 123,
"status": 123,
"meal_type": "<string>",
"recipe": {
"id": 123,
"name": "<string>",
"calories": 123,
"protein": 123,
"carbs": 123,
"fat": 123,
"image_url": "<string>",
"recipe_url": "<string>",
"recipe_id": 123,
"ingredients": "<string>",
"meal_types": [
{
"id": 123,
"name": "<string>"
}
],
"diet_types": [
{
"id": 123,
"name": "<string>"
}
]
}
}curl -X PUT "https://api.smarteat.ai/meal-detail/123?recipe_id=45678" \
-H "Content-Type: application/json"
breakfast, lunch, dinner, snack{
"id": 123,
"recipe_id": 45678,
"schedule": 2,
"status": 0,
"meal_type": "lunch",
"recipe": {
"id": 45678,
"name": "Grilled Chicken Salad",
"calories": 350,
"protein": 35,
"carbs": 25,
"fat": 10,
"image_url": "https://example.com/grilled-chicken.jpg",
"recipe_url": "https://example.com/recipe/grilled-chicken",
"recipe_id": 45678,
"ingredients": "Chicken breast, mixed greens, cherry tomatoes, olive oil, lemon",
"meal_types": [
{
"id": 2,
"name": "lunch"
},
{
"id": 3,
"name": "dinner"
}
],
"diet_types": [
{
"id": 1,
"name": "high_protein"
},
{
"id": 2,
"name": "low_carb"
}
]
}
}
PUT /meal-detail/{meal_detail_id}/status
curl -X PUT "https://api.smarteat.ai/meal-detail/123/status?status=1" \
-H "Content-Type: application/json"
{
"detail": "Meal detail not found"
}
{
"detail": [
{
"loc": ["query", "recipe_id"],
"msg": "field required",
"type": "value_error.missing"
}
]
}
{
"detail": "Internal server error"
}