Return to documentation index

beers

The beers API retrieves a list of all beers sold by the account. This may include beers that are currently out of stock.

Parameters

  • api_key (string) Required - The API key for the account
  • last_updated_at (datetime) Optional - If this parameter is supplied, only beers whose last edited date is after the supplied date and time will be returned. The parameter should be formatted as "YYYY-MM-DD HH:MM:SS" and will be interpreted as a UTC date and time value.

Response

The beers API returns a JSON array of beers. Each member of the array includes these attributes:

  • id - Unique identifier.
  • updated_at - The date that this beer was last edited.
  • created_at - The initial date that this beer was created.
  • name - The display name of the beer.
  • description - The description of the beer.
  • abv - The alcohol by volume of the beer.
  • ibu - The International Bitterness Units (IBU) measurement of the beer.
  • beer_region_id - The unique identifier of a region where this beer is bottled.
  • brewery_id - The unique identifier of a brewery that produced this beer.
  • brewery_name - The name of the brewery that produced this beer.
  • beer_color - The color of this beer.
  • hidden_search_terms - Search terms for which this beer should be returned. This attribute is not itself displayed on the Tastevin iOS user interface.
  • rating_source - Source of the rating (if any).
  • rating_value - Single alphanumeric rating.
  • accolades - Array of accolades for this beer. Each accolade is characterized by the accolade attributes below.
  • beer_style - The style of this beer. Each beer_style is a JSON object with the attributes listed below.

Accolade attributes

  • id - Unique identifier.
  • updated_at - The date that this accolade was last edited.
  • created_at - The initial date that this accolade was created.
  • beverage_id - The unique identifier of the beer to which this accolade belongs.
  • author - The author of the accolade.
  • body - The text of the accolade.
  • owner_id - The unique identifier of the account that input this accolade.
  • published_at - The date of publication of this accolade.
  • source - The source of this accolade.
  • title - The title of this accolade.

Beer Style attributes

  • id - Unique identifier.
  • updated_at - The date that this beer style was last edited.
  • created_at - The initial date that this beer style was created.
  • name - The name of the beer style.
  • ordinal - The relative order of the style when displayed in a list of styles.

Notes

A beer may include a brewery_name attribute even if brewery_id returns null. If there is a brewery_id then brewery_name will return the same name as retrieving the name attribute from the linked brewery.

The id attribute is used by the beer_list API to indicate the beer to which each beer SKU belongs.

Sample Request

https://dashboard.onpremisewine.com/beers.json?api_key=ABCDEF123456

Sample Response

{
  "beverages": [
    {
      "id": 5592,
      "updated_at": "2012-01-12T20:29:41-08:00",
      "created_at": "2012-01-11T23:48:14-08:00",
      "name": "Lagunitas IPA",
      "description": "Strong hoppy nose with mild bitterness on the palate. The flavor consists of Coriander, Lemon and Orange zest. The lingering Nuttmeg and Allspice will surely leave you savoring every sip.",
      "abv": 6.2,
      "ibu": null,
      "beer_region_id": 1960,
      "brewery_id": null,
      "brewery_name": "Lagunitas",
      "beer_color": "Butterscotch",
      "hidden_search_terms": null,
      "rating_source": "Beer Advocate",
      "rating_value": "A+",
      "accolades": [],
      "beer_style": {
        "id": 116,
        "updated_at": "2012-01-12T09:54:16-08:00",
        "created_at": "2012-01-12T09:54:16-08:00",
        "name": "India Pale Ale",
        "ordinal": 115
      }
    },
    {
      "id": 5612,
      "updated_at": "2012-01-12T20:46:34-08:00",
      "created_at": "2012-01-12T20:35:47-08:00",
      "name": "Trumer Pils",
      "description": "Trumer takes the Bavarian approach to pilsner beer: a much more focused hop bitterness than the rounder Pilsen examples. Our tasters were enthusiastically receptive to the bright, spicy hop nose and the focused bitterness, which was a little less laser-like than some of the pilsners from Munich. The aftertaste was a little harsh, but the opportunity to sample traditionally styled pils in fresh bottles that haven’t been subjected to long voyages at sea is worth taking. ",
      "abv": 4.9,
      "ibu": null,
      "beer_region_id": 1961,
      "brewery_id": null,
      "brewery_name": "Trumer Brauerei",
      "beer_color": "Golden",
      "hidden_search_terms": null,
      "rating_source": "Beer Advocate",
      "rating_value": "C-",
      "accolades": [],
      "beer_style": {
        "id": 57,
        "updated_at": "2011-12-29T07:57:16-08:00",
        "created_at": "2011-12-29T07:57:16-08:00",
        "name": "German Pilsner (Pils)",
        "ordinal": 56
      }
    }
  ]
}