# Shopping List by Recipes

A shopping list in Suggestic is a collection of ingredients originating from recipes previously added to the list using the [addToShoppingList ](/graphql/query/mutations/shopping-list/shopping-list.md)mutation.&#x20;

Use the `shoppingList` query to obtain the list of recipes added to the shopping list.

### Available Fields

| Field                                                | Type    | Note                                                                                                                      |
| ---------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------- |
| `ingredient`                                         | String  | Item in the shopping list                                                                                                 |
| `quantity`                                           | String  | Quantity of the ingredient (item)                                                                                         |
| `floatQuantity`                                      | Float   | Item quantity as float                                                                                                    |
| [`aisleName`](/graphql/objects/common/aisle-name.md) | String  | Name of the aisle in which the ingredient (item) can be found. See options [here](/graphql/objects/common/aisle-name.md). |
| `recipeName`                                         | String  | Name of the recipe                                                                                                        |
| `isDone`                                             | Boolean | True if the item is checked                                                                                               |

### Example

#### GraphQL Example

{% tabs %}
{% tab title="Query" %}

```graphql
{
  shoppingList {
    edges {
      node {
        ingredientLine
        quantity
        aisleName
        recipeName
        isDone
        unit
        databaseId
      }
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
  "data": {
    "shoppingList": {
      "edges": [
        {
          "node": {
            "ingredientLine": "16.4 grams non-diatatic malt powder (or barley malt syrup, or even brown sugar)",
            "quantity": "16.4",
            "aisleName": "Other",
            "recipeName": "Sourdough Bagels",
            "isDone": false,
            "unit": "grams",
            "databaseId": "05567b8f-ec1c-4f9d-8ed4-43ced7d36d26"
          }
        },
        {
          "node": {
            "ingredientLine": "1/2 cup pure cane syrup",
            "quantity": "1/2",
            "aisleName": "Other",
            "recipeName": "Glazed Turnips",
            "isDone": false,
            "unit": "cup",
            "databaseId": "57cd3daa-8499-47be-a126-be8eae7e1a4c"
          }
        },
        {
          "node": {
            "ingredientLine": "olive oil",
            "quantity": null,
            "aisleName": "Fats and Oils",
            "recipeName": "Glazed Turnips",
            "isDone": false,
            "unit": null,
            "databaseId": "195c0e2f-302f-4f65-8982-aa13fee2f8d5"
          }
        },
        {
          "node": {
            "ingredientLine": "1 tablespoon mccormick's montreal seasoning",
            "quantity": "1",
            "aisleName": "Other",
            "recipeName": "Glazed Turnips",
            "isDone": false,
            "unit": "tablespoon",
            "databaseId": "1440ca08-396a-4b58-a0b4-8ed9ed98c532"
          }
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}

#### cURL Example

{% tabs %}
{% tab title="Request" %}

```json
curl -XPOST 'https://production.suggestic.com/graphql' \
  -H 'Authorization: Bearer <User-JWT>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"query":"{  shoppingList { edges {node {ingredientLine quantity aisleName recipeName isDone unit  databaseId  errors   }  }  }}"}'

```

{% endtab %}
{% endtabs %}

#### UI/UX example

In the same way, we have code examples, this is an implementation example in which see results of the API execution in the Suggestic App.&#x20;

Login to the App, tap on the **Meal Plan** option, and tap on the <img src="/files/-MkJ7tzZGCrCk6vFSuKk" alt="" data-size="line"> icon to access the Shopping List, Tap on **By Recipe** tab and see the list of recipes added.

![](/files/pD7QBxzubWGpp5d5LPdM)

## Get Shopping List Aggregate

Use `shoppingListAggregate` to obtain the ingredients for the recipe added to the shopping list. If more than one recipe is added to the shopping list, this will show the cumulative ingredients.

### Available Fields

| Field        | Type   | Note                                                                                      |
| ------------ | ------ | ----------------------------------------------------------------------------------------- |
| `ingredient` | String | Item in the shopping list                                                                 |
| `quantity`   | String | Item (ingredient) quantity                                                                |
| `aisleName`  | String | Name of the aisle in which the ingredient (item) can be found                             |
| `unit`       | String | Unit of measurement. Possible Values: `cup`, `spoon`, `ounces`, `teaspoon`, `tablespoon.` |
| `grams`      | Float  | Recipe measurement. Use this value as a reference only.                                   |
| `isDone`     | Bool   | True if the item is checked                                                               |

### Example

#### GraphQL Example

{% tabs %}
{% tab title="Query" %}

```graphql
query {
  shoppingListAggregate {
    edges {
      node {
        databaseId
        ingredient
        aisleName
        quantity
        unit
        grams
        isDone
      }
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
  "data": {
    "shoppingList": {
      "edges": [
        {
          "node": {
            "databaseId": "856f3e88-ebde-4dc8-a38b-af3dd4c8a291",
            "ingredient": "olive oil",
            "aisleName": "Pantry",
            "quantity": "1/2",
            "grams": 2.25,
            "isDone": false
          }
        },
        {
          "node": {
            "databaseId": "9bfdfe98-6cb2-4293-9146-c8298c06a243",
            "ingredient": "avocado",
            "asileName": "Pantry",
            "quantity": "1",
            "grams": 201,
            "isDone": false
          }
        }
      ]
    },
    "shoppingListAggregate": {
      "edges": [
        {
          "node": {
            "databaseId": "23cb01bf-50be-40cb-871d-954baa15fa79",
            "ingredient": "salt",
            "aisleName": "Pantry",
            "quantity": 6,
            "unit": "dash",
            "grams": 2.25,
            "isDone": false
          }
        },
        {
          "node": {
            "databaseId": "dcbd2ca8-d455-4944-895f-784825cc18ed",
            "ingredient": "avocado",
            "aisleName": "Pantry",
            "quantity": 2,
            "unit": "cup, pureed",
            "grams": 402,
            "isDone": false
          }
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}

#### cURL Example

{% tabs %}
{% tab title="Request" %}

```json
curl -XPOST 'https://production.suggestic.com/graphql' \
  -H 'Authorization: Bearer <User-JWT>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"query":"{  shoppingListAggregate  { edges {node {databaseId ingredient aisleName quantity unit grams  isDone   }  }  }}"}'

```

{% endtab %}
{% endtabs %}

#### UI/UX example

In the same way, we have code examples, this is an implementation example in which see results of the API execution in the Suggestic App.&#x20;

Login to the App, tap on the **Meal Plan** option, and tap on the <img src="/files/-MkJ7tzZGCrCk6vFSuKk" alt="" data-size="line"> icon to access the Shopping List, Tap on **By Aisle** tab and see the list of ingredients per each recipe:

![](/files/s48n9qj5BWMZ1VTFTFl7)


---

# 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.suggestic.com/graphql/query/queries/shopping-list/shopping-list-1.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.
