beverage_sku_units
The beverage_beverage_sku_units
API retrieves a list of all of the beverage SKU units used by Tastevin.
Parameters
- api_key (string) Required - The API key for the account
- last_updated_at (datetime) Optional - If this parameter is supplied, only units 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. Units with an updated_at value of null will not be included if this parameter is supplied.
Response
The beverage_sku_units
API returns a JSON array of beverage_sku_units. Each member of the array includes these attributes:
- id - Unique identifier.
- name - The display name of the unit.
- ordinal - The order of the unit within all units for its beverage type.
- beverage_type_id - The unique identifier of a beverage type that this unit applies to.
- updated_at - The date that this unit was last edited. May be null.
- glass - Whether this unit is considered a glass unit.
- can - Whether this unit is considered a can unit
Notes on "glass" SKU Units
If a particular beverage_sku_list or product list supports inventory management, then the following behavior holds true:
- if a SKU has a SKU Unit with the "glass" attribute set to false, then the SKU will be removed from the main list when its inventory count drops to 0. It will re-appear on the main list when inventory increases back above zero.
Sample Request
https://dashboard.onpremisewine.com/beverage_sku_units.json?api_key=ABCDEF123456
Sample Response
{
"beverage_sku_units": [
{
"id": 1,
"name": "Bottle",
"ordinal": 1,
"beverage_type_id": 1,
"updated_at": null,
"glass": false,
"can": false
},
{
"id": 2,
"name": "Glass",
"ordinal": 2,
"beverage_type_id": 1,
"updated_at": null,
"glass": true,
"can": false
},
{
"id": 3,
"name": "Half Glass",
"ordinal": 3,
"beverage_type_id": 1,
"updated_at": null,
"glass": true,
"can": false
},
{
"id": 4,
"name": "Piccolo (.187mL)",
"ordinal": 4,
"beverage_type_id": 1,
"updated_at": null,
"glass": false,
"can": false
},
{
"id": 5,
"name": "Demi (375mL)",
"ordinal": 5,
"beverage_type_id": 1,
"updated_at": null,
"glass": false,
"can": false
},
{
"id": 6,
"name": "500mL",
"ordinal": 6,
"beverage_type_id": 1,
"updated_at": null,
"glass": false,
"can": false
},
{
"id": 7,
"name": "Magnum (1500mL)",
"ordinal": 7,
"beverage_type_id": 1,
"updated_at": null,
"glass": false,
"can": false
},
{
"id": 8,
"name": "Jeroboam (3L)",
"ordinal": 8,
"beverage_type_id": 1,
"updated_at": null,
"glass": false,
"can": false
},
{
"id": 9,
"name": "Rehoboam (4.5L)",
"ordinal": 9,
"beverage_type_id": 1,
"updated_at": null,
"glass": false,
"can": false
},
{
"id": 10,
"name": "Methusaleh (6L)",
"ordinal": 10,
"beverage_type_id": 1,
"updated_at": null,
"glass": false,
"can": false
},
{
"id": 11,
"name": "Salmanazar (9L)",
"ordinal": 11,
"beverage_type_id": 1,
"updated_at": null,
"glass": false,
"can": false
},
{
"id": 12,
"name": "Balthazar (12L)",
"ordinal": 12,
"beverage_type_id": 1,
"updated_at": null,
"glass": false,
"can": false
},
{
"id": 13,
"name": "Nebuchadnezzar (15L)",
"ordinal": 13,
"beverage_type_id": 1,
"updated_at": null,
"glass": false,
"can": false
},
{
"id": 14,
"name": "Melchior (18L)",
"ordinal": 14,
"beverage_type_id": 1,
"updated_at": null,
"glass": false,
"can": false
},
{
"id": 15,
"name": "Solomon (20L)",
"ordinal": 15,
"beverage_type_id": 1,
"updated_at": null,
"glass": false,
"can": false
},
{
"id": 16,
"name": "Sovereign (25L)",
"ordinal": 16,
"beverage_type_id": 1,
"updated_at": null,
"glass": false,
"can": false
},
{
"id": 17,
"name": "Primat (27L)",
"ordinal": 17,
"beverage_type_id": 1,
"updated_at": null,
"glass": false,
"can": false
},
{
"id": 18,
"name": "Melchizedek (30L)",
"ordinal": 18,
"beverage_type_id": 1,
"updated_at": null,
"glass": false,
"can": false
},
{
"id": 19,
"name": "Quartino (250mL)",
"ordinal": 19,
"beverage_type_id": 1,
"updated_at": null,
"glass": true,
"can": false
},
{
"id": 20,
"name": "Taste",
"ordinal": 20,
"beverage_type_id": 1,
"updated_at": null,
"glass": true,
"can": false
},
{
"id": 21,
"name": "Bottle",
"ordinal": 1,
"beverage_type_id": 2,
"updated_at": null,
"glass": false,
"can": false
},
{
"id": 22,
"name": "Glass",
"ordinal": 2,
"beverage_type_id": 2,
"updated_at": null,
"glass": true,
"can": false
},
{
"id": 23,
"name": "Half Glass",
"ordinal": 3,
"beverage_type_id": 2,
"updated_at": null,
"glass": true,
"can": false
},
{
"id": 24,
"name": "Can",
"ordinal": 4,
"beverage_type_id": 2,
"updated_at": null,
"glass": false,
"can": true
},
{
"id": 25,
"name": "Glass",
"ordinal": 1,
"beverage_type_id": 3,
"updated_at": null,
"glass": true,
"can": false
},
{
"id": 26,
"name": "Bottle",
"ordinal": 2,
"beverage_type_id": 3,
"updated_at": null,
"glass": false,
"can": false
}
]
}