# Foodpairing

### Use-case request examples

#### Get suitable recipes by a canonical name of a product

Currently supported search by RED WINE, WHITE WINE, SPARKLING WINE, PORT WINE.

The complete schema for request and response with paging can be found in [API Spec](https://api.whisk.com/spec/#/FoodPairingAPI/FoodPairingAPI_GetRecipesByProduct)

```
curl -X POST "https://api.whisk.com/foodpairing/v2/get" \
-H "accept: application/json" \
-H "Authorization: Bearer %USER_TOKEN%" \
-H "Content-Type: application/json" \
-d "{ \"canonical_name\": \"RED WINE\" }"
```

#### Get well-with products for a recipe

An inside-out version of the method above. Allows to get products that accompany well a certain recipe. Flag `products_only_from_foodlist` makes it possible to filter out products a user does not have.

```
curl -X POST --location "https://api.whisk.com/foodpairing/v2/get/by_recipe" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer %USER_TOKEN%" \
-d "{
  \"recipe_id\": \"1010ea47e45b8a17393f4aac6346dc0bca01a3cd42c\",
  \"products_only_from_foodlist\": false,
  \"cursor\": {
    \"limit\": 10
  }
}"
```

#### &#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.whisk.com/api/foodpairing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
