Create modifier

View as Markdown
## Create modifier Creates a **modifier** (a variation or extra applied to products: size, ingredients, add-ons…) together with its options, scoped to the authenticated merchant's store. The `storeId` is taken from the API key context and a UUID `id` is generated server-side for the modifier and for every option. ### Authentication - Send the merchant API key in the **`x-api-key`** header (alias `x-account-api-key`). - Requires the scope: **`Merchant.product.create`**. - Optionally scope the key with **`x-application-account-id`** (alias `x-account-id`) or the `application_account_id` / `account_id` query param. ### Body (application/json) - `name` (required) — modifier name, max 50 chars. - `options` (required) — array of options. Each option requires `name` (max 50 chars) and `price` (in SATS); `imageUrl` and `enabled` are optional. Returns the created modifier record. --- **Notas:** Handler: modifierService.create. `options` is @IsDefined + @IsArray, so it must be present (an empty array is accepted by validation). Options are created through a nested createMany; each option gets a server-generated UUID. Optional option fields: imageUrl, enabled.

Authentication

x-api-keystring
API Key authentication via header

Headers

x-application-account-idstringOptional

Scope the request to a specific store / account instead of the one resolved from the API key. Aliases: the x-account-id header, or the application_account_id / account_id query parameter.

Request

This endpoint expects an object.
namestringRequired
optionslist of objectsRequired