Return to documentation index

product_list_groups

The product_list_groups API retrieves a list of SKUs for all products that are in a particular product group. This may include SKUs that are currently out of stock.

Parameters

  • api_key (string) Required - The API key for the account
  • id (integer) Required - The unique identifier for the product list group. This may be retrieved from the id attribute of the product_lists API. This parameter is implied in the URL.
  • last_updated_at (datetime) Optional - If this parameter is supplied, only SKUs 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.

Relationship to Products

products are retrieved via the /products API. Each product can have multiple skus, but each product_sku must belong to a single product.

Relationship to Product List Groups

A product_sku can only belong to a single product_list_group.

Response

The product_list_groups API returns a JSON array of products SKUs. Each member of the array includes these attributes:

  • added_at (string) - The date that the product was most recently made available for sale.
  • cogs (string) - The wholesale price (cost of goods sold) of the SKU.
  • computer_count (float) - The current inventory level of the SKU. Both computer_count and par need to be defined for inventory management to be permitted for a SKU.
  • eighty_sixed_at (string) - The date that the beverage SKU for this item was most recently removed from sale.
  • id (int) - Unique identifier for this SKU.
  • is_recommended (boolean) - Set to true if this SKU should be displayed with a "recommended" indicator and false otherwise.
  • low_inventory_text - Text (if any) to be displayed with low inventory (such as "bottles left")
  • ordinal (int) - The position of the SKU within the product group
  • par (int) - The inventory level where the SKU should be restocked. Both computer_count and par need to be defined for inventory management to be permitted for a SKU.
  • price (string) - The price of the product
  • product_id (int) - The unique ID of the product (retrieved from the /products API) to which this SKU belongs to.
  • recommended_text (string) - The text to be used for recommending the SKU. May be null.
  • status (int) - SKU status. A value of 0 indicates an active SKU. A value of 1 indicates an inactive (deleted) SKU. A value of 3 indicates a stock SKU that is maintained for inventory purposes only but that should not be displayed for sale. Other values are reserved for internal use only and should not be displayed for sale.
  • unit (int) - The unique ID of a SKU Unit.
  • updated_at (string) - The date that this SKU was last edited.
  • vendor_id (int) - The unique ID of a vendor retrieved via the /vendors API
  • vendor_note (string) - A note about this product from its vendor

Product One-up View Unit Display Semantics

A user may navigate to the product one-up view to view product details via one of 5 ways:

  • (1) They tap on a cell on the main list when a filter that returns both bottle and glass sku units is displayed
  • (2) They tap on a cell on the main list when a filter that returns only bottle sku units are displayed
  • (3) They tap on a cell on the main list when a filter that returns only glass sku units are displayed
  • (4) They tap on a cell within the admin interface (either on the table activity, recently added, or eighty-sixed list)
  • (5) They tap on a cell within the selections drawer

In the case of (2), only the a single SKU Unit will be displayed.

In all other cases, the iPad will attempt to display all units belonging to all product_skus of a product. If only a single unit is present, then the name of that unit will display on the iOS user interface. If more than one unit is present, the iOS user interface will build a table of units.

Inventory Management

A SKU is considered to be eligible for inventory management if:

  • Its par value is a defined integer value
  • Its computer_count value is a defined float or integer value
  • Its status is either set to 0 or 2 (active or stocked)
  • Its beverage_type allows the management of inventory

Corollary: To invalidate specific products from inventory management, one or more of the attributes can be set to null. eg: a computer_count of null causes clients to disregard that product.

Notes

To retrieve the full list of product groups for a particular list, you must use the product_lists API.

Sample Request

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

Sample Response

The following shows 2 SKUs for the same product

{
  "product_skus": [
    {
      "added_at": "2012-06-29T08:27:12-07:00",
      "cogs": 3,
      "computer_count": 9,
      "eighty_sixed_at": null,
      "id": 18112,
      "is_recommended": true,
      "low_inventory_text": "slices remaining!",
      "ordinal": 1,
      "par": 2,
      "price": 5.5,
      "product_id": 17843,
      "recommended text": "A slice of life",
      "status": 0,
      "unit": 27,
      "updated_at": "2012-06-30T18:27:33-07:00",
      "vendor_id": 10523,
      "vendor_name": "Papa's Pizza"
    },
    {
      "added_at": "2012-06-29T08:27:12-07:00",
      "cogs": 18,
      "computer_count": 13,
      "eighty_sixed_at": null,
      "id": 18113,
      "is_recommended": true,
      "low_inventory_text": "pies remaining!",
      "ordinal": 1,
      "par": 2,
      "price": 5.5,
      "product_id": 17843,
      "recommended text": "This is a recommended pizza",
      "status": 0,
      "unit": 28,
      "updated_at": "2012-06-30T18:28:18-07:00",
      "vendor_id": 10523,
      "vendor_name": "Papa's Pizza"
    }
  ]
}