72
edits
(Added question) |
|||
Line 19: | Line 19: | ||
=== Data input === | === Data input === | ||
==== Fields sent | ==== Fields sent to the write API ==== | ||
Apps (+ the OFF web site edit form) send: | Apps (+ the OFF web site edit form) send: | ||
* nutrition_data_per : | * <code>nutrition_data_per</code>: <code>100g</code> or <code>serving</code> | ||
* serving_size (optional, but very useful, in particular if the nutrition facts are specified per serving) | * <code>serving_size</code>: (optional, but very useful, in particular if the nutrition facts are specified per serving) | ||
* for each nutrient: | * for each nutrient: | ||
** nutrient-id (e.g. saturated-fat, energy-kcal) : value for the nutrient, for the size specified in | ** <code>{nutrient-id}</code> (e.g. <code>saturated-fat</code>, <code>energy-kcal</code>): value for the nutrient, for the size specified in the field <code>nutrition_data_per</code>. This is a string made of the modifier ("<", ">" or "") and the value without unit ("17.8", "34,7", "< 0.1", etc). | ||
** nutrient- | ** <code>{nutrient-id}_unit</code> (e.g. saturated-fat_unit, energy-kcal_unit): the unit of the value passed (e.g. "g", "mg", "kcal", "kJ", "%", "") | ||
Notes about the energy fields: | Notes about the energy fields: |
edits