GET all Groceries
GET
Request all groceries
/groceries/all
Success 200
Field | Parameter | Description |
---|---|---|
name | String | Name of the Grocery. |
id | int | ID of the Grocery. |
category | String | Category of the Grocery. |
subcategory | String | Subcategory of the Grocery. |
nutritions | json | Nutritions of the Grocery. |
carbohydrates | int | Carbohydrates of the Grocery (per 100g) in gram. |
protein | int | Proteinof the Grocery (per 100g) in gram. |
fat | int | Fat of the Grocery (per 100g) in gram. |
calories | int | Calories of the Grocery (per 100g) in gram. |
sugar | int | Sugar of the Grocery (per 100g) in gram. |
Success Response
{
"name": "Organic Brown Rice",
"id": 1536,
"category": "Grains",
"subcategory": "Rice",
"images": ["https://api.foodin.ai/groceries/organic-brown-rice.jpg"],
"nutritional_info": {
"serving_size": "1 cup (185g)",
"calories": 216,
"fat": 1.8,
"saturated_fat": 0.3,
"trans_fat": 0,
"cholesterol": 0,
"sodium": 1,
"carbohydrates": 45.8,
"fiber": 2.8,
"sugar": 0.7,
"protein": 4.5,
"vitamin_a": 0,
"vitamin_c": 0,
"calcium": 2,
"iron": 10,
},
"restrictions": ["gluten"],
"preferences": {
"is_organic ": true,
"is_fair_trade": false,
"is_gluten_free": false,
"is_vegan": true,
"is_vegetarian": true,
"is_kosher": false,
"is_halal": false,
},
"created_at": "2022-01-01T00:00:00.000Z",
"updated_at": "2022-01-01T00:00:00.000Z"
},
{
"name": "Banana",
"id": 1537,
"category": "Grocery",
"subcategory": "Bananas",
"images": ["https://api.foodin.ai/groceries/banana.jpg"],
"nutritional_info": {
"serving_size": "1 cup (120g)",
"calories": 74,
"fat": 2,
"saturated_fat": 0.7,
"trans_fat": 0,
"cholesterol": 0,
"sodium": 1,
"carbohydrates": 27,
"fiber": 3,
"sugar": 0.7,
"protein": 4.5,
"vitamin_a": 0,
"vitamin_c": 0,
"calcium": 2,
"iron": 10,
},
"restrictions": ["gluten"],
"preferences": {
"is_organic ": true,
"is_fair_trade": false,
"is_gluten_free": false,
"is_vegan": true,
"is_vegetarian": true,
"is_kosher": false,
"is_halal": false,
},
"created_at": "2022-01-01T00:00:00.000Z",
"updated_at": "2022-01-01T00:00:00.000Z"
},
.
.
.
Error Response
500
Server error
{
"error": "Internal server error"
}