Create a product group (tenant:masterdata:write)
POST /api/masterdata/product-groups
Module: Master data · operationId: createProductGroup · Tag: Product groups · Auth: access token (Authorization: Bearer <accessToken>)
Emits masterdata.product_group.created.
Request body
application/json (required)
code(string, required): Unique per tenantdefaultTaxKeyCode(string, required): Code oftax-keys; new articles of the group without tax key get itname(string, required): Name (max length 255)accounts(array of ProductGroupAccount): Revenue accounts per tax key, saved as a whole set (overrides the tax key's default account for the group and its sub-groups)revenueAccount(string, required): Revenue accounttaxKeyCode(string, required): Code oftax-keys(once per group)
costCenter(string): Cost center; sub-groups without one inherit it (max length 32)createdAt(string (date-time), read-only): Creation timedefaultUnitCode(string): Code ofunits; new articles of the group without unit get itid(string (uuid), read-only): Id of the product groupinfo(string): Info textparentId(string (uuid), nullable): Parent group (no cycles)priceTiers(array of PriceTier): The group's own price calculation scale (same rules asPUT /price-tiers); it replaces the inherited scale completely.nullor absent: the group uses its parent's scale, then the tenant's (saving without it removes the group's own scale).fromCost(number, required): Purchase price from which the row applies (inclusive, net, base currency); the first row is 0markupRate(number, required): Markup in percent of the purchase price (max 1000)rounding(string, required):NONErounds half up to cents;UP_xrounds up to the next multiple of x (0.05, 0.10, 0.50, 1, 5, 10);END_90/END_99take the smallest price ending in .90/.99 that is not below the value. (one ofNONE,UP_0_05,UP_0_10,UP_0_50,UP_1,UP_5,UP_10,END_90,END_99)
productCount(integer, read-only): Number of articles in the groupupdatedAt(string (date-time), read-only): Time of the last changeversion(integer): Optimistic locking version (updates)
Example:
{
"code": "MON",
"defaultTaxKeyCode": "STANDARD",
"name": "Monitore"
}
Responses
- 201 Created (
application/json) - 400 Malformed body or query parameter (
application/json) - 401 Missing, invalid or expired token (empty body)
- 403 The token lacks the permission or carries no tenant (
application/json) - 409 Stale version or conflict with existing data (
application/json)
Fields of the 201 answer:
code(string, required): Unique per tenantdefaultTaxKeyCode(string, required): Code oftax-keys; new articles of the group without tax key get itname(string, required): Name (max length 255)accounts(array of ProductGroupAccount): Revenue accounts per tax key, saved as a whole set (overrides the tax key's default account for the group and its sub-groups)revenueAccount(string, required): Revenue accounttaxKeyCode(string, required): Code oftax-keys(once per group)
costCenter(string): Cost center; sub-groups without one inherit it (max length 32)createdAt(string (date-time), read-only): Creation timedefaultUnitCode(string): Code ofunits; new articles of the group without unit get itid(string (uuid), read-only): Id of the product groupinfo(string): Info textparentId(string (uuid), nullable): Parent group (no cycles)priceTiers(array of PriceTier): The group's own price calculation scale (same rules asPUT /price-tiers); it replaces the inherited scale completely.nullor absent: the group uses its parent's scale, then the tenant's (saving without it removes the group's own scale).fromCost(number, required): Purchase price from which the row applies (inclusive, net, base currency); the first row is 0markupRate(number, required): Markup in percent of the purchase price (max 1000)rounding(string, required):NONErounds half up to cents;UP_xrounds up to the next multiple of x (0.05, 0.10, 0.50, 1, 5, 10);END_90/END_99take the smallest price ending in .90/.99 that is not below the value. (one ofNONE,UP_0_05,UP_0_10,UP_0_50,UP_1,UP_5,UP_10,END_90,END_99)
productCount(integer, read-only): Number of articles in the groupupdatedAt(string (date-time), read-only): Time of the last changeversion(integer): Optimistic locking version (updates)
Example 201 answer:
{
"accounts": [
{
"revenueAccount": "4400",
"taxKeyCode": "STANDARD"
}
],
"code": "HARDWARE",
"costCenter": "4200",
"createdAt": "2026-01-02T08:00:00Z",
"defaultTaxKeyCode": "STANDARD",
"defaultUnitCode": "STK",
"id": "8d0b6f3e-2c4a-4e7b-9a1d-5f3c2e1b0a97",
"name": "Hardware",
"parentId": null,
"priceTiers": [
{
"fromCost": 0,
"markupRate": 35,
"rounding": "END_99"
},
{
"fromCost": 500,
"markupRate": 25,
"rounding": "END_99"
}
],
"productCount": 14,
"updatedAt": "2026-04-11T15:20:00Z",
"version": 2
}
Example request
curl -X POST 'https://api.mbcom.cloud/api/masterdata/product-groups' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
--data '{"code":"MON","defaultTaxKeyCode":"STANDARD","name":"Monitore"}'