Talk:API Fields
Jump to navigation
Jump to search
I try to understand the nutrition energy keys in the api, in order to implement the kcal and kJ energy fields. The documentation does not make it clear where the values of the fields come from. In the api four fields can be found: energy, energy_serving, energy_100g and energy_value. I think the energy_value is the original data entered by the user. Depending on how the user entered the data (serving or 100 g), the energy_value gets assigned to the right field (energy_100g or energy_serving). AND the data gets normalised into kJ (in this case). So what does the energy_unit refer to? And what is the extra significance of energy?