Return to documentation index

wineries

The wineries API retrieves a list of all of the wineries whose wines are carried by the current account.

Parameters

  • api_key (string) Required - The API key for the account
  • last_updated_at (datetime) Optional - If this parameter is supplied, only wineries 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 wineries API returns a JSON array of wineries. Each member of the array includes these attributes:

  • id - Unique identifier.
  • updated_at - The date that this winery was last edited.
  • created_at - The initial date that this winery was created.
  • name - The display name of the winery.
  • description - The description of the winery.

Notes

The URL for the request contains assigned.

The id attribute is used by the wines API to indicate the winery for each wine.

Sample Request

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

Sample Response

{
  "wineries": [
    {
      "id": 167,
      "updated_at": "2012-09-19T14:00:12-07:00",
      "created_at": "2012-08-31T13:27:46-07:00",
      "name": "Emeritus Vineyards",
      "description": ""
    },
    {
      "id": 52,
      "updated_at": "2012-09-17T12:08:48-07:00",
      "created_at": "2011-11-14T07:44:11-08:00",
      "name": "Jordan Vineyard & Winery",
      "description": ""
    },
    {
      "id": 140,
      "updated_at": "2012-08-16T15:06:34-07:00",
      "created_at": "2012-08-08T09:22:33-07:00",
      "name": "J Vineyards & Winery",
      "description": ""
    },
    {
      "id": 52,
      "updated_at": "2012-09-17T12:08:48-07:00",
      "created_at": "2011-11-14T07:44:11-08:00",
      "name": "Jordan Vineyard & Winery",
      "description": ""
    },
    {
      "id": 51,
      "updated_at": "2012-05-09T17:18:14-07:00",
      "created_at": "2011-11-12T19:36:11-08:00",
      "name": "Sonoma-Cutrer Vineyards",
      "description": "Our \"Grand Cru\" philosophy is a unique assimilation of traditional Burgundian winemaking methods and our own technological innovation. It's a perfect balance of tradition and discovery, bringing forth noble wines that express a sense of place and varietal"
    },
    {
      "id": 51,
      "updated_at": "2012-05-09T17:18:14-07:00",
      "created_at": "2011-11-12T19:36:11-08:00",
      "name": "Sonoma-Cutrer Vineyards",
      "description": "Our \"Grand Cru\" philosophy is a unique assimilation of traditional Burgundian winemaking methods and our own technological innovation. It's a perfect balance of tradition and discovery, bringing forth noble wines that express a sense of place and varietal"
    },
    {
      "id": 45,
      "updated_at": "2012-05-24T11:14:00-07:00",
      "created_at": "2011-10-28T14:18:14-07:00",
      "name": "Peju Province Winery",
      "description": ""
    }
  ]
}