Return to documentation index

app_settings

The app_settings API retrieves a list of key-value settings directives for App-level configuration that can be controlled via the Portal interface

Parameters

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

Response

The app_settings API returns a JSON array of key-value settings objects. Each member of the array is of the form:

{ "key":"settings_key", "value": any_valid_json }

The App parses the individual values based on the supplied key. Possible key-value combinations are:

  • account_disabled - Boolean flag indicating whether this account is currently disabled.
  • animate_billboard_message - Whether or not the billboard message on the iPads should perform a periodic fade-in-fade-out animation. Defaults to false.
  • asset_sync_queue_limit - an Integer specifying the asset download threshold (the maximum number of assets that have been queued but yet to be downloaded) before initiating a GET request for more assets during an incremental sync. Does not affect hard sync. Defaults to 10. Set this to a high sentinel value to effectively disable queue backlog
  • asset_sync_retry_count - an Integer specifying the number of times we should try to fetch images should the first fetch fail. Defaults to 5.
  • available_sizes_label - Text to show on the 1-up page when multiple sizes are available. Defaults to "Sizes Available"
  • color_tab_font_size - a number specifying the font size of a beverage list tab in the unselected state. Defaults to 36.0
  • color_tab_selected_font_size - a number specifying the font size of a beverage list tab when selected. Defaults to 36.0
  • color_tab_use_flat_colors - a boolean flag indicating whether the iPads should display wine list tabs using old wine-specific assets. If true, then a generated background color is used instead of a custom image background. Defaults to false.
  • combine_multiple_sizes_on_bottles - Boolean flag indicating whether multiple bottle SKUs should be presented as a single entry in the list. Defaults to true. Currently only applies to wines.
  • combine_multiple_sizes_on_glasses - Boolean flag indicating whether multiple glass SKUs should be presented as a single entry in the list. Defaults to true. Currently only applies to wines.
  • default_to_condensed_list - Boolean flag indicating whether the iPads should default to condensed list view.
  • failed_sync_detection_hours - Number of hours that iPads need to be out of touch to display a warning.
  • force_hard_reset - Boolean flag indicating whether this iPad should resync completely with the server (key will not be present if no reset is required).
  • get_beverage_assets_max_retries - Maximum number of times to attempt to download a missing asset.
  • ipad_orientation - 0 if the iPads should use portrait orientation for all views, 1 if the iPads should use landscape for customers and portrait for admin views. Defaults to 0.
  • inventory_stock - Boolean flag indicating whether inactive bottle SKUs should show for inventory purposes. Defaults to false.
  • num_sync_threads - used to tell the iPads how aggressively they should perform background synchronizations with the server. The higher the thread count, the more concurrent operations, and (presumably) the faster the sync. The recommended value is between 2 and 4, and setting this too high may potentially lead to contention and low performance on the iPads.
  • send_logs_to_server - Boolean flag indicating whether saved client logs should be uploaded.
  • show_my_selections_drawer - a boolean, disabling/enabling the selection drawer on a device.
  • show_multiple_sizes - Boolean flag indicating whether to show "Multiple Sizes" text on lists. Defaults to true.
  • show_order_soon_warnings - Boolean flag indicating whether the "Order soon" messages should appear on beverage one-ups when stock is low. Defaults to true.
  • show_price_categories - Boolean flag indicating whether the price category ($, $$...) dropdown should be displayed when browsing a beverage list. Defaults to true.
  • sync_interval - Integer number of seconds between incremental syncs.
  • sync_inventory_interval - Integer number of seconds betwen sending inventory data.
  • wine_bottles_price_buckets - This is used as a way to the modify the price buckets to separate wine bottles into, as presented to the user on the iPad interface. It is represented as a list of numbers. eg: [ 10, 20, 30, 40 ] means that all wines that are $10 and below form a price bucket, wines from $10 - 20 form another price bucket, and so on.
  • wine_glasses_price_buckets - same as the wine_bottles_price_buckets, but for wine glasses

Product customizations

In addition to the key-value pairs defined above, clients which support generic Products also must support the following key-value pairs:

NOTE: Generic products are not currently enabled on the portal.

  • should_show_recently_added_list (boolean) - Defaults to true if any beverages are present (beverage_types 1 through 2), defaults to false otherwise.
  • should_show_eighty_sixed_list (boolean) - Same default behavior as should_show_recently_added_list
  • should_show_table_activity_list (boolean) - Same default as should_show_recently_added_list
  • should_show_low_inventory_list (boolean) - Defaults to false if there are no vendors present, defaults to true if there is at least one vendor with one beverage_sku or product associated with that vendor.
  • low_inventory_list_title (string) - Defaults to "Pick List".

Sample Request

https://dashboard.onpremisewine.com/app_settings?api_key=ABCDEF123456

Sample Response

{ "app_settings": [ { "key":"num_sync_threads", "value":2 }, { "key": "animate_billboard_message", "value": true }, { "key":"wine_bottles_price_buckets", "value":[10,20,30,40] }, { "key":"wine_glasses_price_buckets", "value":[8,12,15] }, { "key": "get_beverage_asset_max_retries", "value": 5 }, { "key":"show_my_selections_drawer", "value":true }, { "key":"sync_interval", "value":360 }, { "key":"sync_inventory_interval", "value":360 }, { "key":"send_logs_to_server", "value":false }, { "key":"default_to_condensed_list", "value":false }, { "key":"account_disabled", "value":false }, { "key":"failed_sync_detection_hours", "value":72 }, { "key":"should_show_recently_added_list", "value":true }, { "key":"should_show_eighty_sixed_list", "value":true }, { "key":"should_show_table_activity_list", "value":true }, { "key":"should_show_low_inventory_list", "value":true }, { "key":"low_inventory_list_title", "value":"Bump These Up!" } ] }