---
title: "Copy a cart rule"
method: POST
path: "/marketing/cart-rules/{id}/copy"
tags: ["Admin Marketing: Promotions"]
---

# Copy a cart rule

`POST /marketing/cart-rules/{id}/copy`

## Request

- Base URL: `http://localhost:8000/api/admin`
- URL: `http://localhost:8000/api/admin/marketing/cart-rules/{id}/copy`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bagisto/apis/bagisto-admin-api/docs/marketing/cart-rules/:id/copy/post.ts> (a function with typed inputs; its response is checked against the schema)

Duplicates the cart rule with status forced inactive and the name prefixed "Copy of ...", copies its channel and customer-group assignments, and returns the new rule's full detail (prefilled for editing). Coupons are not copied. Mirrors the admin datagrid Copy action.

## Path parameters

- `id` integer, required

## Request body

- object

## Response `200`

Cart rule copied; returns the new rule detail.

## Other responses

- `400`: Invalid input
- `401`: Missing or invalid admin token.
- `403`: Admin role lacks marketing.promotions.cart_rules.create.
- `404`: Source cart rule not found.
- `422`: Validation Error

---

[API](https://skmtc.dev/bagisto/apis/bagisto-admin-api.md) - [All operations](https://skmtc.dev/bagisto/apis/bagisto-admin-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bagisto/apis/bagisto-admin-api/revisions/3198f11be70f?raw)
