data review

Get the food data, for a string of foods, from the server in the MPQ format

get/foods/formatted_mpq

Query parameters

food_namesstring required

list of food names

Response

successful operation

addonsstring[] required
custom_itemboolean nullable
custom_item_sourcestring nullable
custom_item_source_idstring nullable
custom_usda_idinteger nullable

if available the nutrient database, use this ndbno

extra_addonsstring[] required
food_namestring required
food_name_aliasstring nullable
food_name_translationsobject nullable
food_replacement_namestring nullable
notestring nullable
percent_eatennumber nullable
preparation_method'' | 'homemade' | 'restaurant' | 'cpg' | 'store_bought' | 'other'
rxfood_idstring nullable
serving_type_labelstring nullable
serving_type_multipliernumber nullable
serving_unit_amountnumber required
serving_unit_labelstring required
serving_unit_label_translationsobject nullable
servingsnumber required

Example response

[
  {
    "addons": [],
    "custom_addons": [
      {
        "nutrient_overrides": {
          "aa_patient": {
            "ontology": {
              "id": 42,
              "levels": [
                "food"
              ]
            }
          },
          "bb_reviewer": {
            "ontology": {
              "id": 42,
              "levels": [
                "food"
              ]
            }
          },
          "cc_external": {
            "ontology": {
              "id": 42,
              "levels": [
                "food"
              ]
            }
          },
          "dd_estimate": {
            "ontology": {
              "id": 42,
              "levels": [
                "food"
              ]
            }
          },
          "ee_validation": {
            "ontology": {
              "id": 42,
              "levels": [
                "food"
              ]
            }
          }
        },
        "serving_unit_amount": 1,
        "serving_unit_label": "gram"
      }
    ],
    "extra_addons": [],
    "nutrient_overrides": {
      "aa_patient": {
        "ontology": {
          "id": 42,
          "levels": [
            "food"
          ]
        }
      },
      "bb_reviewer": {
        "ontology": {
          "id": 42,
          "levels": [
            "food"
          ]
        }
      },
      "cc_external": {
        "ontology": {
          "id": 42,
          "levels": [
            "food"
          ]
        }
      },
      "dd_estimate": {
        "ontology": {
          "id": 42,
          "levels": [
            "food"
          ]
        }
      },
      "ee_validation": {
        "ontology": {
          "id": 42,
          "levels": [
            "food"
          ]
        }
      }
    },
    "percent_eaten": 1,
    "serving_unit_amount": 1,
    "serving_unit_label": "gram"
  }
]

Changes

No recorded changes to this endpoint across all 15 revisions of this API.