Products
Type | Base Path | Trigger Name |
---|---|---|
REST resource | ~{realm}/products/ | products |
This resource holds all sellable products and services.
Endpoints
Name | Method | Relative Path | Payload | Response | Description |
---|---|---|---|---|---|
addProduct | POST | ~{realm}/products/ | Product | Stored_Product | Adds a new product to the list. |
listProducts | GET | ~{realm}/products/ | N/A | Stored_Product[] | Retrieves a list of products. |
getProduct | GET | ~{realm}/products/{id} | N/A | Stored_Product | Retrieves a product. |
putProduct | PUT | ~{realm}/products/{id} | Product | Stored_Product | Replaces a product. |
updateProduct | PATCH | ~{realm}/products/{id} | Partial_Product | Stored_Product | Updates specified product fields. |
removeProduct | DELETE | ~{realm}/products/{id} | N/A | N/A | Deletes a product. |
Permissions
Permission | Description |
---|---|
edit-products | Client is allowed to add new products and to modify or delete existing products. |
show-products | Client is allowed to query the product list and to fetch individual products. |
Entities
Interface Product
namespace Product {
type Type = 'coupon' | 'coupon-voucher' | 'payment-voucher';
}
interface Product {
'name': string;
'name-t9n'?: Translation[];
'description'?: string;
'description-t9n'?: Translation[];
'type'?: Product.Type;
'product-group': number;
'price'?: number;
'unit'?: string;
'plu'?: number;
'sku'?: string;
'brand'?: string;
'model-number'?: string;
'ean'?: string;
'html-description'?: string;
'html-description-t9n'?: Translation[];
'purchase-price'?: number;
'default-quantity'?: number;
'alert'?: string;
'voucher-coupon-product'?: number;
'voucher-coupon-quantity'?: number;
'voucher-payment-method'?: number;
'expiration'?: string;
'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 | The product name. |
description | String? | A short description of the product. |
type | Product.Type? | Product type. May be null (default) or coupon /coupon-voucher /payment-voucher , which indicates that the product being sold is a voucher that requires special treatment. |
product-group | Int64 | ID of the ProductGroup the product belongs to. |
price | Money? | Price, including VAT, in default currency. If unset, cashier needs to enter price manually. |
unit | String? | The unit ("kg", "m²", etc.). If unset, unit is "piece". |
plu | Int32? | PLU code ("Price Look-up Code"). Used to quickly find a product by entering a short code. |
sku | String? | SKU ("Stock Keeping Unit") identifier. Used to uniquely identify a product. |
brand | String? | Product brand/maker. Used as general product metadata or for searching. |
model-number | String? | Model number. Used as general product metadata or for searching. |
ean | String? | EAN code. Used by bar-code scanners. |
html-description | String? | A detailed, HTML-formatted description. Currently unused! |
purchase-price | Money? | Purchase price, excluding VAT, in default currency. Used to calculate profit margin. |
default-quantity | Float32? | The quantity that should be added when this product is sold. If unset, the cashier will be asked for the quantity. Should normally be set to 1. |
alert | String? | Message to be displayed to cashier when this product is sold. Can be used to remind cashier to check customer's age when serving alcohol, for instance. |
voucher-coupon-product | Int64? | ID of the coupon Product a coupon voucher should contain. |
voucher-coupon-quantity | Float32? | Number of coupons a coupon voucher should contain. |
voucher-payment-method | Int64? | ID of the PaymentMethod a payment voucher product should use. |
expiration | Duration? | Default lifetime for payment voucher products. |
modifiers | Int64[]? | A list of ProductModifier IDs that should be applied when this product is sold. If set, overrides the same property in the ProductGroup entity. |
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. |
The following special product types are available:
Type | Description |
---|---|
coupon | This product is a coupon (which always have negative prices). Coupons cannot be used independently; they must always be used as part of a promotion. |
coupon-voucher | This product is a server-managed coupon voucher. |
payment-voucher | This product is a server-managed payment voucher. |