Skip to main content

Tabs

TypeBase PathTrigger Name
REST resource~{realm}/tabs/tabs

This resource holds tabs (bills), i.e. a sale that has been suspended and will be resumed later.

Endpoints

NameMethodRelative PathPayloadResponseDescription
addTabPOST~{realm}/tabs/TabStored_TabAdds a new tab to the list.
listTabsGET~{realm}/tabs/N/AStored_Tab[]Retrieves a list of tabs.
getTabGET~{realm}/tabs/{id}N/AStored_TabRetrieves a tab.
putTabPUT~{realm}/tabs/{id}TabStored_TabReplaces a tab.
updateTabPATCH~{realm}/tabs/{id}Partial_TabStored_TabUpdates specified tab fields.
removeTabDELETE~{realm}/tabs/{id}N/AN/ADeletes a tab.

Permissions

PermissionDescription
edit-tabsClient is allowed to add new tabs and to modify or delete existing tabs.
show-tabsClient is allowed to query the tab list and to fetch individual tabs.

Entities

Interface Tab

interface Tab {
'printouts'?: string[];
'name'?: string;
'closed'?: DateTime;
'frozen'?: boolean;
'description'?: string;
'client'?: number;
'order'?: number;
'items'?: Item[];
'original-payments'?: Payment[];
'tab-locked-by'?: string;
'id'?: number;
'created'?: DateTime;
'updated'?: DateTime;
'deleted'?: DateTime;
'updated-by'?: number;
'updated-from'?: number;
'tags'?: string[];
'labels'?: number[];
}
PropertyData TypeDescription
printoutsString[]?Each time a tab is printed, the receipt ID is added to this list (most recent first).
nameString?Optional name of tab, in order to make identification easier.
closedDateTime?Deprecated. Do not use.
descriptionString?Optional description.
clientInt64?ID of Till which created this tab.
frozenBoolean?This tab is read-only and cannot be modified or added to.
orderInt64?ID of Order this tab belongs to.
itemsItem[]?A list of all products and services on this tab.
original-paymentsPayment[]?A list of payments that were used to originally pay for this tab. Only used when suspending a refund based on a previous sale.
tab-locked-byString?The name of the trusted device that currently has this tab opened.
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.

Interface Item


interface Item {
'product'?: number;
'product-group'?: number;
'campaign'?: number;
'stock-location'?: number;
'product-name': string;
'product-name-t9n'?: Translation[];
'description'?: string;
'description-t9n'?: Translation[];
'quantity': number;
'price'?: number;
'unit'?: string;
'vat-rate'?: number;
'vat-amount'?: number;
'type': ProductGroup.Type;
'discount-rate'?: number;
'purchase-price'?: number;
'metadata'?: Metadata;
'tickets'?: string[];
'last-kitchen-ticket-item'?: Item;
'comment'?: string;
'undiscountable'?: boolean;
'sub-items'?: Item[];
'modifier'?: number;
'modifiers'?: ItemModifier[];
}
PropertyData TypeDescription
productInt64?ID of Product.
product-groupInt64?ID of product's ProductGroup.
campaignInt64?ID of Campaign (used when type is campaigns)
stock-locationInt64?ID of Location where the stock balance should be adjusted.
product-nameStringName of item.
descriptionString?An optional comment or description.
quantityFloat32The quantity.
priceMoney?The price per unit, in default currency and including VAT.
unitString?The unit ("kg", "m²", etc.). If unset, unit is "piece".
vat-rateFloat?The item's VAT rate, in percent. Copied from the product group.
vat-amountMoney?The item's actual VAT amount (per unit and in default currency).
typeProductGroup.TypeType of item. Either copied from the product group (goods, services, liabilities) or set to discounts or campaign for discount and campaign items, respectively.
discount-rateFloat32?The discount rate for discounts in percent that applies to the whole tab. Only used if type is discounts.
purchase-priceMoney?The product's purchase price, excluding VAT, in default currency.
metadataMetadata?Additional metadata about the item. Used for vouchers, for instance.
ticketsString[]?A list of OrderTicket IDs for tickets that have been sent to a kitchen printer.
last-kitchen-ticket-itemItem?A copy of the item at the time when the last kitchen ticked was printed. Used for change detection.
commentString?May contain instructions that will be printed on the kitchen ticket.
undiscountableBoolean?true if the product group the item belongs to is undiscountable and the item is thus not eligible for discounts.
sub-itemsItem[]?An item may contain nested sub-items. Used for menus, campaigns, discounts etc.
modifierInt64?A reference to the ProductModifier, if this sub-item is a product modifier.
modifiersItemModifier[]?A list of modifiers that applies to this item. See below for definition.

Interface ItemModifier

interface ItemModifier {
'modifier': number;
'name': string;
'type'?: ProductModifier.Type;
'values': string[];
'labels'?: number[];
}
PropertyData TypeDescription
modifierInt64ID of ProductModifier.
nameStringName of product modifier.
typeProductModifier.Type?Modifier type. See ProductModifier.
valuesString[]A list of values from the product modifier that applies to this item.
labelsInt64[]?A list of labels from the product modifier that applies to this item.

labels must be present if type is single-label or multiple-labels; otherwise it must be omitted. If labels is present, values must be empty1.

Footnotes

  1. For historical reasons, values must always be present, even if type is single-label or multiple-labels. Older clients might assume values is always present and could crash if it is missing.