---
title: "list bottle"
method: GET
path: "/cellar/accounts/{accountID}/bottles"
tags: ["bottle"]
---

# list bottle

`GET /cellar/accounts/{accountID}/bottles`

## Request

- Base URL: `http://localhost:8081`
- URL: `http://localhost:8081/cellar/accounts/{accountID}/bottles`
- Auth: none declared

List all bottles in account optionally filtering by year

## Path parameters

- `accountID` integer, required

## Query parameters

- `years` integer[]

## Response `200`

OK

- Bottle[]: BottleCollection is the media type for an array of Bottle (default view)
  - `account` AccountTiny: A tenant account (tiny view)
    - `href` string, required: API href of account
    - `id` integer, required: ID of account
    - `name` string, required: Name of account
  - `href` string, required: API href of bottle
  - `id` integer, required: ID of bottle
  - `links` BottleLinks: BottleLinks contains links to related resources of Bottle.
    - `account` AccountLink: A tenant account (link view)
      - `href` string, required: API href of account
      - `id` integer, required: ID of account
  - `name` string, required
  - `rating` integer: Rating of bottle between 1 and 5
  - `varietal` string, required
  - `vineyard` string, required
  - `vintage` integer, required

## Other responses

- `400`: Bad Request
- `404`: Not Found

## Changes

- **2016-09-06** `8088021c4e6c`: 1 info
  - endpoint added
- **2016-07-29** `8f876193ca58`: 1 breaking
  - api path removed without deprecation
- **2016-07-28** `748422eb22fb`: 1 info
  - added the non-success response with the status `400`
- **2016-07-07** `f95e907821c4`: 1 info
  - api tag `bottle` added
- **2016-06-06** `8d689f844995`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/goadesign/apis/the-virtual-wine-cellar/changes/cellar/accounts/:accountID/bottles/get.md)

---

[API](https://skmtc.dev/goadesign/apis/the-virtual-wine-cellar.md) - [All operations](https://skmtc.dev/goadesign/apis/the-virtual-wine-cellar/llms.txt) - [OpenAPI document](https://skmtc.dev/goadesign/apis/the-virtual-wine-cellar/revisions/348fc24f05fe?raw)
