Create modifier
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-keyheader (aliasx-account-api-key). - Requires the scope:
Merchant.product.create. - Optionally scope the key with
x-application-account-id(aliasx-account-id) or theapplication_account_id/account_idquery param.
Body (application/json)
name(required) — modifier name, max 50 chars.options(required) — array of options. Each option requiresname(max 50 chars) andprice(in SATS);imageUrlandenabledare 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
Headers
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.
