> For the complete documentation index, see [llms.txt](https://docs.commercelayer.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.commercelayer.io/core-api-reference/2026-05/order_copies.md).

# Order copies

The order copy object and the allowed CRUD operations on the related resource endpoint

Order copies asynchronously generate a copy of a source order and all of its associated line items, line item options, payment sessions, and addresses.

They can be used standalone to allow order editing, no matter the order's state.

## Copy options

You can set the following options to control how the order copy process is performed:

* `place_target_order` — the copied order is placed at the end of the process (default for order subscriptions).
* `cancel_source_order` — the source order is cancelled at the end of the process.

{% hint style="info" %}
Neither option triggers any payment processing. Placing the target order does not initiate any authorization, and cancelling the source order does not automatically create a [payment void](https://docs.commercelayer.io/core-api-reference/2026-05/payment_voids.md) or [refund](https://docs.commercelayer.io/core-api-reference/2026-05/payment_refunds.md). Any payment actions must be performed manually via the respective payment sessions.
{% endhint %}

## Payment sessions

For each [payment session](https://docs.commercelayer.io/core-api-reference/2026-05/payment_sessions.md) associated with the source order, a new session is created on the target order. The copy preserves the original session's `payment_setting` and, if present, the linked [payment wallet](https://docs.commercelayer.io/core-api-reference/2026-05/payment_wallets.md). The new session starts in `unpaid` status — no transaction history (authorizations, captures, voids, or refunds) is carried over. A new [payment authorization](https://docs.commercelayer.io/core-api-reference/2026-05/payment_authorizations.md) must be created to pay the target order.

## Retriggering promotions

By default, order copies create *frozen* copies of the source order. That means that promotion and discount line items are copied as is (without being recomputed). A recalculation occurs only if the target order is edited (e.g. adding or removing line items).

To manage promotion recalculation differently you can leverage two specific attributes:

* `ignore_invalid_coupon` — if an invalid (e.g. expired, single-use, etc.) coupon is associated with the source order, it's not copied to the target order (without blocking the copy process or throwing any errors).
* `apply_promotions` — the promotion application is retriggered at the end of the copy process (i.e. the line items related to promotions are cancelled and recreated only if still valid).

{% hint style="info" %}
If you need promotions to be recomputed and want to avoid possible errors when copying the coupon (if any), make sure to set both of the attributes above to `true`. Please note that these options are available for order copies only (not for [recurring order copies](https://docs.commercelayer.io/core-api-reference/2026-05/recurring_order_copies.md)).
{% endhint %}

## Skipping copy errors

By default, order copies that collect errors (e.g. one or more line items run out of stock) fail. You can override this behavior by setting the `skip_errors` attribute to `true`. This way, only a check that the target order was created correctly is performed, while any other error is ignored and the order copy is moved to `completed`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.commercelayer.io/core-api-reference/2026-05/order_copies.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
