Update product

View as Markdown
## Update product Updates an existing product owned by the authenticated store and reconciles its linked apps and modifiers to match the arrays supplied in the body (diff-based add/remove). ### Authentication Requires a Merchant API key in `x-api-key` with scope `Merchant.product.update`. ### Path params - `id` (required) — the product UUID. ### Body JSON body (`UpdateProductDto`, which currently extends `CreateProductDto` with the same fields and validation). Send the full product representation: - `name` (required) and `price` (required, positive) plus optional `description`, `imageUrl`, `sku`, `productCategoryId`, `appsIds`, `modifiersIds`. ### Behavior & side-effects - The product must exist in your store, else 400 `Product with id <id> not found`. - If `sku` differs from the current SKU, its global uniqueness is validated (400 if already in use). - `appsIds` / `modifiersIds` are treated as the desired final set: the service removes join rows not present and adds new ones. Any newly supplied app/modifier that does not belong to your store causes a 403. - All changes (join-table deletes/creates and the product update) run in a single transaction. Returns a confirmation message, not the updated entity. > Note: because `UpdateProductDto` extends `CreateProductDto` without `PartialType`, `name` and `price` stay required on update. --- **Notas:** appsIds/modifiersIds behave as full replacement sets (diff add/remove), not incremental additions. SKU is only re-validated when changed. UpdateProductDto extends CreateProductDto (no PartialType), so name and price remain required.

Authentication

x-api-keystring
API Key authentication via header

Path parameters

idstringRequired
The product UUID.

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
priceintegerRequired