Tabs
Type | Base Path | Trigger 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
Name | Method | Relative Path | Payload | Response | Description |
---|---|---|---|---|---|
addTab | POST | ~{realm}/tabs/ | Tab | Stored_Tab | Adds a new tab to the list. |
listTabs | GET | ~{realm}/tabs/ | N/A | Stored_Tab[] | Retrieves a list of tabs. |
getTab | GET | ~{realm}/tabs/{id} | N/A | Stored_Tab | Retrieves a tab. |
putTab | PUT | ~{realm}/tabs/{id} | Tab | Stored_Tab | Replaces a tab. |
updateTab | PATCH | ~{realm}/tabs/{id} | Partial_Tab | Stored_Tab | Updates specified tab fields. |
removeTab | DELETE | ~{realm}/tabs/{id} | N/A | N/A | Deletes a tab. |
Permissions
Permission | Description |
---|---|
edit-tabs | Client is allowed to add new tabs and to modify or delete existing tabs. |
show-tabs | Client 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[];
}
Property | Data Type | Description |
---|---|---|
printouts | String[]? | Each time a tab is printed, the receipt ID is added to this list (most recent first). |
name | String? | Optional name of tab, in order to make identification easier. |
closed | DateTime? | Deprecated. Do not use. |
description | String? | Optional description. |
client | Int64? | ID of Till which created this tab. |
frozen | Boolean? | This tab is read-only and cannot be modified or added to. |
order | Int64? | ID of Order this tab belongs to. |
items | Item[]? | A list of all products and services on this tab. |
original-payments | Payment[]? | 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-by | String? | The name of the trusted device that currently has this tab opened. |
id | Int64? | The resource ID of this entity. |
created | DateTime? | Date and time when this entity was first created. |
updated | DateTime? | Date and time when this entity was last modified. |
deleted | DateTime? | Date and time when this entity was deleted. |
updated-by | Int64? | ID of User who last modified this entity. |
updated-from | Int64? | ID of Till (trusted device) which last modified this entity. |
labels | Int64[]? | 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[];
}
Property | Data Type | Description |
---|---|---|
product | Int64? | ID of Product . |
product-group | Int64? | ID of product's ProductGroup . |
campaign | Int64? | ID of Campaign (used when type is campaigns ) |
stock-location | Int64? | ID of Location where the stock balance should be adjusted. |
product-name | String | Name of item. |
description | String? | An optional comment or description. |
quantity | Float32 | The quantity. |
price | Money? | The price per unit, in default currency and including VAT. |
unit | String? | The unit ("kg", "m²", etc.). If unset, unit is "piece". |
vat-rate | Float? | The item's VAT rate, in percent. Copied from the product group. |
vat-amount | Money? | The item's actual VAT amount (per unit and in default currency). |
type | ProductGroup.Type | Type of item. Either copied from the product group (goods , services , liabilities ) or set to discounts or campaign for discount and campaign items, respectively. |
discount-rate | Float32? | The discount rate for discounts in percent that applies to the whole tab. Only used if type is discounts . |
purchase-price | Money? | The product's purchase price, excluding VAT, in default currency. |
metadata | Metadata? | Additional metadata about the item. Used for vouchers, for instance. |
tickets | String[]? | A list of OrderTicket IDs for tickets that have been sent to a kitchen printer. |
last-kitchen-ticket-item | Item? | A copy of the item at the time when the last kitchen ticked was printed. Used for change detection. |
comment | String? | May contain instructions that will be printed on the kitchen ticket. |
undiscountable | Boolean? | true if the product group the item belongs to is undiscountable and the item is thus not eligible for discounts. |
sub-items | Item[]? | An item may contain nested sub-items. Used for menus, campaigns, discounts etc. |
modifier | Int64? | A reference to the ProductModifier , if this sub-item is a product modifier. |
modifiers | ItemModifier[]? | 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[];
}
Property | Data Type | Description |
---|---|---|
modifier | Int64 | ID of ProductModifier . |
name | String | Name of product modifier. |
type | ProductModifier.Type? | Modifier type. See ProductModifier . |
values | String[] | A list of values from the product modifier that applies to this item. |
labels | Int64[]? | 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
-
For historical reasons,
values
must always be present, even iftype
issingle-label
ormultiple-labels
. Older clients might assumevalues
is always present and could crash if it is missing. ↩