Grocery API
Endpoints
GET All Groceries

GET all Groceries

GET Request all groceries

/groceries/all

Success 200

FieldParameterDescription
nameStringName of the Grocery.
idintID of the Grocery.
categoryStringCategory of the Grocery.
subcategoryStringSubcategory of the Grocery.
nutritionsjsonNutritions of the Grocery.
carbohydratesintCarbohydrates of the Grocery (per 100g) in gram.
proteinintProteinof the Grocery (per 100g) in gram.
fatintFat of the Grocery (per 100g) in gram.
caloriesintCalories of the Grocery (per 100g) in gram.
sugarintSugar 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"
}