wine_list
The wine_list
API retrieves a list of SKUs for all wines 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 wine_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 - Sommerlier's notes on the SKU.
- bin_number - Storage bin number. This will be an empty string for a wine SKU.
- status - SKU status. A value of
0
indicates an active SKU. A value of1
indicates an inactive (deleted) SKU. A value of3
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 andfalse
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 wine 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 wine 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/wine_list.json?api_key=ABCDEF123456
Sample Response
{
"beverage_skus": [
{
"id": 1839,
"updated_at": "2012-06-14T21:33:07-07:00",
"created_at": "2011-10-11T07:26:28-07:00",
"unit": 0,
"price": "59.0",
"sommelier_notes": "",
"bin_number": "",
"status": 1,
"is_recommended": false,
"par": 4,
"computer_count": 3,
"tags": [],
"beverage_id": 1838,
"cogs": "45.0",
"inventory_location_id": 1,
"copy": false
},
{
"id": 1840,
"updated_at": "2012-05-12T17:22:39-07:00",
"created_at": "2011-10-11T07:27:19-07:00",
"unit": 0,
"price": "75.0",
"sommelier_notes": "",
"bin_number": "",
"status": 1,
"is_recommended": false,
"par": 1,
"computer_count": 13,
"tags": [],
"beverage_id": 1839,
"cogs": "53.25",
"inventory_location_id": null,
"copy": false
},
{
"id": 1841,
"updated_at": "2012-09-30T16:22:04-07:00",
"created_at": "2011-10-11T13:00:11-07:00",
"unit": 0,
"price": "46.0",
"sommelier_notes": "",
"bin_number": "",
"status": 2,
"is_recommended": false,
"par": 1,
"computer_count": 10,
"tags": [
12
],
"beverage_id": 1840,
"cogs": "37.50",
"inventory_location_id": null,
"copy": false
}
]
}