Skip to content

API Reference

Hagai Shapira edited this page Aug 10, 2020 · 4 revisions

Recipeify api v1.0.0

Recipeify - Your intelligent and personalized recipe one-stop-shop, allowing you to find your next cooked meal quicker


explore\explore.js

Explore

Back to top

Explore returns boxes with recipes ideas based on the time of day, time of year and more.

POST /

Parameters - request Payload

Name Type Description
dateString String

value of Date().toString()

size Int

number of boxes.

amount Int

number of recipes in a box.

Examples

Example usage:

https://recipeify.com/api/explore

Success response

Success response - Success 200

Name Type Description
explore Object[]

List of recipes boxes.

mealByTime Object[]

Json of recipes for the next meal of the day.

personal Object[]

Json of recipes, recommended personally for the user.

popoular Object[]

Json of recipes, recommended by trending recipes.

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{explore: [{type: "seasonal ingredient", name: "mackerel",…}, {type: "try making", name: "pasta",…},…]
 mealByTime: {name: "Good night! here are some night snack recipes",…}
 personal: [{id: "tasty-5752", title: "3-Hour Pizza Recipe by Tasty",…},…]
 popular: [{id: "tasty-5752", title: "3-Hour Pizza Recipe by Tasty",…},…]
}

Error response

Error response - Error 4xx

Name Type Description
HTTP/1.1

400 Bad Request

recommend.js

Personal

Back to top

Request for personal recommendation page

Authentication needed

POST /personal

Parameters - Parameter

Name Type Description
count Int

number of recipes.

Examples

Example usage:

https://recipeify.com/api/recommend/personal

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{id: "tasty-5752", title: "3-Hour Pizza Recipe by Tasty",…}

Error response

Error response - Error 4xx

Name Type Description
HTTP/1.1

403 forbidden

Popular

Back to top

Request for popular recommendation page - returns trending recipes.

POST /popular

Parameters - Parameter

Name Type Description
count Int

number of recipes.

Examples

Example usage:

https://recipeify.com/api/recommend/popular

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{id: "tasty-5752", title: "3-Hour Pizza Recipe by Tasty",…}

search.js

Recipes

Back to top

Search for recipes.

POST /recipes

Parameters - request Payload

Name Type Description
freeText String

Free text search.

includeTerms Object[]

Terms to include in the search.

excludeTerms Object[]

Terms to exclude in the search.

diet Object[]

Dietary preferences.

cuisine Object[]

Cuisine type search.

dishType Object[]

Dish type search.

fromCookTime Int

Minimal cooking time.

toCookTime Int

Maximal cooking time.

size Int

Number of recipes.

Examples

Example usage:

https://recipeify.com/api/search/recipes

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{total: {value: 1398, relation: "eq"},
 items: [{id: "bonappetit-57afb95df1c801a1038bd392", title: "Squashducken",…},…]
}

Error response

Error response - Error 4xx

Name Type Description
HTTP/1.1

400 Bad Request

Ids

Back to top

Search for recipes by ids.

POST /ids

Parameters - request Payload

Name Type Description
ids Object[]

List of ids to search.

Examples

Example usage:

https://recipeify.com/api/search/ids

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{items: {...}}

Error response

Error response - Error 4xx

Name Type Description
HTTP/1.1

400 Bad Request

users.js

Get Preferences

Back to top

Request for users preferences.

Authentication needed

GET /preferences

Examples

Example usage:

https://recipeify.com/api/users/preferences

Success response

Success response - Success 200

Name Type Description
excludeTerms Object[]

List of terms to exclude from recipes.

diet Object[]

List of dietary preferences.

Edit Preferences

Back to top

Edit the users preferences.

Authentication needed

POST /preferences

Parameters - request Payload

Name Type Description
excludeTerms Object[]

List of terms to exclude from recipes.

diet Object[]

List of dietary preferences.

Examples

Example usage:

https://recipeify.com/api/users/preferences

Success response

Success response - Success 200

Name Type Description
excludeTerms Object[]

List of terms to exclude from recipes.

diet Object[]

List of dietary preferences.

Success response example

Success response example - Success-Response: Upon success, the previous information about the user is sent back:

HTTP/1.1 200 OK
{"excludeTerms":[],"diet":["healthy"],"recipes":[],"_id":"auth0|***************","__v":0}

Error response

Error response - Error 4xx

Name Type Description
HTTP/1.1

400 Bad Request

Get Recipes

Back to top

Get users saved recipes.

Authentication needed

GET /get_recipes

Examples

Example usage:

https://recipeify.com/api/users/get_recipes

Success response

Success response - Success 200

Name Type Description
items Object[]

List of saved recipes.

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{items: [{id: "budgetbytes-13214", title: "Broccoli Fettuccine Alfredo",…}]}

Get Recipes Ids

Back to top

Get users saved recipes.

Authentication needed

GET /get_recipes_ids

Examples

Example usage:

https://recipeify.com/api/users/get_recipes_ids

Success response

Success response - Success 200

Name Type Description
recipes Object[]

List of saved recipes.

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{"recipes":{"recipes":["budgetbytes-13214","epicurious-564e203865f5621c7a182195","epicurious-54a4233e6529d92b2c009929"],"_id":"auth0|**************"}}

Add Recipes

Back to top

Add recipes to users saved recipes.

Authentication needed

POST /add_recipes

Parameters - request Payload

Name Type Description
recipes Object[]

List of recipes to add.

{recipes: ["bbcgoodfood-6571451"]}

Examples

Example usage:

https://recipeify.com/api/users/add_recipes

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK

Error response

Error response - Error 4xx

Name Type Description
HTTP/1.1

400 Bad Request

Remove Recipes

Back to top

Remove recipes from users saved recipes.

Authentication needed

POST /remove_recipes

Parameters - request Payload

Name Type Description
recipes Object[]

List of recipes to remove.

{recipes: ["bbcgoodfood-6571451"]}

Examples

Example usage:

https://recipeify.com/api/users/remove_recipes

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK

Error response

Error response - Error 4xx

Name Type Description
HTTP/1.1

400 Bad Request

Recipes Viewed

Back to top

Add recipes to recently viewed list.

Authentication needed

POST /recipes_viewed

Parameters - request Payload

Name Type Description
recipes Object[]

List of recipes to add.

{recipes: ["bbcgoodfood-6571451"]}

Examples

Example usage:

https://recipeify.com/api/users/recipes_viewed

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK

Error response

Error response - Error 4xx

Name Type Description
HTTP/1.1

400 Bad Request

Recently Viewed

Back to top

Add recipes to recently viewed list.

Authentication needed

POST /recently_viewed

Parameters - request Payload

Name Type Description
count Int

number of recipes.

Examples

Example usage:

https://recipeify.com/api/users/recently_viewed

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{recipes: ["bbcgoodfood-6571451"]}

Clone this wiki locally