Recipe - Food - Nutrition

FREEMIUM
By David | Updated 8 дней назад | Food
Popularity

9.9 / 10

Latency

488ms

Service Level

100%

Health Check

N/A

Back to All Discussions

Generate Meal plan issue

Rapid account: Seneca X
SenecaX
год назад

Is it normal that the Generate Meal Plan API returns a collection like this:
items:0:
day:1
mealPlanId:0
slot:1
position:0
type:“RECIPE"
value:”{“id”:657178,“imageType”:“jpg”,“title”:“Protein Packed Carrot Muffins”}"

when the examples return it like that:
0:
id:49993
title:"Cream Cheese Banana Nut Bread"
readyInMinutes:90
image:"cream-cheese-banana-nut-bread-2-49993.jpg"
imageUrls:
0:"cream-cheese-banana-nut-bread-2-49993.jpg"
1:“cream_cheese_banana_nut_bread-49993.jpg”

The one that I ran gives me an object value
The one in the example give me another format

I get source_url when generating for 1 day
but i get value:"{“id”:657178,“imageType”:“jpg”,“title”:“Protein Packed Carrot Muffins”}" when generating for 1 week

And also, regarding the API Add Meal Plan Template returns me an error 500 when I try to put the response in the body to add to a user, any reasons why? or how should it be formatted?

Rapid account: Spoonacular
spoonacular Commented год назад

I am afraid I do not follow. Could you please send which request URL you are trying, which response you receive, and what you expect to receive? Be sure to replace your API key with a placeholder.

Perhaps this will help too: https://spoonacular.com/food-api/docs#Working-with-the-Meal-Planner

Join in the discussion - add comment below:

Login / Signup to post new comments