Skip to content

Catalog Product — Copy

Duplicates an existing catalog product. Fires catalog.product.create.before / catalog.product.create.after so listeners (search index, cache flush) trigger on the copy.

Endpoint

EndpointMethod
/api/admin/catalog/products/{sourceId}/copyPOST

Path parameters

FieldTypeRequiredNotes
sourceIdintegeryesID of the product to duplicate.

Request body

Empty. Send an empty JSON object {} if your client requires a body.

Response

200 OK

FieldTypeNotes
idintegerID of the newly created copy.
sourceIdintegerID of the source product.
skustringAuto-suffixed SKU (Bagisto appends -copy-N).
typestringProduct type — matches the source.
namestring|nullDisplay name of the copy, when available.
successboolAlways true on success.
messagestringTranslated confirmation.

Errors

HTTPCause
401 UnauthorizedMissing or invalid admin Bearer token.
403 ForbiddenAdmin role lacks catalog.products.create.
404 Not FoundSource product not found.
422 Unprocessable EntitySource is a configurable variant (parent_id != null).
500 Internal Server ErrorUnderlying copy threw an exception.

Notes

  • The new SKU suffix is generated by Bagisto core — clients cannot pre-specify it.
  • Variant rows are NOT copy targets — only the parent configurable product is.

Released under the MIT License.