POST /admin/products/:id/attributes/batch and POST /vendor/products/:id/attributes/batch. Delegates to removeProductAttributesFromProductWorkflow, addProductAttributesToProductWorkflow, and updateProductAttributesOnProductWorkflow, applied in the order remove → add → update so removing and re-adding the same attribute in one call resolves correctly.
Usage
Input
The product whose attributes are being managed.
Attributes to attach — existing (
{ id, value_ids | value }) or inline ({ title, type?, value | values, is_variant_axis? }).Ids of attributes to detach; product-scoped attributes are deleted, shared ones are unlinked.
Per-attribute selection changes (
{ id, title?, add?, remove?, value? }).Custom data passed through to the workflow hooks.
Result
No return value.
Hooks
validate— runs before any mutation with{ input }; throw to reject the batch.productAttributesLinked— runs after all sub-workflows with{ product_id }.