Replace modifier
Replace modifier
Replaces the modifier :id: it updates the name and rebuilds the whole options list — every existing option is deleted and recreated from the body. This is a full replacement (PUT), not a patch.
Authentication
- Merchant API key in
x-api-key(aliasx-account-api-key). - Requires
Merchant.product.update.
Path params
id— the modifier UUID.
Body (application/json)
Same shape as create (CreateModifierDto): name (required) and options (required). Each option requires name and price; imageUrl and enabled are optional.
Behavior & side-effects
- If the modifier does not exist or belongs to another store: 400 Bad Request (
Not Found). options: { deleteMany: {}, create: [...] }— the previous options are destroyed and new rows (with new UUIDs) are created. Any option id you held before the call is no longer valid.
Returns the updated modifier including its new options.
Notas: Handler: modifierService.update. Uses the same CreateModifierDto as POST — there is no partial update. Options are wiped and recreated on every call, so option ids change.
Authentication
Path parameters
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.
