Skip to main content

Button Maps

TypeBase PathTrigger Name
REST resource~{realm}/button-maps/button-maps

The button map resource defines the layout of the cash register's product buttons, but also take-out menus. It's basically an ordered grid or list of products, organized in sections.

Endpoints

NameMethodRelative PathPayloadResponseDescription
addButtonMapPOST~{realm}/button-maps/ButtonMapStored_ButtonMapAdds a new button map to the list.
listButtonMapsGET~{realm}/button-maps/N/AStored_ButtonMap[]Retrieves a list of button maps.
getButtonMapGET~{realm}/button-maps/{id}N/AStored_ButtonMapRetrieves a button map.
putButtonMapPUT~{realm}/button-maps/{id}ButtonMapStored_ButtonMapReplaces a button map.
updateButtonMapPATCH~{realm}/button-maps/{id}Partial_ButtonMapStored_ButtonMapUpdates specified button map fields.
removeButtonMapDELETE~{realm}/button-maps/{id}N/AN/ADeletes a button map.

Permissions

PermissionDescription
edit-button-mapsClient is allowed to add new button maps and to modify or delete existing button maps.
show-button-mapsClient is allowed to query the button map list and to fetch individual button maps.

Entities

Interface ButtonMap

namespace ButtonMap {
type Theme = 'classic' | 'modern';
type Type = 'tablet-groups' | 'tablet-buttons' | 'phone-buttons' | 'menu' | 'menu-section';
}

interface ButtonMap {
'name': string;
'type': ButtonMap.Type;
'width': number;
'height': number;
'buttons': ButtonMapItem[];
'theme'?: ButtonMap.Theme;
'id'?: number;
'created'?: DateTime;
'updated'?: DateTime;
'deleted'?: DateTime;
'updated-by'?: number;
'updated-from'?: number;
'tags'?: string[];
'labels'?: number[];
}
PropertyData TypeDescription
nameStringButton map name.
typeButtonMap.TypeType of button map.
widthIntegerWidth of button map (number of buttons per row). Always set to 0 (meaning adaptive) for take-out menus and 1 for take-out menu sections.
heightIntegerHeight of button map (number of buttons per column). Always set to 1 for take-out menus and 0 (meaning adaptive) for take-out menu sections.
buttonsButtonMapItem[]A list of buttons.
themeButtonMap.Theme?Defines the appearance of the button map. Default, if unspecified, is classic.
idInt64?The resource ID of this entity.
createdDateTime?Date and time when this entity was first created.
updatedDateTime?Date and time when this entity was last modified.
deletedDateTime?Date and time when this entity was deleted.
updated-byInt64?ID of User who last modified this entity.
updated-fromInt64?ID of Till (trusted device) which last modified this entity.
labelsInt64[]?A list of Label IDs associated with this entity.

The following table describes all available button map types.

ActionDescription
tablet-groupsDefines the upper group buttons (1 or 2 rows) in the cash register tablet UI.
tablet-buttonsDefines the main (lower) button area in the cash register tablet UI.
phone-buttonsDefines the main button area in the cash register mobile/phone UI.
menuDefines a take-out menu. Should only contain display-button-map buttons that link to menu-section button maps.
menu-sectionDefines a section in the take-out menu. Should contain add-product-item buttons that specifies products that can be ordered.

Interface ButtonMapItem

namespace ButtonMapItem {
type Action =
| 'add-product-item'
| 'display-button-map'
| 'display-parent-button-map'
| 'display-previous-page'
| 'display-next-page'
| 'add-tab-discount'
| 'open-uri'
;

type DiscountType =
| 'percentage'
| 'fixed-amount'
;
}

interface ButtonMapItem {
'name'?: string;
'theme'?: number;
'x': number;
'y': number;
'action': ButtonMapItem.Action;
'product'?: number;
'button-map'?: number;
'uri'?: string;
'discount-type'?: ButtonMapItem.DiscountType;
'amount'?: number;
'discount-rate'?: number;
}
PropertyData TypeDescription
nameStringButton name. If unspecified, the name is taken from the referenced product or button map.
themeInt32?Defines the appearance/color of the button. See table below.
xInt32Defines the horizontal position of the button. First column is 0; first column on second page is the value of ButtonMap.width.
yInt32Defines the vertical position of the button. First row is 0; if larger or equal to ButtonMap.height, the button will not show.
actionButtonMapItem.ActionKind of button. See table below.
productInt64?The product to add, if action is add-product-item.
button-mapInt64?The button map referenced, if action is display-button-map.
uriURI?The URI to open, if action is open-uri.
discount-typeButtonMapItem.DiscountType?The type of discount to add, if action is add-tab-discount.
amountMoney?If discount-type is fixed-amount, how much discount to give (in default currency).
discount-rateFloat32?If discount-type is percentage, how much discount to give (in percent).

The following table describes the current button themes. Note that this might change in the future.

ThemeClassic PhoneClassic TabletModern Tablet
nullLight blueWhiteDark gray
0Light greenLight greenGreen
1Light blueLight blueBlue
2Light yellowLight yellowYellow
3Light pinkLight redRed
4Dark marineDark marineNot used (displays as purple)
5Dark greenDark greenDark green
6Dark blueDark blueDark blue
7Dark yellowDark yellowOrange
8Dark pinkDark redDark red
9Light purpleBlackPurple

The following table describes all available actions.

ActionDescription
add-product-itemAdds the product specified in product to the current tab. For maps of type menu-section, specifies what product to show at this position.
display-button-mapNavigates to the button map specified in button-map. For maps of type menu, specifies what menu section to include at this position.
display-parent-button-mapNavigates to the previous/parent button map (which contained the display-button-map action).
display-previous-pageNavigates to the previous page of a multi-page button map.
display-next-pageNavigates to the next page of a multi-page button map.
add-tab-discountAdds a discount to the current tab.
open-uriOpens a custom URI/URL. Can be a web site, Android Intent or any other URI the cash register knows how to open.