Return to documentation index

product_lists

The product_lists API retrieves a list of all product lists for an account. Each product list provides information for grouping product SKUs of a particular type.

Parameters

  • api_key (string) Required - The API key for the account
  • last_updated_at (datetime) Optional - If this parameter is supplied, only lists and groups 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.
  • include_legacy (boolean) Optional - If supplied and set to true, then the wine, beer, and spirit lists will be included as product lists. Otherwise, they will be skipped. Defaults to false.

Response

The product_lists API returns a JSON array of product lists. Each member of the array includes these attributes:

  • default_section_entry_title (string) - A string to display on the right-side dropdown menu of the main list when no product section is active. Defaults to "browse" (as in "browse the various sections of the list")
  • default_section_list_title (string) - A string to display as the title for the sectioning button for the default list ordering. Defaults to "house list"
  • id (int) - Unique identifier.
  • updated_at (datetime) - The date that this list was last edited.
  • name (string) - The display name of the list. This may be null.
  • list_type (int) - An integer identifying the type of list. Identifier for the product type that appears on this list, or -1 for a mixed list such as an inventory list.
  • product_groups (array) - An array of product groups. See below for the description of these objects.
  • supports_inventory (boolean) - True if the items on this list should track and manage inventory levels. Note that if this is true, then the items with zero inventory will be removed from display.

Product group attributes

Each list contains an array of product groups. Each member of this array includes these attributes:

  • id (int) - Unique identifier.
  • updated_at (datetime) - The date that this group was last edited, or that the products within the group changed.
  • ordinal (int) - Relative display order of this group in the list. Ordinals do not necessarily start at zero, and may skip numbers.
  • name (int) - The display name of the section header.
  • wine_color_id (int) - The unique identifier of a wine color that includes this section. This attribute may be null if the group is used on a list that does not support tabs.

Notes

The combination of this API and the product_group API supersedes the beverage_sku_lists API

Sample Request

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

Sample Response

{
  "product_lists": [
    {
      "id": 27,
      "updated_at": "2012-09-28T20:14:00-07:00",
      "name": "Pizzas",
      "list_type": 7,
      "supports_inventory": false,
      "product_groups": [
        {
          "id": 31182,
          "updated_at": "2012-05-23T14:00:26-07:00",
          "ordinal": 3,
          "name": "Meat Pizzas",
          "wine_color_id": 19
        },
        {
          "id": 31198,
          "updated_at": "2012-05-23T14:00:26-07:00",
          "ordinal": 5,
          "name": "Vegetarian Pizzas",
          "wine_color_id": 20
        }
      ]
    }
  ]
}

Sample Request including legacy lists

https://dashboard.onpremisewine.com/product_lists.json?api_key=ABCDEF123456&include_legacy=true

Sample Response including legacy lists

{
  "product_lists": [
    {
      "id": 18,
      "updated_at": "2012-09-28T20:14:00-07:00",
      "name": "Beers",
      "list_type": 2,
      "supports_inventory": true,
      "product_groups": [
        {
          "id": 31167,
          "updated_at": "2012-05-23T14:00:26-07:00",
          "ordinal": 0,
          "name": "Draft beers",
          "wine_color_id": null
        },
        {
          "id": 31169,
          "updated_at": "2012-05-23T14:00:26-07:00",
          "ordinal": 1,
          "name": "Bottled beers",
          "wine_color_id": null
        }
      ]
    },
    {
      "id": 27,
      "updated_at": "2012-09-28T20:14:00-07:00",
      "name": "Pizzas",
      "list_type": 7,
      "supports_inventory": false,
      "product_groups": [
        {
          "id": 31182,
          "updated_at": "2012-05-23T14:00:26-07:00",
          "ordinal": 3,
          "name": "Meat Pizzas",
          "wine_color_id": 19
        },
        {
          "id": 31198,
          "updated_at": "2012-05-23T14:00:26-07:00",
          "ordinal": 5,
          "name": "Vegetarian Pizzas",
          "wine_color_id": 20
        }
      ]
    }
  ]
}