Skip to content

Catalog Product — Copy

Equivalent to POST /api/admin/catalog/products/{sourceId}/copy.

The example uses an illustrative id. Replace it with a product that exists in your store — adminCatalogProducts lists valid ids.

Operation

OperationType
createAdminCatalogProductCopyMutation

Input

FieldTypeRequiredNotes
sourceIdIntYesId of the product to duplicate.

Payload Fields

FieldTypeDescription
_idIntId of the newly created copy.
sourceIdIntId of the product that was copied.
skuStringGenerated SKU, always temporary-sku-<hex> — it does not derive from the source SKU.
typeStringProduct type, matching the source.
nameStringSource name prefixed with Copy Of .
successBooleanAlways true on success.
messageStringTranslated confirmation.

Select _id, not id. This is an action result with no route of its own, so its id resolves to /api/admin/admin_catalog_product_copies/<id>, which is not a queryable path.

What Gets Copied

Attribute values, images, categories, inventories, and customer-group prices all carry over, as do the type-specific structures — a configurable's variants, a bundle's options, a grouped product's links.

Two things do not: the SKU and URL key are regenerated, and the copy is created disabled (status: "0") with a null urlKey, so it is never live by accident. Give it a real SKU, name, and URL key through Update before enabling it.

The payload is a summary, not a product — re-query adminCatalogProduct with the returned _id to read the copy.

Errors

Passing a configurable variant id fails with Variants of configurable products cannot be copied. Copy the parent configurable product instead. in errors[]. Copying the parent brings its variants along, which is what you want in nearly every case.

An unknown sourceId returns a not-found message in errors[]; a token without catalog.products.create returns You do not have permission to manage products.

Released under the MIT License.