skip to main content

API v1 Documentation
API v2 Documentation

API Use Cases

Retrieve a user's inventory and display all recipes.

  1. Use users/sign_in to get an auth token to use for future api calls.
  2. Use bars/inventory to get the user's inventory bar id.
  3. Use bars/recipes to get the ids of the recipes in the user's active bar.
  4. Use recipes/show to show each individual recipe in the user's active bar.








users/sign_in

Sign a user in and get a Devise auth token to user for subsequent requests.

example




example return data (JSON)

Successful login:

{
  "success": true,
  "auth_token": "i4aaon2MwVRdTsSpxqmq",
  "email": "[email protected]"
}

Incorrect email or password:

{
  "success": false,
  "errors": "Invalid email or password."
}









/api/v2/bars/add_ingredient.json

Add an ingredient to a bar.

example





example output appears here...


/api/v2/bars/add_recommendation.json

Add a recommendation to a bar.

example





example output appears here...


/api/v2/bars/custom_bars.json

Show all of the bars that belong to a user.

example



example output appears here...


/api/v2/bars/ingredients.json

Show all of the ingredients that a bar has.

example



example output appears here...


/api/v2/bars/inventory.json

Show which bar is the current user's inventory bar.

example



example output appears here...


/api/v2/bars/recipes.json

Show all of the recipes that a bar can make.

example



example output appears here...


/api/v2/bars/remove_ingredient.json

Remove an ingredient from a bar.

example





example output appears here...


/api/v2/bars/remove_recommendation.json

Remove a recommendation from a bar.

example





example output appears here...


/api/v2/bars/shopping_list.json

Show which bar is the current user's shopping list.

example



example output appears here...


/api/v2/bars/show.json

Show the ingredients and recipes for a bar.

example



example output appears here...


/api/v2/ingredients/create.json

Create a new ingredient.

example




example output appears here...


/api/v2/ingredients/show.json

Show the details of an ingredient (the ingredient's name).

example



example output appears here...


/api/v2/ingredients/updated_since.json

Show which ingredients have been updated since a previous date (including ingredients updated on that date).

example



example output appears here...


/api/v2/recipes/rate.json

Rate a recipe 1, 2, 3, 4, or 5 stars.

example






example output appears here...


/api/v2/recipes/show.json

Show a recipe (ingredients, instructions, images, etc.).

example



example output appears here...


/api/v2/recipes/updated_since.json

Show which recipes have been updated since a previous date (including recipes updated on that date).

example



example output appears here...


/api/v2/recommendations/create.json

Create a new recommendation for an ingredient.

example






example output appears here...


/api/v2/recommendations/rate.json

Rate a recommendation 1, 2, 3, 4, or 5 stars.

example






example output appears here...


/api/v2/upc/lookup.json

Return a list of Recommendations with a match score for each.

example



example output appears here...


/api/v2/users/show_current.json

Show details about the current user (the user's username).

example



example output appears here...


/api/v2/videos/index.json

List all of the video tutorials currently on the site.

example


example output appears here...


/users/auth/google_oauth2/callback.json

Turn a google OAuth2 auth code into an access_token and an id_token.

example



example output appears here...