I want to call ESHA Research nutrient REST API. I cannot seem to figure out how to call multiple nutrients using ESHA REST API. So far I am calling the following and only able to retrieve the calories, or protein, or another type of nutrient information. So I was hoping someone had experience in retrieving all the nutrient information with one call. Is this possible?
This is how I call to retrieve the TWIX nutrient
http://api.esha.com/analysis?apikey=xxxx&fo=urn:uuid:81d268ac-f1dc-4991-98c1-1b4d3a5006da
(returns calories, please note the api key is not xxxx but instead a key generated from Esha once you sign up as developer) The return is JSON format.
If I want to call fat it would be the following
http://api.esha.com/analysis?apikey=xxxx&fo=urn:uuid:81d268ac-f1dc-4991-98c1-1b4d3a5006da&n=urn:uuid:589294dc-3dcc-4b64-be06-c07e7f65c4bd
How can I make a call once and get a return of all the nutrients (so Fat, Calories, Carbs, Vitamins, etc..) for a particular food ID?
I have researched and looked at this for a while and cannot seem to find the answer.
Thanks in advance for your help.
This probably doesn’t help very much, but you could pass in multiple foods using f0, f1 etc. This gets you a combined nutrient list (a sum of that nutrient for all foods) as opposed to multiple lists of nutrients. I haven’t figured it out either, and currently work around it by making individual calls for each food