# Get a Shopping List

## Get Shopping List

<mark style="color:blue;">`GET`</mark> `https://api.whisk.com/list/v2/{id}`

You can append the following path parameter to the base URL to pull details of a particular shopping list:

#### Path Parameters

| Name | Type   | Description                   |
| ---- | ------ | ----------------------------- |
| id   | string | The shopping list identifier. |

#### Headers

| Name           | Type   | Description                                                                                                                                    |
| -------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| Authentication | string | Server token or a User Access token containing`shopping_list:read` scope to authorize the API usage. For more information, see Authentication. |

```graphql
{
  "list": {
    "id": "string",
    "name": "string",
    "primary": true
  },
  "content": {
    "items": [
      {
        "id": "string",
        "item": {
          "name": "string",
          "brand": "string",
          "comment": "string",
          "quantity": 0,
          "unit": "string"
        },
        "checked": true,
        "image_url": "string",
        "analysis": {
          "product": {
            "canonical_name": "string",
            "original_name": "string"
          },
          "category": {
            "canonical_name": "string"
          },
          "brand": {
            "canonical_name": "string"
          }
        },
        "recipe": {
          "recipe_id": "string",
          "position": 0
        },
        "combined": {
          "combined_item_id": "string",
          "quantity": 0
        },
        "created_time": "string",
        "updated_at": "string",
        "matching_properties": {
          "gtin": "string",
          "custom_product_id": "string"
        }
      }
    ],
    "combined_items": [
      {
        "id": "string",
        "item": {
          "name": "string",
          "brand": "string",
          "comment": "string",
          "quantity": 0,
          "unit": "string"
        },
        "checked": true,
        "image_url": "string",
        "analysis": {
          "product": {
            "canonical_name": "string",
            "original_name": "string"
          },
          "category": {
            "canonical_name": "string"
          },
          "brand": {
            "canonical_name": "string"
          }
        },
        "created_time": "string",
        "updated_at": "string"
      }
    ],
    "recipes": [
      {
        "id": "string",
        "name": "string",
        "images": [
          {
            "responsive": {
              "url": "string",
              "width": 0,
              "height": 0,
              "selection": {
                "x": 0,
                "y": 0,
                "width": 0,
                "height": 0
              }
            },
            "url": "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"
        }
      }
    ]
  }
}
```

```yaml
{
  "error_code": "REAL_CODES_ARE_IN_ENDPOINT_DESCRIPTION",
  "message": "Additional details about error are not static and can be changed"
}
```

{% tab title="401 This failed response appears due to API authentication failure. The possible error codes that may appear are: auth.tokenNotFound , auth.tokenExpired, auth.tokenInvalid, auth.tokenRequired." %}

```yaml
{
  "code": "auth.tokenNotFound"
}
```

```yaml
This is unexpected response, something is wrong on our side, please contact: help@whisk.com
```

### Sample Request and Response

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

```bash
curl -X GET "https://api.whisk.com/list/v2/106c5fa85ddbba343099347c57e54632500"
    -H "Accept: application/json"
    -H "Authorization: Bearer <YOUR-API-ACCESS-KEY>"
```

{% hint style="info" %}
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 [here](https://api.whisk.com/spec/#/ShoppingListAPI/ShoppingListAPI_GetList).
{% endhint %}
{% endtab %}

{% tab title="Response" %}

```graphql
{
  "community": {
    "id": "39d539c738eb47debfb1a6319d34235a",
    "name": "WAPID Community",
    "image": {
        "url": "https://image-cdn.whisk.com/image/upload/v1611066523/v3/user-recipes/nfaul13bavzqyiirk0sl.jpg",
        "width": 1280,
        "height": 854
        "selection": {
          "x": 0,
          "y": 88,
          "width": 422,
          "height": 767
    },
    "description": "Food and fun with WAPID!",
    "topics": [
      {
        "id": "914d167bb1754adbbcd1f085cdcc4f6c",
        "display_name": "Family Friendly"
      }
    ],
    "social_settings": {
      "website_url": "https://wapid.com/",
      "instagram_username": "wapid",
      "youtube_channel_url": "https://www.youtube.com/channel/WAPID",
      "tiktok_username": "wapid"
    },
     "permissions": {
      "role": "COMMUNITY_ROLE_OWNER",
      "mode": "COMMUNITY_CONTRIBUTION_PERMISSION_MODE_ANYONE",
      "visibility": "COMMUNITY_VISIBILITY_PUBLIC"
    },
    "members": {
      "count": 1
    },
    "recipes": {
      "count": 2
    },
    "is_sponsored": true
  }
}
```

{% hint style="info" %}
**Note**: To understand the data structure of a shopping list definition, see [Shopping List Object](https://docs.whisk.com/api/shopping-lists/..#shopping-list-object).
{% endhint %}
{% endtab %}
{% endtabs %}
