food

Search foods with diet restriction

get/foods/search_diet_restrictions

Query parameters

search_textstring required
diet_restrictionstring required

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_ontologystring[] nullable
food_replacement_namestring nullable
meal_audio_idinteger nullable
meal_nlp_phrasestring nullable
meal_photo_idinteger 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
source_meal_idinteger nullable

meal id the row was copied from when logging from recent items

source_meal_item_custom_addon_idinteger nullable

custom addon id the row was copied from when logging from recent items

source_meal_item_idinteger nullable

meal item id the row was copied from when logging from recent items

Example response

{
  "addons": [],
  "change_context": {
    "review_time": "2016-03-22T21:03:41"
  },
  "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"
        ]
      }
    }
  },
  "serving_unit_amount": 1,
  "serving_unit_label": "gram"
}

Changes

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