Skip to main content

Product Groups

TypeBase PathTrigger Name
REST resource~{realm}/product-groups/product-groups

This resource holds all product groups. A product group is a named set of properties that applies to all products that belong to the group.

Endpoints

NameMethodRelative PathPayloadResponseDescription
addProductGroupPOST~{realm}/product-groups/ProductGroupStored_ProductGroupAdds a new product group to the list.
listProductGroupsGET~{realm}/product-groups/N/AStored_ProductGroup[]Retrieves a list of product groups.
getProductGroupGET~{realm}/product-groups/{id}N/AStored_ProductGroupRetrieves a product group.
putProductGroupPUT~{realm}/product-groups/{id}ProductGroupStored_ProductGroupReplaces a product group.
updateProductGroupPATCH~{realm}/product-groups/{id}Partial_ProductGroupStored_ProductGroupUpdates specified product group fields.
removeProductGroupDELETE~{realm}/product-groups/{id}N/AN/ADeletes a product group.

Permissions

PermissionDescription
edit-product-groupsClient is allowed to add new product groups and to modify or delete existing product groups.
show-product-groupsClient is allowed to query the product group list and to fetch individual product groups.

Entities

Interface ProductGroup

namespace ProductGroup {
type SecondaryKitchenPrinterMode = 'informative' | 'always';
type Type = 'goods' | 'services' | 'liabilities' | 'adjustments' | 'campaigns' | 'discounts' | 'discount';
}

interface ProductGroup {
'name': string;
'type': ProductGroup.Type;
'vat-rate': number;
'alert'?: string;
'account'?: number;
'discount-account'?: number;
'vat-account'?: number;
'undiscountable'?: boolean;
'kitchen-printer'?: Peripheral.Function;
'secondary-kitchen-printers'?: Peripheral.Function[];
'secondary-kitchen-printer-mode'?: ProductGroup.SecondaryKitchenPrinterMode;
'modifiers'?: number[];
'id'?: number;
'created'?: DateTime;
'updated'?: DateTime;
'deleted'?: DateTime;
'updated-by'?: number;
'updated-from'?: number;
'tags'?: string[];
'labels'?: number[];
}
PropertyData TypeDescription
nameStringName of product group. Must be unique.
typeProductGroup.TypeType of product group. Only goods, services or liabilities may be used.
vat-rateFloat32VAT rate, in percent.
alertString?Message to be displayed to cashier when a product in this group is sold. Can be used to remind cashier to check customer's age when serving alcohol, for instance.
accountInt32?Account number for recording revenue for products in this product group. See Accounts.
discount-accountInt32?Account number for recording discounts for products in this product group. See Accounts.
vat-accountInt32?Account number for recording VAT for products in this product group. See Accounts.
undiscountableBooleanThe products in the product group will ignore all types of discounts.
kitchen-printerPeripheral.Function?Which kitchen printer, if any, to send kitchen tickets to when a product from this product group is ordered.
secondary-kitchen-printersPeripheral.Function[]?An optional list of secondary kitchen printers.
secondary-kitchen-printer-modeProductGroup.SecondaryKitchenPrinterMode?How and when products from this product group should be printed on the secondary kitchen printers. Default is informative.
modifiersInt64[]?A list of ProductModifier IDs that should be applied when a product from this group is sold.
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.

Regarding the ProductGroup.Type enum: adjustments, campaigns and discounts are only used for tabs and receipts, and cannot be used as product group types directly. liabilities are for vouchers or similar products, and products belonging to a product group of this type will not be included in sales reports. adjustments is used similar to discounts, but is used to modify the price of a product or a package campaign without specifying a discount explicitly. discount, finally, is deprecated; use discounts instead.