Recipes - API Documentation

Search and find recipes those match your taste !

Add recipe

Adds a recipe with the given details.

POST
/recipe

Parameters
access_token String A valid access token.
titleStringTitle of the recipe.
urlStringHuman friendly URL for the recipe.
descriptionStringDescription of the recipe.
coverImageCover image for the recipe.
images[Image]Images of recipe
yield_numberNumberQuantity of recipe yield.
yield_unitStringUnit of recipe yield.
prep_timeNumberTime taken to prepare the recipe in minutes.
cuisineStringCuisine of the recipe.
courseStringCourse of the recipe.
categoryStringCategory of the recipe.
sub_categoryStringSub category of the recipe.
tags[String]Tags for the recipe.
easeNumberEasiness of the recipe in the order of 1-5.
utensils[utensils_id]Utensils used for preparation of the recipe.
ingredients
[
    {
        "grocery": "grocery_id",
        "metric_quantity": "Number",
        "grocery_metric_unit": "String"
    }
]
instructions
[
    {
        "method": "String",
        "time_taken": "Number",
        "instruction": "String"
    }
]
nutrition
{
    "fat": "Number",
    "calorie": "Number",
    "protein": "Number",
    "sugar": "Number"
}
combinations[recipe_id]List of combo recipes.
variants_of_recipe[recipe_id]Varients of the recipe.
is_privateBooleanWhether the recipe is private.
Response
Status: 201

List my recipes

Lits the recipes added by the authenticated user.

GET
/me/recipes

Parameters
access_token String A valid access token.
Response
[
  {
    "_id": "58dd5665493e061ee4236a28",
    "cover": "58dd5665493e061ee4236a28-recipe-cover.jpg",
    "title": "Lemon Tea",
    "description": "The following recipes for black, herbal or iced lemon teas can bring refreshment when hot or warm you when you're not feeling best. Adding lemon to tea is a comforting way to enjoy tea, whether it's black tea or herbal.",
    "course": "drinks",
    "prep_time": 10,
    "rating": 3
  }
]

List user recipes

Lits the recipes added by the authenticated user.

GET
/users/:user_id/recipes

Parameters
access_token String A valid access token.
Response
[
    {	"_id": "ghgs3hjn6hglo8uhfhb6",
        "title": "Paneer Sandwich",
        "description": "Simple and easy breakfast or snack",
        "cover": "12376ajsdgjahgj126871623-recipe-cover.jpg",
        "prep_time": 15,
        "rating": 4.5,
        "course": "Breakfast"
    }
]

Search recipes

Brief Description

GET
/recipes

Parameters
access_token String A valid access token.
query Sring Name of the recipe to be searched for.
ingredients [grocery_id] Ingredients that should be used in the recipe.
prep_time Number Time used to prepare the recipe.
rating Number Rating of the recipe.
cuisine String Cousine of the recipe.
course String Course that recipe belongs to.
tags String Tags of the recipe.
Response
[
    {
        "title": "Paneer Sandwich",
        "description": "Simple and easy breakfast or snack",
        "cover": "12376ajsdgjahgj126871623-recipe-cover.jpg",
        "prep_time": 15,
        "rating": 4.5,
        "course": "Breakfast",
        "author": {
            "_id": "6tyh9fghagg56gshdggas787",
            "first_name": "Sruthy",
            "last_name": "Ramanujan"
            "username": "thakkudu",
            "rating": 4.5
        }
    }
]

Get recipe

Get the details of the specified recipe

GET
/recipes/:recipe_id

Parameters
access_token String A valid access token.
Response
{
  "_id": "58dd5665493e061ee4236a28",
  "cover": "58dd5665493e061ee4236a28-recipe-cover.jpg",
  "title": "Lemon Tea",
  "description": "The following recipes for black, herbal or iced lemon teas can bring refreshment when hot or warm you when you're not feeling best. Adding lemon to tea is a comforting way to enjoy tea, whether it's black tea or herbal.",
  "url": "lemon-tea",
  "course": "drinks",
  "cuisine": "indian",
  "category": "beverages",
  "yield_number": 2,
  "yield_unit": "cups",
  "prep_time": 10,
  "ease": 4,
  "sub_category": "others",
  "rating": 3,
  "__v": 0,
  "comments": [
    {
      "_id": "58e5e5818fee4035937a242a",
      "user": {
        "_id": "58e5e3158fee4035937a2429",
        "username": "shajanjp",
        "first_name": "Shajan"
      },
      "title": "Can I add ginger instead of garlic ?",
      "body": "I really dont like the taste of garlic, so is it ok to add ginger instead of that ?",
      "rating": "4"
    }
  ],
  "variants_of_recipe": [],
  "combinations": [],
  "nutrition": {
    "calorie": 10,
    "sugar": 12,
    "fat": 14,
    "protein": 16
  },
  "instructions": [
    {
      "inst_method": "boil",
      "time_taken": 5,
      "inst_body": "Boil the water and add tea powder. Stir around a little, then add the lemon slices and sugar. The sugar can be adjusted to taste, depending on how sweet or not you prefer the tea. "
    },
    {
      "inst_method": "pour",
      "time_taken": 3,
      "inst_body": "Pour the water into the teapot. Pour it over the top of the ingredients already placed inside. "
    },
    {
      "inst_method": "add",
      "time_taken": 5,
      "inst_body": "Garnish with additional lemon slices before serving. Although optional, this adds a neat touch. "
    }
  ],
  "ingredients": [
    {
      "grocery": {
        "_id": "58d5304d7da1b9c9ef6bc234",
        "title": "Artichoke"
      },
      "metric_quantity": 1,
      "metric_unit": "piece",
      "note": "sliced thinly"
    },
    {
      "grocery": {
        "_id": "58d8860166bc5854a3ca3117",
        "title": "Tea Powder"
      },
      "metric_quantity": 1,
      "metric_unit": "tablespoon",
      "note": ""
    },
    {
      "grocery": {
        "_id": "58dd522c493e061ee4236a25",
        "title": "Cinnamon"
      },
      "metric_quantity": 2,
      "metric_unit": "piece",
      "note": "sticks"
    },
    {
      "grocery": {
        "_id": "58d6558a03e3eb479e8176fd",
        "title": "Sugar"
      },
      "metric_quantity": 2,
      "metric_unit": "tablespoon",
      "note": "superfine"
    },
    {
      "grocery": {
        "_id": "58dcfe67dd1550217cc0d95b",
        "title": "Water"
      },
      "metric_quantity": 6,
      "metric_unit": "cup",
      "note": "boiling water"
    }
  ],
  "utensils": [],
  "tags": [
    "tea",
    "lemon",
    "morning"
  ],
  "images": []
}

Favorite a recipe

Adds the specified recipe to the favorites list.

PUT
/recipes/:recipe_id/favorites

Parameters
access_token String A valid access token.
Response
Status: 204

Unfavorite a recipe

Removes the specified recipe from the favorites list.

DELETE
/recipes/:recipe_id/favorites

Parameters
access_token String A valid access token.
Response
Status: 200

Get my favorites

Get the list of favotited recipes.

GET
/me/favorites

Parameters
access_token String A valid access token.
Response
Status: 200

Edit recipe

Updates a recipe with the given details.

PATCH
/recipe/:recipe_id

Parameters
access_token String A valid access token.
titleStringTitle of the recipe.
urlStringHuman friendly URL for the recipe.
descriptionStringDescription of the recipe.
coverImageCover image for the recipe.
images[Image]Images of recipe
yield_numberNumberQuantity of recipe yield.
yield_unitStringUnit of recipe yield.
prep_timeNumberTime taken to prepare the recipe in minutes.
cuisineStringCuisine of the recipe.
courseStringCourse of the recipe.
categoryStringCategory of the recipe.
sub_categoryStringSub category of the recipe.
tags[String]Tags for the recipe.
easeNumberEasiness of the recipe in the order of 1-5.
utensils[utensils_id]Utensils used for preparation of the recipe.
ingredients
[
    {
        "grocery": "grocery_id",
        "metric_quantity": "Number",
        "grocery_metric_unit": "String"
    }
]
instructions
[
    {
        "method": "String",
        "time_taken": "Number",
        "instruction": "String"
    }
]
nutrition
{
    "fat": "Number",
    "calorie": "Number",
    "protein": "Number",
    "sugar": "Number"
}
combinations[recipe_id]List of combo recipes.
variants_of_recipe[recipe_id]Varients of the recipe.
is_privateBooleanWhether the recipe is private.
Response
Status: 202

Comment recipe

Post a comment to the specified recipe.

PUT
/recipes/:recipe_id/comments

Parameters
access_token String A valid access token.
title String Title of the comment.
body String Body of the comment
rating Number Feedback rating.
Response
Status: 201

Get Recipe Comments

Get the list of comments of the specified recipe.

GET
/recipes/:recipe_id/comments

Parameters
access_token String A valid access token.
Response
{
  "_id": "58dd5665493e061ee4236a28",
  "cover": "58dd5665493e061ee4236a28-recipe-cover.jpg",
  "title": "Lemon Tea",
  "description": "The following recipes for black, herbal or iced lemon teas can bring refreshment when hot or warm you when you're not feeling best. Adding lemon to tea is a comforting way to enjoy tea, whether it's black tea or herbal.",
  "comments": [
    {
      "_id": "58e5e5818fee4035937a242a",
      "user": {
        "_id": "58e5e3158fee4035937a2429",
        "username": "shajanjp",
        "first_name": "Shajan"
      },
      "title": "Can I add ginger instead of garlic ?",
      "body": "I really dont like the taste of garlic, so is it ok to add ginger instead of that ?",
      "rating": "4"
    }
  ]
}

Report recipe

Report a recipe.

PUT
/recipes/:recipe_id/report

Parameters
access_token String A valid access token.
reason_title String Title of the report.
reason_body String Body of the report.
Response
Status: 202

Remove recipe

Removes the specified recipe.

DELETE
/recipes/:recipe_id

Parameters
access_token String A valid access token.
Response
Status: 200