Return to documentation index

spirit_list

The spirit_list API retrieves a list of SKUs for all spirits sold by the account. This may include SKUs that are currently out of stock.

Parameters

  • api_key (string) Required - The API key for the account
  • 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.

Response

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

  • id - Unique identifier.
  • updated_at - The date that this SKU was last edited.
  • created_at - The initial date that this SKU was created.
  • unit - A unit code
  • price - The retail price of the SKU.
  • sommelier_notes - Mixologist's notes on the SKU.
  • bin_number - Storage bin number. This will be an empty string for a spirit SKU.
  • status - 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.
  • is_recommended - Set to true if this SKU should be displayed with a "recommended" indicator and false otherwise.
  • par - The inventory level where the SKU should be restocked.
  • computer_count - The current inventory level of the SKU.
  • tags - Array of values of tags for the SKU. To convert these values to names, look them up using the profile API. Any value that does not have a corresponding name in the profile API should be ignored.
  • beverage_id - The unique identifier of a spirit that this SKU refers to.
  • cogs - The wholesale price (cost of goods sold) of the SKU.
  • inventory_location_id - The unique identifier of a storage location for this SKU (if any)
  • copy - Set to true if this SKU is a display copy only and should not be shown for inventory, false otherwise.

Notes

The order of the SKUs on the spirit list is not significant for customer-facing display. To get the display order, you must use the beverage_sku_lists API.

For clients through V89, all tags arrays will contain an extra tag with the value -100. This is to work around a bug in the tag deletion management code on the iOS client, and should be ignored.

Sample Request

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

Sample Response

{
  "beverage_skus": [
    {
      "id": 14607,
      "updated_at": "2012-06-30T18:27:33-07:00",
      "created_at": "2012-04-03T15:38:38-07:00",
      "unit": 1,
      "price": "11.0",
      "sommelier_notes": "",
      "bin_number": "",
      "status": 0,
      "is_recommended": true,
      "par": 1,
      "computer_count": 0,
      "tags": [],
      "beverage_id": 15098,
      "cogs": "7.5",
      "inventory_location_id": null,
      "copy": false
    },
    {
      "id": 14608,
      "updated_at": "2012-06-30T18:27:17-07:00",
      "created_at": "2012-04-03T15:47:52-07:00",
      "unit": 1,
      "price": "9.0",
      "sommelier_notes": "",
      "bin_number": "",
      "status": 0,
      "is_recommended": true,
      "par": 1,
      "computer_count": 0,
      "tags": [],
      "beverage_id": 15101,
      "cogs": "8.0",
      "inventory_location_id": null,
      "copy": false
    },
    {
      "id": 14610,
      "updated_at": "2012-05-09T14:07:49-07:00",
      "created_at": "2012-04-03T16:10:51-07:00",
      "unit": 1,
      "price": "10.0",
      "sommelier_notes": "",
      "bin_number": "",
      "status": 0,
      "is_recommended": true,
      "par": 1,
      "computer_count": 0,
      "tags": [
        12
      ],
      "beverage_id": 15102,
      "cogs": "9.15",
      "inventory_location_id": null,
      "copy": false
    }
  ]
}