# io.kich.grocery.getCurrentList

> Published by [kich.io](https://lexicon.garden/identity/did:plc:uxjwdy4wvuridijisalvxlxe)

✓ This is the authoritative definition for this NSID.

## Description

The household's current shopping list and the recipes attached to it — which is what 'what are we cooking this week' means in this product. Read-only.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:uxjwdy4wvuridijisalvxlxe/io.kich.grocery.getCurrentList)
- [Documentation](https://lexicon.garden/lexicon/did:plc:uxjwdy4wvuridijisalvxlxe/io.kich.grocery.getCurrentList/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:uxjwdy4wvuridijisalvxlxe/io.kich.grocery.getCurrentList/examples)

## Definitions

### `io.kich.grocery.getCurrentList`

**Type**: `query`

Get the latest grocery list that has not been archived, together with the recipes attached to it. Ordered by `plannedDate` where one is set and by the order they were added where it is not.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `household` | `string` | Yes | The household whose list to read. Must be the household the credential is scoped to. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `list` | `ref` → `io.kich.grocery.defs#groceryListView` | No | Absent when the household has never made a list. `recipes` is then empty too, and that is a state to draw rather than an error. |
| `recipes` | `array` | Yes |  |

#### Errors

- **AuthRequired**: No bearer token, or one this endpoint does not accept.
- **HouseholdNotFound**: No such household, or the credential is not scoped to it.

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Get the latest grocery list that has not been archived, together with the recipes attached to it. Ordered by `plannedDate` where one is set and by the order they were added where it is not.",
      "errors": [
        {
          "description": "No bearer token, or one this endpoint does not accept.",
          "name": "AuthRequired"
        },
        {
          "description": "No such household, or the credential is not scoped to it.",
          "name": "HouseholdNotFound"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "list": {
              "description": "Absent when the household has never made a list. `recipes` is then empty too, and that is a state to draw rather than an error.",
              "ref": "io.kich.grocery.defs#groceryListView",
              "type": "ref"
            },
            "recipes": {
              "items": {
                "ref": "io.kich.grocery.defs#plannedRecipe",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "recipes"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "household": {
            "description": "The household whose list to read. Must be the household the credential is scoped to.",
            "type": "string"
          }
        },
        "required": [
          "household"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "description": "The household's current shopping list and the recipes attached to it — which is what 'what are we cooking this week' means in this product. Read-only.",
  "id": "io.kich.grocery.getCurrentList",
  "lexicon": 1
}
```
