Return to documentation index

menu_item_assets

The menu_item_assets API retrieves a list of all of all static files associated with a particular menu item. Any given menu item may have zero or more such assets.

Parameters

  • api_key (string) Required - The API key for the account
  • id (integer) Required - The unique identifier for the menu_item. This may be retrieved from the id attribute of the menu_list API
  • last_updated_at (datetime) Optional - If this parameter is supplied, only assets 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.

Notes

The request must be formatted as https://dashboard.onpremisewine.com/menu_items/\<id>/assets.json.

Response

The menu_item_assets API returns a JSON array of assets. Each member of the array includes these attributes:

  • id - Unique identifier.
  • type - The type of file. See below for valid types.
  • versions - An array of versions. Each version has an identifier and a URL from which the file can be retrieved.
  • asset_content_type - MIME type of the file.
  • asset_file_size - Size in bytes of the file.
  • updated_at - The date that this file was last edited.
  • processed - If true then the file is ready to download.
  • status - File status. A value of 0 indicates an active file. A value of 0 indicates a deleted file.
  • original_url - URL of the original uploaded file. You cannot assume anything about the size of this file.
  • menu_item_id - The unique identifier of the menu_item to which this file belongs.

Asset file types

  • MenuListImageAsset - Default image
  • MenuMiscImageAsset - Miscellaneous image
  • WineVideoAsset - Video file

Sample Request

https://dashboard.onpremisewine.com/menu_items/1001/assets.json?api_key=ABCDEF123456

Sample Response

{
  "assets": [
    {
      "id": 1966,
      "type": "MenuListAsset",
      "versions": {
        "ipad_one_up_thumb": {
          "url": "http://c448288.r88.cf2.rackcdn.com/uploads/menu_item_label_asset/61966/ipad_one_up_thumb_1135210_image.jpg"
        },
        "web_thumb": {
          "url": "http://c448288.r88.cf2.rackcdn.com/uploads/menu_item_label_asset/61966/web_thumb_1135210_image.jpg"
        },
        "ipad_list": {
          "url": "http://c448288.r88.cf2.rackcdn.com/uploads/menu_item_label_asset/61966/ipad_list_1135210_image.jpg"
        }
      },
      "asset_content_type": "image/jpeg",
      "asset_file_size": 8785,
      "updated_at": "2011-09-10T12:43:04-07:00",
      "processed": true,
      "status": 0,
      "original_url": "http://c448288.r88.cf2.rackcdn.com/uploads/menu_item_label_asset/61966/1135210_image.jpg",
      "menu_item_id": 1001
    }
  ]
}