Return to documentation index

wines

The wines API retrieves a list of all wines sold by the account. This may include wines 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 wines 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 wines API returns a JSON array of wines. Each member of the array includes these attributes:

  • id - Unique identifier.
  • updated_at - The date that this wine was last edited.
  • created_at - The initial date that this wine was created.
  • name - The display name of the wine.
  • vintage - The vintage of the wine.
  • grapes - The varietals in the wine.
  • description - The description of the wine.
  • abv - The alcohol by volume of the wine.
  • rs - The residual sugar of the wine.
  • ph - The pH of the wine.
  • ta - The total acidity of the wine.
  • vineyard - The vineyard that produced the wine.
  • wine_color_id - The unique identifier of a wine color for this wine.
  • wine_region_id - The unique identifier of a region where this wine is bottled.
  • winery_id - The unique identifier of a winery that produced this wine.
  • winery_name - The name of the winery that produced this wine.
  • hidden_search_terms - Search terms for which this wine 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 wine. Each accolade is characterized by the accolade attributes 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 wine 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.

Notes

A wine may include a winery_name attribute even if winery_id returns null. If there is a winery_id then winery_name will return the same name as retrieving the name attribute from the linked winery.

The id attribute is used by the wine_list API to indicate the wine to which each wine SKU belongs.

Sample Request

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

Sample Response

{
  "beverages": [
    {
      "id": 1838,
      "updated_at": "2012-06-14T21:28:36-07:00",
      "created_at": "2011-08-30T11:01:13-07:00",
      "name": "Veuve Clicquot   \"Yellow Label\"",
      "vintage": "MV",
      "grapes": "Chardonnay",
      "description": "Clicquot's signature non-vintage Brut is loved all over the world for its crisp, full flavors, consistent quality and celebratory yellow label. This classical dry Champagne is a blend of two-thirds black grapes (Pinot Noir and Pinot Meunier) for body, balanced with one-third Chardonnay for elegance. It has a fine persistent sparkle and golden Champagne color.",
      "abv": null,
      "rs": null,
      "ph": null,
      "ta": null,
      "vineyard": "",
      "wine_color_id": 4,
      "wine_region_id": 535,
      "winery_id": null,
      "winery_name": "Veuve Clicquot",
      "hidden_search_terms": null,
      "rating_source": "Wine Spectator",
      "rating_value": "91/100",
      "accolades": []
    },
    {
      "id": 1863,
      "updated_at": "2012-04-25T07:50:53-07:00",
      "created_at": "2011-10-11T17:13:43-07:00",
      "name": "Mumms \"Brut\"",
      "vintage": "NV",
      "grapes": "Pinot Noir, Chardonnay ",
      "description": "A complex assemblage of primarily Pinot Noir and Chardonnay, Brut Prestige opens with gorgeous layered white blossom aromas, followed by creamy vanilla, citrus, stone fruit and melon. With elegant acidity and crisp structure, this medium-bodied sparkling wine displays an excellent mousse and a rich, lingering finish. Refreshing acidity and fruit character makes Brut Prestige an excellent food wine.\r\n\r\nMumm Napa traditionally leads off the Napa Valley harvest. Grapes are picked mainly at night – exclusively by hand – and delivered to the winery in signature “small yellow boxes.” At the winery, fruit is hand-delivered to the presses and slowly de-juiced at low pressure, with the four press fractions kept separate. Low-temperature primary fermentation, mostly in stainless steel, is utilized to enhance fruit tones and preserve freshness. Individual lots are kept separate during initial fermentation to fully express the vineyards’ individual strengths and subtleties. \r\n\r\nWines are blended in winter and bottled in spring for the second bottle fermentation. An average of 18 months of yeast aging adds complexity, contributing subtle aged flavors of biscuit, bread dough, white blossoms and mocha while adding layers of creaminess. The wine is disgorged as a Brut style, and aged another 3 months on the cork to fully marry the dosage liquor to the base wine. ",
      "abv": null,
      "rs": null,
      "ph": null,
      "ta": null,
      "vineyard": "",
      "wine_color_id": 4,
      "wine_region_id": 536,
      "winery_id": null,
      "winery_name": "Mumms",
      "hidden_search_terms": null,
      "rating_source": "Wine Spectator",
      "rating_value": "91/100",
      "accolades": []
    }
  ]
}