Preview Copying Components to Variants
POST/api/v2/products/:product/component-copy/preview
Show what each sibling variant would get from copying this variant's components, without changing anything: its recipe before and after, which component IDs are added, removed or change quantity, and how each line was mapped.
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.
Returns 422 when the source is not a bundle or kit variant of a matrix, or has no components.
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 — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
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.