Update product
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) andprice(required, positive) plus optionaldescription,imageUrl,sku,productCategoryId,appsIds,modifiersIds.
Behavior & side-effects
- The product must exist in your store, else 400
Product with id <id> not found. - If
skudiffers from the current SKU, its global uniqueness is validated (400 if already in use). appsIds/modifiersIdsare 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
UpdateProductDtoextendsCreateProductDtowithoutPartialType,nameandpricestay 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
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.
