Return to documentation index

beverage_regions

The beverage_regions API retrieves a list of all of the beverage regions used by this account. It may also include beverage regions that were used by now-deleted beverages.

Parameters

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

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

Notes

The id attribute is used by the wines API and the beers API to indicate the region where each beverage is bottled.

Sample Request

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

Sample Response

{
  "wine_regions": [
    {
      "wine_region": {
        "id": 1,
        "updated_at": "2011-04-06T08:10:32-07:00",
        "created_at": "2011-04-06T08:10:32-07:00",
        "name": "France"
      }
    },
    {
      "wine_region": {
        "id": 2,
        "updated_at": "2011-04-06T08:23:22-07:00",
        "created_at": "2011-04-06T08:23:22-07:00",
        "name": "Anderson Valley"
      }
    },
    {
      "wine_region": {
        "id": 3,
        "updated_at": "2011-04-06T08:25:07-07:00",
        "created_at": "2011-04-06T08:25:07-07:00",
        "name": "Spain"
      }
    },
    {
      "wine_region": {
        "id": 4,
        "updated_at": "2011-04-06T08:27:06-07:00",
        "created_at": "2011-04-06T08:27:06-07:00",
        "name": "Reims"
      }
    },
    {
      "wine_region": {
        "id": 5,
        "updated_at": "2011-04-06T08:28:44-07:00",
        "created_at": "2011-04-06T08:28:44-07:00",
        "name": "Champagne, France"
      }
    },
    {
      "wine_region": {
        "id": 6,
        "updated_at": "2011-04-06T08:35:30-07:00",
        "created_at": "2011-04-06T08:35:30-07:00",
        "name": "Napa Valley"
      }
    }
  ]
}