Whisk Docs
Whisk HomeHelp CenterDeveloper Tools
v2.0.0
v2.0.0
  • The Whisk Platform
  • Whisk API Overview
    • Introduction
    • Integration
    • Authentication
      • Server Token
      • User Access Token
        • Auth Flow Example
      • Client Token
      • Anonymous Access from Client Apps
    • Whisk Sandbox
    • Getting Started
  • Whisk API Reference 2.0
    • Provisioning
      • Get provisioning
    • Autocomplete
    • Community
      • Get your Communities
      • Get Communities from a Topic
      • Discover Recommended Communities
      • Search Communities
      • Get a Community
      • Get Recipes from a Community
      • Add Recipes to a Community
      • Remove a Recipe from a Community
      • Join a Community
      • Leave a Community
    • Posts and Reviews
      • Get reviews for a recipe
      • Create or edit review
      • Create a Post
      • Get Post by id
      • Delete a Post
      • Edit a Post
      • Report a Post
      • Create a Post Reply
      • Get Post Replies
      • Delete a Post reply
      • Report a Post reply
      • Like a Post or Reply
      • Users who liked a Post or Reply
    • Public profiles
      • Hide recipe in Public profile
      • Get Recipes for Public Profile
      • Get User's public profile by user_id
      • Get User's public profile by username
    • Custom Label
    • Feed
      • Obtain a Recipe Feed
    • Food DB
      • Autocomplete
      • Search
      • Get Food
    • Food List
    • Food Log
    • Foodpairing
    • Healthy meal recommendations
      • Healthy recipe only recommendations for DA
      • Recipe recommendations for SH
      • Tailored Plan API request for Samsung TV
    • Meal Plan
      • Generate a Meal Plan
      • Meal Object
        • Get Meals
        • Delete Meal
        • Add a Meal
      • Meal Plan Settings Object
        • Get Meal Plan Settings
        • Update Meal Plan Settings
      • Meal Plan Batch
    • Recipe
      • Get a Recipe
      • Search a Recipe
      • User Recipes & Collections
        • Add User Recipe
        • Create A Recipe
        • Update External Recipe
        • Get All User Recipes
        • Update User Recipe
        • Remove Recipe from Favorites
        • Create Collection
        • Get All User Collections
        • Get Collection
        • Get Recipes from a Collection
        • Remove Collection
        • Get Smart Collection
        • Get Recipes from a Smart Collection
    • Shopping List
      • Get your Shopping Lists
      • Get a Shopping List
      • Create a Shopping List
      • Delete a Shopping List
      • Update basic details of a Shopping List
      • Move Items between Shopping Lists
      • Add Items to a Shopping List
      • Delete an Item from a Shopping List
      • Update an Item in a Shopping List
      • Clear Items from a Shopping List
    • Media
    • Store Item
    • Unit Conversion
    • Users
      • Get a User
      • Update User Settings using Patch
      • Update User Settings using Post
    • Try it out!
  • Shopping List SDK
    • Overview
    • Examples
      • Shoppable Recipes
      • Shoppable Products
      • Shoppable Media
    • Basic Setup
      • Basic Setup
      • Methods
      • Event Listeners
      • Widget
      • Subscriptions
      • Global Configuration
      • UTM Parameters
      • Using With SPA
  • Shopping List Mobile API
    • Overview
    • Examples
    • Reference
  • API Resources
    • Authentication Scopes
    • Errors and Troubleshooting
    • Cursor Pagination
    • Limits
    • Nutrients
    • Recipe Labels
    • Filtering Recipes using Custom Labels
    • Health Score, Glycemic Index, Glycemic Load
    • Whisk User Data
    • Integrated Retailers
    • Optimizing Image Load
    • Meal Plan
Powered by GitBook
On this page
  • Add Recipes
  • Request Body Object Example
  • Sample Request and Response

Was this helpful?

  1. Whisk API Reference 2.0
  2. Community

Add Recipes to a Community

This endpoint allows you add a batch of existing recipes in a community.

Add Recipes

POST https://api.whisk.com/community/v2/{community_id}/recipes

You can use the following parameters to add recipes to a particular community:

Path Parameters

Name
Type
Description

community_id

string

The community identifier. For example, 39d539c738eb47debfb1a6319d34235a.

Headers

Name
Type
Description

Authentication

string

User Access token containing community:write scope to authorize the API usage. For more information, see Authentication.

Request Body

Name
Type
Description

body

object

A body object contains one or more recipe identifiers representing the recipes to be added to the community. See the Body Object Example below.

{
  "recipes": [
    {
      "success": {
        "recipe": {
          "id": "string",
          "name": "string",
          "description": "string",
          "ingredients": [
            {
              "text": "string",
              "group": "string",
              "linked_products": [
                {
                  "id": "string",
                  "name": "string",
                  "images": [
                    {
                      "responsive": {
                        "url": "string",
                        "width": 0,
                        "height": 0,
                        "selection": {
                          "x": 0,
                          "y": 0,
                          "width": 0,
                          "height": 0
                        }
                      },
                      "url": "string"
                    }
                  ],
                  "description": "string",
                  "url": "string",
                  "price": {
                    "rrp": {
                      "currency_code": "string",
                      "cents": "string"
                    }
                  },
                  "gtin": "string",
                  "brand": {
                    "raw_name": "string"
                  }
                }
              ]
            }
          ],
          "instructions": {
            "steps": [
              {
                "text": "string",
                "images": [
                  {
                    "responsive": {
                      "url": "string",
                      "width": 0,
                      "height": 0,
                      "selection": {
                        "x": 0,
                        "y": 0,
                        "width": 0,
                        "height": 0
                      }
                    },
                    "url": "string"
                  }
                ],
                "group": "string",
                "intents": [
                  {
                    "name": "string",
                    "options": [
                      {
                        "key": "string",
                        "value": 0,
                        "unit": "string"
                      }
                    ]
                  }
                ],
                "labels": [
                  {
                    "name": "string",
                    "labels": [
                      {
                        "name": "string"
                      }
                    ]
                  }
                ],
                "instruction_intents": {
                  "attributes": [
                    {
                      "attribute_value": {
                        "duration": {
                          "value": {
                            "range_value": {
                              "from": 0,
                              "to": 0
                            },
                            "plain_value": 0
                          },
                          "unit": "UNIT_INVALID"
                        },
                        "temperature": {
                          "value": {
                            "range_value": {
                              "from": 0,
                              "to": 0
                            },
                            "plain_value": 0
                          },
                          "unit": "UNIT_INVALID"
                        }
                      },
                      "span": {
                        "start": 0,
                        "end": 0
                      },
                      "equipment_action": {
                        "oven": {
                          "action": "ACTION_INVALID",
                          "mode": "MODE_INVALID"
                        }
                      }
                    }
                  ]
                }
              }
            ]
          },
          "images": [
            {
              "responsive": {
                "url": "string",
                "width": 0,
                "height": 0,
                "selection": {
                  "x": 0,
                  "y": 0,
                  "width": 0,
                  "height": 0
                }
              },
              "url": "string"
            }
          ],
          "videos": [
            {
              "content_url": "string",
              "embed_url": "string",
              "thumbnail": "string"
            }
          ],
          "source": {
            "name": "string",
            "display_name": "string",
            "source_recipe_url": "string",
            "image": {
              "responsive": {
                "url": "string",
                "width": 0,
                "height": 0,
                "selection": {
                  "x": 0,
                  "y": 0,
                  "width": 0,
                  "height": 0
                }
              },
              "url": "string"
            },
            "license": "LICENCE_INVALID"
          },
          "servings": 0,
          "servings_scaled": 0,
          "durations": {
            "cook_time": 0,
            "prep_time": 0,
            "total_time": 0
          },
          "normalized_ingredients": [
            {
              "text": "string",
              "group": "string",
              "analysis": {
                "product": {
                  "canonical_name": "string",
                  "original_name": "string"
                },
                "category": {
                  "canonical_name": "string"
                },
                "brand": {
                  "canonical_name": "string"
                },
                "quantity": 0,
                "unit": "string",
                "multiplier": 0,
                "comment": "string",
                "image_url": "string"
              },
              "source_text": "string",
              "labels": [
                {
                  "name": "string",
                  "labels": [
                    {
                      "name": "string"
                    }
                  ]
                }
              ],
              "id": "string"
            }
          ],
          "nutrition": {
            "status": "STATUS_INVALID",
            "total": [
              {
                "label": "string",
                "code": "NUTRITION_CODE_INVALID",
                "value": 0,
                "unit": "NUTRITION_UNIT_INVALID"
              }
            ],
            "coverage": 0,
            "labels": [
              {
                "name": "string",
                "display_name": "string"
              }
            ],
            "health_score": {
              "value": 0,
              "nutrients_influence": [
                {
                  "code": "NUTRITION_CODE_INVALID",
                  "influence": 0,
                  "comment": "string"
                }
              ]
            },
            "glycemic_index": {
              "value": 0
            },
            "glycemic_load": {
              "value": 0
            }
          },
          "labels": {
            "meal_type": [
              {
                "name": "string",
                "display_name": "string"
              }
            ],
            "cuisine": [
              {
                "name": "string",
                "display_name": "string"
              }
            ],
            "category": [
              {
                "name": "string",
                "display_name": "string"
              }
            ],
            "technique": [
              {
                "name": "string",
                "display_name": "string"
              }
            ],
            "holiday": [
              {
                "name": "string",
                "display_name": "string"
              }
            ],
            "seasonality": [
              {
                "name": "string",
                "display_name": "string"
              }
            ]
          },
          "constraints": {
            "violates": {
              "diets": [
                "DIET_INVALID"
              ],
              "avoidances": [
                "AVOIDANCE_INVALID"
              ]
            }
          },
          "saved": {
            "value": true,
            "collection_ids": [
              "string"
            ],
            "owner": true,
            "recipe_type": "RECIPE_TYPE_INVALID"
          },
          "author": {
            "name": "string",
            "image": {
              "responsive": {
                "url": "string",
                "width": 0,
                "height": 0,
                "selection": {
                  "x": 0,
                  "y": 0,
                  "width": 0,
                  "height": 0
                }
              },
              "url": "string"
            }
          },
          "language": "string",
          "custom_labels": [
            {
              "name": "string",
              "labels": [
                {
                  "name": "string"
                }
              ]
            }
          ]
        }
      },
      "error": "COMMUNITY_RECIPE_ADDITION_ERROR_INVALID"
    }
  ]
}
{
  "error_code": "REAL_CODES_ARE_IN_ENDPOINT_DESCRIPTION",
  "message": "Additional details about error are not static and can be changed"
}
{
  "code": "auth.tokenNotFound"
}
This is unexpected response, something is wrong on our side, please contact: [email protected]

Request Body Object Example

{
  "recipe_ids": [
    "101289f373d7690500330adc596629a5556d973830d",
    "101772a1db675504ef37b28e918643d571decf6ddb5"
  ]
}

You can add a list of recipe identifiers in the recipe_ids array to add them to the community.

Sample Request and Response

curl -X POST "https://api.whisk.com/community/v2/39d539c738eb47debfb1a6319d34235a/recipes"
    -H "Accept: application/json" 
    -H "Authorization: Bearer <YOUR-API-ACCESS-KEY>"
    -d "{ \"recipe_ids\": [ \"101289f373d7690500330adc596629a5556d973830d\", \"101772a1db675504ef37b28e918643d571decf6ddb5\" ]}"
{
  "recipes": [
    {
      "success": {
        "recipe": {
          "id": "101289f373d7690500330adc596629a5556d973830d",
          "name": "Chocolate Coffee Avocado Pudding",
          "description": "Creamy, whipped and airy pudding made with ripe avocados that will please any chocolate lover with healthy ingredients! Delicious and easy, it takes 5 minutes and your pudding is ready!",
          "ingredients": [
            ...
          ],
          "images": [
            ...
          ],
          "videos": [
            ...
          ],
          "source": {
            ...
          },
          "servings": 4,
          "durations": {
            ...
          },
          "labels": {
            ...
          },
          "constraints": {
            ...
          },
          "author": {
            "name": "Lama"
          },
          "language": "en"
        }
      }
    },
    {
      "success": {
        "recipe": {
          "id": "101772a1db675504ef37b28e918643d571decf6ddb5",
          "name": "Apple bundt cake with cake mix",
          "description": "This Fresh apple cake recipe is the perfect fall treat! Tender, moist, and deliciously spiced with cinnamon and cardamom, it's a wonderfully decadent dessert for the whole family.",
          "ingredients": [
            ...
          ],
          "images": [
            ...
          ],
          "videos": [
            ...
          ],
          "source": {
            ...
          },
          "servings": 10,
          "durations": {
            ...
          },
          "labels": {
            ...
          },
          "constraints": {
            ...
          },
          "author": {
            "name": "Jeehan"
          },
          "language": "en"
        }
      }
    }
  ]
}

PreviousGet Recipes from a CommunityNextRemove a Recipe from a Community

Last updated 4 years ago

Was this helpful?

Whisk allows you to discover and understand its API capabilities on the Swagger interface with the ability to try out the API calls directly in your browser. You can call this endpoint .

To understand the data structure of a recipe definition, see .

here
Recipe Object