Copy Components to Variants
POST/api/v2/products/:product/component-copy
Copy this variant's components onto its sibling variants. Uses the same plan as Preview Copying Components to Variants and saves every target whose status is will_update; each saved variant gets a new composition revision (change summary "Copied components from <SKU> (<mode>)") and an entry in its activity log. Targets are saved one at a time: a refused target (for example a component whose lifecycle blocks component use) is reported with status failed and a reason, and the others still save.
products:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Variant-aware mapping: when a component is itself a variant of a matrix product and carries the source's option value (for example Finish = Gold), the target gets that component's sibling with the target's option value (Finish = Silver). When the component's matrix has no variant with that value, the component is copied as-is and the line's mapping is fallback with a note. Option values are matched case-insensitively.
Each target reports status: will_update, unchanged (already has exactly this recipe), or skipped (with reason, e.g. a standard variant, or a recipe that would contain itself). Line mapping is same, mapped, fallback, or kept (already on the target).
Fields:
- mode (required, string): replace — each target's recipe becomes the source's recipe and components not in it are removed; add_missing — each target keeps its components and quantities, and only components it lacks are added.
- target_ids (optional, array of integers, distinct): the sibling variants to copy to. Omit to include every other variant of the same matrix. An ID that is not a sibling variant is rejected with 422.
Requires the products.update permission. At most 100 targets per request.
Authentication: Requires Bearer token.
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden
Response Headers
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.