Product Groups
Type | Base Path | Trigger 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
Name | Method | Relative Path | Payload | Response | Description |
---|---|---|---|---|---|
addProductGroup | POST | ~{realm}/product-groups/ | ProductGroup | Stored_ProductGroup | Adds a new product group to the list. |
listProductGroups | GET | ~{realm}/product-groups/ | N/A | Stored_ProductGroup[] | Retrieves a list of product groups. |
getProductGroup | GET | ~{realm}/product-groups/{id} | N/A | Stored_ProductGroup | Retrieves a product group. |
putProductGroup | PUT | ~{realm}/product-groups/{id} | ProductGroup | Stored_ProductGroup | Replaces a product group. |
updateProductGroup | PATCH | ~{realm}/product-groups/{id} | Partial_ProductGroup | Stored_ProductGroup | Updates specified product group fields. |
removeProductGroup | DELETE | ~{realm}/product-groups/{id} | N/A | N/A | Deletes a product group. |
Permissions
Permission | Description |
---|---|
edit-product-groups | Client is allowed to add new product groups and to modify or delete existing product groups. |
show-product-groups | Client 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[];
}
Property | Data Type | Description |
---|---|---|
name | String | Name of product group. Must be unique. |
type | ProductGroup.Type | Type of product group. Only goods , services or liabilities may be used. |
vat-rate | Float32 | VAT rate, in percent. |
alert | String? | 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. |
account | Int32? | Account number for recording revenue for products in this product group. See Accounts. |
discount-account | Int32? | Account number for recording discounts for products in this product group. See Accounts. |
vat-account | Int32? | Account number for recording VAT for products in this product group. See Accounts. |
undiscountable | Boolean | The products in the product group will ignore all types of discounts. |
kitchen-printer | Peripheral.Function? | Which kitchen printer, if any, to send kitchen tickets to when a product from this product group is ordered. |
secondary-kitchen-printers | Peripheral.Function[]? | An optional list of secondary kitchen printers. |
secondary-kitchen-printer-mode | ProductGroup.SecondaryKitchenPrinterMode? | How and when products from this product group should be printed on the secondary kitchen printers. Default is informative . |
modifiers | Int64[]? | A list of ProductModifier IDs that should be applied when a product from this group is sold. |
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. |
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.