Return to documentation index

restaurant_assets

The restaurant_assets API retrieves a list of all of all static files associated with an account. Any given account 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 account. This may be retrieved from the company/restaurant/id attribute of the profile 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/restaurants/\<id>/assets.json.

Response

The restaurant_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 1 indicates a deleted file.
  • original_url - URL of the original uploaded file. You cannot assume anything about the size of this file.
  • company_id - The unique identifier of the restaurant to which this file belongs.

Asset file types

  • CompanyBillboardLargeAsset - Large splash screen image
  • CompanyBillboardSmallAsset - Small splash screen image
  • CompanyLogoAsset - Corporate logo
  • CompanyMiscImageAsset - Miscellaneous asset
  • CompanyPartnerPageLogoAsset - Corporate marketing logo
  • CompanyPdfAsset - Downloadable PDF file
  • CompanyDocxAsset - Template for printed beverage list
  • CompanyBeerMenuDocxAsset - Template for printed beer list
  • CompanySpiritMenuDocxAsset - Template for printed spirit list
  • CompanyWineMenuDocxAsset - Template for printed wine list

Sample Request

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

Sample Response

{
  "assets": [
    {
      "id": 1,
      "type": "CompanyLogoAsset",
      "versions": {
        "web_thumb": {
          "url": "http://c448288.r88.cf2.rackcdn.com/uploads/company_logo_asset/8001/web_thumb_my_account.png"
        },
        "web_menu_logo": {
          "url": "http://c448288.r88.cf2.rackcdn.com/uploads/company_logo_asset/8001/web_menu_logo_my_account.png"
        },
        "ipad_billboard_logo": {
          "url": "http://c448288.r88.cf2.rackcdn.com/uploads/company_logo_asset/8001/ipad_billboard_logo_my_account.png"
        },
        "diner_email": {
          "url": "http://c448288.r88.cf2.rackcdn.com/uploads/company_logo_asset/8001/diner_email_my_account.png"
        }
      },
      "asset_content_type": "image/png",
      "asset_file_size": 74918,
      "updated_at": "2011-04-06T07:15:43-07:00",
      "processed": true,
      "status": 0,
      "original_url": "http://c448288.r88.cf2.rackcdn.com/uploads/company_logo_asset/8001/my_account.png",
      "company_id": 1001
    },
    {
      "id": 2,
      "type": "CompanyBillboardSmallAsset",
      "versions": {
        "web_thumb": {
          "url": "http://c448288.r88.cf2.rackcdn.com/uploads/company_billboard_small_asset/8002/web_thumb_restaurant_billboard_small_2.png"
        },
        "ipad_billboard_small": {
          "url": "http://c448288.r88.cf2.rackcdn.com/uploads/company_billboard_small_asset/8002/ipad_billboard_small_restaurant_billboard_small_2.png"
        }
      },
      "asset_content_type": "image/png",
      "asset_file_size": 77064,
      "updated_at": "2011-04-06T07:21:25-07:00",
      "processed": true,
      "status": 0,
      "original_url": "http://c448288.r88.cf2.rackcdn.com/uploads/company_billboard_small_asset/8002/restaurant_billboard_small_2.png",
      "company_id": 1001
    },
    {
      "id": 3,
      "type": "CompanyBillboardSmallAsset",
      "versions": {
        "web_thumb": {
          "url": "http://c448288.r88.cf2.rackcdn.com/uploads/company_billboard_small_asset/8003/web_thumb_restaurant_billboard_small_3.png"
        },
        "ipad_billboard_small": {
          "url": "http://c448288.r88.cf2.rackcdn.com/uploads/company_billboard_small_asset/8003/ipad_billboard_small_restaurant_billboard_small_3.png"
        }
      },
      "asset_content_type": "image/png",
      "asset_file_size": 79802,
      "updated_at": "2011-04-06T07:22:10-07:00",
      "processed": true,
      "status": 0,
      "original_url": "http://c448288.r88.cf2.rackcdn.com/uploads/company_billboard_small_asset/8003/restaurant_billboard_small_3.png",
      "company_id": 1001
    }        ]
}