Return to documentation index

beverage_sku_list_groups

The beverage_sku_list_groups API retrieves a list of all section headers used on beverage lists in the account. It may include section headers that are no longer in use.

Parameters

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

  • id - Unique identifier.
  • updated_at - The date that this section header was last edited.
  • created_at - The initial date that this section header was created.
  • name - The display name of the section header.
  • wine_color_id - The unique identifier of a wine color that includes this section. This attribute may be null if the header is used on the beer or spirit list instead of the wine list.
  • ordinal - The order of this group on its parent list.

Notes

There is an ordering of sections in the response from this API call. However, with the iPad client up to version 93, to determine the order of sections, you must call the beverage_sku_lists API and use its beverage_sku_list_group_id attributes to determine the section for each beverage on the list.

Sample Request

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

Sample Response

{
  "beverage_sku_list_groups": [
    {
      "id": 10,
      "updated_at": "2012-10-04T11:56:58-07:00",
      "created_at": "2011-04-16T08:48:29-07:00",
      "name": "Merlot",
      "wine_color_id": 1,
      "ordinal": 0
    },
    {
      "id": 28,
      "updated_at": "2012-10-04T11:56:58-07:00",
      "created_at": "2011-07-02T16:22:34-07:00",
      "name": "Zinfandel",
      "wine_color_id": 1,
      "ordinal": 1
    },
    {
      "id": 191,
      "updated_at": "2012-10-04T11:56:59-07:00",
      "created_at": "2011-09-16T09:07:20-07:00",
      "name": "Sauvignon Blanc",
      "wine_color_id": 2,
      "ordinal": 2
    },
    {
      "id": 251,
      "updated_at": "2012-10-04T11:56:59-07:00",
      "created_at": "2011-10-04T17:36:08-07:00",
      "name": "Interesting Whites",
      "wine_color_id": 2,
      "ordinal": 4
    },
    {
      "id": 1696,
      "updated_at": "2012-10-04T11:57:03-07:00",
      "created_at": "2012-03-08T12:12:19-08:00",
      "name": "Half Bottle Sparkling",
      "wine_color_id": 4,
      "ordinal": 5
    },
    {
      "id": 4144,
      "updated_at": "2012-10-04T11:57:13-07:00",
      "created_at": "2012-08-13T11:16:43-07:00",
      "name": "Margaritas",
      "wine_color_id": null,
      "ordinal": 0
    },
    {
      "id": 4152,
      "updated_at": "2012-10-04T11:57:13-07:00",
      "created_at": "2012-08-13T11:33:09-07:00",
      "name": "Bottled Beers & Cider",
      "wine_color_id": null,
      "ordinal": 0
    },
    {
      "id": 4180,
      "updated_at": "2012-10-04T11:57:13-07:00",
      "created_at": "2012-08-14T13:53:40-07:00",
      "name": "Whiskeys - Kentucky",
      "wine_color_id": null,
      "ordinal": 1
    }
  ]
}