Modifiers & Taxes
Product modifiers (options, add-ons) and tax rates — how they are linked to products and reflected in orders.
This page covers two groups of endpoints:
- Product modifiers (
ProductModifiers) — options and add-ons for dishes (for example, doneness, portion size, extra ingredients). - Product taxes (
ProductTaxes) — the directory of tax rates that are linked to products.
All requests require a Bearer token (see Authentication). restaurantId is a
numeric path parameter. Common conventions and errors are in Conventions and
Errors. The product and group catalog is described in Menu: Catalog.
Base path: /api/core/admin/restaurants/{restaurantId}.
Product modifiers
A modifier (VendorProductModifier) is a group of choices for a dish. Each choice
(VendorAdditionValue) can carry its own price and tax. The modifier defines the selection rules
(single/multiple, minimum/maximum) and can be linked to specific products or to whole product groups.
| Method | Path | Purpose |
|---|---|---|
GET | /modifiers | List modifiers |
POST | /modifiers | Create a modifier |
PUT | /modifiers/{modifierId} | Update a modifier |
DELETE | /modifiers/{modifierId} | Delete a modifier |
VendorProductModifier fields
| Field | Type | Description |
|---|---|---|
id | string? | Modifier identifier |
name | string? | Internal name |
displayName | string? | Display name shown to the guest |
values | array<VendorAdditionValue> | Choices (see below) |
multiselect | boolean | Multiple selection allowed |
minSelectedAmount | integer | Minimum number of selected choices |
maxSelectedAmount | integer? | Maximum number of selected choices |
productGroupIds | array<string> | Link to product groups |
productIds | array<string> | Link to specific products |
visible | boolean? | Modifier visibility |
VendorAdditionValue fields (choice)
| Field | Type | Description |
|---|---|---|
id | string? | Choice identifier |
name | string? | Choice name |
price | number? | Surcharge for the choice |
taxes | number? | Tax on the choice |
description | string? | Description |
plu | string? | PLU code of the choice |
default | boolean? | Selected by default |
Choice prices. Each choice’s price must be zero or more, have at most two decimal places and be no more
than 21474836.47; an empty price is allowed. A create or update with a choice outside these rules is
refused with 400 and the code invalid_price, and the message names the choice:
{ "message": "The price of option 'Extra sauce' must not be below zero: -5.", "code": "invalid_price" }List
GET /modifiers
Returns an array of VendorProductModifier.
curl -G https://api.hostmeapp.com/api/core/admin/restaurants/123/modifiers \ -H "Authorization: Bearer $TOKEN"Create a modifier
POST /modifiers
Body — VendorProductModifier. Response — the created modifier.
curl -X POST https://api.hostmeapp.com/api/core/admin/restaurants/123/modifiers \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "doneness", "displayName": "Doneness", "multiselect": false, "minSelectedAmount": 1, "maxSelectedAmount": 1, "values": [ { "name": "Medium", "price": 0, "default": true }, { "name": "Well done", "price": 0 } ], "productIds": ["PRODUCT_ID"], "visible": true }'Update a modifier
PUT /modifiers/{modifierId}
| Parameter | In | Type |
|---|---|---|
restaurantId * | path | integer |
modifierId * | path | string |
Body — VendorProductModifier. Response — the updated modifier.
Delete a modifier
DELETE /modifiers/{modifierId}
| Parameter | In | Type |
|---|---|---|
restaurantId * | path | integer |
modifierId * | path | string |
curl -X DELETE https://api.hostmeapp.com/api/core/admin/restaurants/123/modifiers/MODIFIER_ID \ -H "Authorization: Bearer $TOKEN"Modifiers of a specific menu. Besides the global modifier directory there are endpoints for modifiers within a single menu:
GETandPUT/menu/{menuId}/modifiers(theVendorMenuModifierobject — the same fields asVendorProductModifier, but withoutproductGroupIds/productIds). See Menu: Catalog.
Product taxes
A tax (VendorTax) is a rate that can be applied to products. A tax can be included in the price
(vatInclusive) or added on top, can be globally enabled/disabled and linked to a set of products.
| Method | Path | Purpose |
|---|---|---|
GET | /taxes | List taxes |
POST | /taxes | Create a tax |
PUT | /taxes/{taxId} | Update a tax |
DELETE | /taxes/{taxId} | Delete a tax |
VendorTax fields
| Field | Type | Description |
|---|---|---|
id | string? | Tax identifier |
name | string? | Tax name |
vatInclusive | boolean | Tax is included in the price (true) or added on top (false) |
percentage | number? | Tax rate, percent |
enabled | boolean? | Tax is active |
productIds | array<string> | Products the tax applies to |
List
GET /taxes
Returns an array of VendorTax.
curl -G https://api.hostmeapp.com/api/core/admin/restaurants/123/taxes \ -H "Authorization: Bearer $TOKEN"Create a tax
POST /taxes
Body — VendorTax. Response — the created tax.
curl -X POST https://api.hostmeapp.com/api/core/admin/restaurants/123/taxes \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "VAT 20%", "vatInclusive": true, "percentage": 20, "enabled": true, "productIds": ["PRODUCT_ID"] }'Update a tax
PUT /taxes/{taxId}
| Parameter | In | Type |
|---|---|---|
restaurantId * | path | integer |
taxId * | path | string |
Body — VendorTax. Response — the updated tax.
Delete a tax
DELETE /taxes/{taxId}
| Parameter | In | Type |
|---|---|---|
restaurantId * | path | integer |
taxId * | path | string |
curl -X DELETE https://api.hostmeapp.com/api/core/admin/restaurants/123/taxes/TAX_ID \ -H "Authorization: Bearer $TOKEN"Link to a product. A product has a
taxIdsarray (see Menu: Catalog) — it lists the IDs of the taxes applied to it. The link can be set from either side: viaproductIdson the tax and viataxIdson the product.