Changes

Jump to navigation Jump to search
62 bytes removed ,  02:10, 1 May 2019
Line 334: Line 334:  
* the API returns all values in grams. This applies to both the key_100g and key_serving values.
 
* the API returns all values in grams. This applies to both the key_100g and key_serving values.
 
* the API always returns the energy values in kJ by default. Multiply the value by 0.23900573614 to convert it to Calories.
 
* the API always returns the energy values in kJ by default. Multiply the value by 0.23900573614 to convert it to Calories.
* any nutriments submitted to OFF as % DV values are converted to grams before being stored in the database. The conversion is done based on the values [https://github.com/openfoodfacts/openfoodfacts-server/blob/master/lib/ProductOpener/Food.pm here]. Thus, when the API returns the values of these nutriments in grams, the conversion rates can be used again to change the nutriment values from grams back to % DV.
+
* any nutriments submitted to OFF as % DV values are converted to grams before being stored in the database. The conversion is done based on the values [https://github.com/openfoodfacts/openfoodfacts-server/blob/master/lib/ProductOpener/Food.pm here]. Thus, the conversion rates can be used again to change the nutriment values from grams back to % DV.
    
====== List of nutrition keys ======
 
====== List of nutrition keys ======
2

edits

Navigation menu