Skip to content

Latest commit

 

History

History
328 lines (297 loc) · 6.36 KB

products_product_id.md

File metadata and controls

328 lines (297 loc) · 6.36 KB

FoodServices Product Details

GET /foodservices/products/{product_id}.{format}

Description

This method returns a product's nutritional information

Summary

Name Value Name Value
Request Protocol GET Requires API Key Yes
Method ID 1277 Enabled Yes
Service Name foodservices Service ID 269
Information Steward FoodServices Data Type Direct DB connection
Update Frequency On request (lib) Cache Time 0 seconds

Notes

  • Usage won't increase if there is no data returned
  • Any value can be null

Sources

Parameters

GET /foodservices/products/{product_id}.{format}
Parameter Type Required Description
product_id input yes Valid product ID from menu
key filter yes Your API key
callback filter no JSONP callback format

Output Formats

  • json
  • xml

Examples

GET /foodservices/products/{product_id}.{format}

Response

Field Name Type Value Description
product_id integer Food item's numeric id
product_name string Name of the food item
ingredients string Food ingredients
serving_size string Item's service size (in grams or whole)
serving_size_ml integer Serving size in milliliters
serving_size_g integer Serving size in grams
calories integer Food calorie count
total_fat_g integer Total fat in grams
total_fat_percent integer Total fat in percentage
fat_saturated_g integer Total saturated fat in grams
fat_saturated_percent integer Total saturated fat in percentage
fat_trans_g integer Total trans fat in grams
fat_trans_percent integer Total trans fat in percentage
cholesterol_mg integer Total cholesterol in milligrams
sodium_mg integer Sodiumm in milligrams
sodium_percent integer Sodium in percentage
carbo_g integer Total carbohydrates in grams
carbo_percent integer Carbohydrates as percentage
carbo_fibre_g integer Carbohydrate fibres in grams
carbo_fibre_percent integer Carbohydrates fibers as percentage
carbo_sugars_g integer Carbohydrate sugar in grams
protein_g integer Total protein in grams
vitamin_a_percent integer Total vitamin A percentage
vitamin_c_percent integer Total vitamin C percentage
calcium_percent integer Total calcium percentage
iron_percent integer Total iron percentage
micro_nutrients string Micro nutrients in item
tips string Any eating tips for the imte
diet_id integer Foodservices given diet id
diet_type string String representation of the diet_id

Any value can be null

Output

JSON

{
  "meta":{
    "requests":132,
    "timestamp":1381960356,
    "status":200,
    "message":"Request successful",
    "method_id":1277,
    "version":2.07,
    "method":{
      
    }
  },
  "data":{
    "product_id":1386,
    "product_name":"Maple Thyme Salmon",
    "ingredients":"Salmon, maple syrup, thyme, soy sauce, sesame seeds",
    "serving_size":"467 grams",
    "serving_size_ml":null,
    "serving_size_g":null,
    "calories":850,
    "total_fat_g":41,
    "total_fat_percent":63,
    "fat_saturated_g":10,
    "fat_saturated_percent":50,
    "fat_trans_g":null,
    "fat_trans_percent":null,
    "cholesterol_mg":255,
    "sodium_mg":1150,
    "sodium_percent":48,
    "carbo_g":38,
    "carbo_percent":13,
    "carbo_fibre_g":null,
    "carbo_fibre_percent":null,
    "carbo_sugars_g":33,
    "protein_g":79,
    "vitamin_a_percent":35,
    "vitamin_c_percent":25,
    "calcium_percent":15,
    "iron_percent":20,
    "micro_nutrients":null,
    "tips":null,
    "diet_id":2,
    "diet_type":"Non Vegetarian"
  }
}