product_update
Update a product's attributes, translations, or legacy fields. Validates input and supports reversal.
Instructions
Update a product. Three argument shapes (combinable):
attributes: flat object of root-level product fields (status, price, sale_price, sku, stock, description, category_ids, image_id, asset_ids, physical_properties, uses_variants, variant_types, variants, variant_attributes). Note: asset_ids accepted; on PUT it's translated to theassets:[{id}]envelope Voog requires (sending raw asset_ids on PUT silently keeps only the hero image).variantswithoutvariant_attributeswipes ALL variants (even ones withid); pass both together, or setforce=trueto acknowledge.translations: nested {field: {lang: value}} for translatable fields (name, slug, description). Each field-language pair must be non-empty. Cannot overlap with attributes (e.g. attributes.description + translations.description in the same call is rejected).fields(legacy v1.1 shape): flat 'name-et', 'slug-en' keys — auto-routed to translations. Kept for back-compat. At least one of attributes/translations/fields must be non-empty. Validates status enum {'draft', 'live'} and rejects unknown attribute keys (catches typos before they round-trip to a 422). Reversible by calling with previous values; idempotent (same input twice = same end state).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | Yes | ||
| product_id | Yes | ||
| attributes | No | Root-level product fields. Allowed keys: status, price, sale_price, sku, stock, description, category_ids, image_id, asset_ids, physical_properties, uses_variants, variant_types, variants, variant_attributes. asset_ids accepted; on PUT it's translated to the `assets:[{id}]` envelope Voog requires. | |
| translations | No | Nested {field: {lang: value}}. Allowed fields: name, slug, description. | |
| fields | No | Legacy v1.1 shape: flat 'name-et', 'slug-en' keys. Auto-routed to translations. | |
| force | No | Required to send `variants` without `variant_attributes` — Voog wipes all variants in that case. Default false. |