Return to documentation index

wine_colors

The wine_colors API retrieves a list of all of the wine colors in the database. Any particular Tastevin account may or may not have wines in any or all of these colors.

Parameters

  • api_key (string) Required - The API key for the account

Response

The wine_colors API returns a JSON array of wine colors. Each member of the array includes these attributes:

  • created_at - The initial date that this wine color was created.
  • id - Unique identifier.
  • name - The display name of the wine color.
  • ordinal - The relative display order of the wine color.
  • updated_at - The date that this wine color was last edited.
  • hex_color - The color (represented as a CSS hex string) used to distinguish this tab on the UI.
  • beverage_type_id - The unique identifier of a beverage type that this tab applies to.

Notes

The id attribute is used by the beverage_sku_list_groups API to indicate the wine color to which each section header belongs.

Sample Request

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

Sample Response

{
  "wine_colors": [
    {
      "wine_color": {
        "beverage_type_id": 1,
        "created_at": "2011-04-05T10:34:37-07:00",
        "hex_color": "#fdf9cd",
        "id": 4,
        "name": "Sparkling",
        "ordinal": 0,
        "updated_at": "2013-03-02T04:51:05-08:00"
      }
    },
    {
      "wine_color": {
        "beverage_type_id": 1,
        "created_at": "2011-04-05T10:33:48-07:00",
        "hex_color": "#fcf9d8",
        "id": 2,
        "name": "White",
        "ordinal": 1,
        "updated_at": "2013-03-02T04:51:05-08:00"
      }
    },
    {
      "wine_color": {
        "beverage_type_id": 1,
        "created_at": "2011-04-05T10:34:28-07:00",
        "hex_color": "#fbe5e5",
        "id": 3,
        "name": "Rosé",
        "ordinal": 2,
        "updated_at": "2013-03-02T04:51:05-08:00"
      }
    },
    {
      "wine_color": {
        "beverage_type_id": 1,
        "created_at": "2011-04-05T10:33:20-07:00",
        "hex_color": "#e58c89",
        "id": 1,
        "name": "Red",
        "ordinal": 3,
        "updated_at": "2013-03-02T04:51:05-08:00"
      }
    },
    {
      "wine_color": {
        "beverage_type_id": 1,
        "created_at": "2011-04-05T10:34:46-07:00",
        "hex_color": "#fde0c5",
        "id": 5,
        "name": "Dessert",
        "ordinal": 4,
        "updated_at": "2013-03-02T04:51:05-08:00"
      }
    }
  ]
}