Skip to content

Copy Cart Rule

Duplicates an existing cart rule into a brand-new rule — the Copy row action on the admin Marketing → Promotions → Cart Rules datagrid. The new rule is a ready-to-edit clone that starts inactive.

TIP

New here? Read the Cart Rules overview for what a cart rule does and how its fields behave.

Operation

OperationTypePurpose
copyAdminMarketingCartRuleMutationDuplicate a cart rule into a new rule

Details

  • Requires an admin Bearer token and the marketing.promotions.cart_rules.create permission.
  • Pass the source rule's IRI (e.g. /api/admin/marketing/cart-rules/47) as id. The mutation returns the full detail of the newly created rule.
  • The copy:
    • prefixes name with Copy of ,
    • forces status to 0 (the copy starts inactive),
    • copies the source's channels and customerGroups,
    • does not copy coupons — so couponCode is null on the new rule.
  • An unknown source id returns a 404 error.

Input fields

FieldTypeRequiredNotes
idIDYesThe source rule's IRI

Released under the MIT License.